Skip to content

Commit

Permalink
Fix mass calculation for Dalton (#497)
Browse files Browse the repository at this point in the history
* fix mass calculation

* reset Ionization benchmark because mass slightly changed

Co-authored-by: Tools <hipace.tools@desy.de>
  • Loading branch information
AlexanderSinn and Tools authored May 12, 2021
1 parent 9f5fe9d commit 8e29a30
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/particles/PlasmaParticleContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PlasmaParticleContainer::ReadParameters ()

amrex::Real mass_Da;
if(pp.query("mass_Da", mass_Da)) {
m_mass = 1.007276466621 * phys_const.m_p * mass_Da;
m_mass = phys_const.m_p * mass_Da / 1.007276466621;
}
pp.query("mass", m_mass);
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(m_mass != 0, "The plasma particle mass must be specified");
Expand Down
40 changes: 20 additions & 20 deletions tests/checksum/benchmarks_json/ionization.2Rank.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
"charge": 1.127932350336e-16,
"id": 3023657224544,
"mass": 6.413006125856e-28,
"ux": 1896.5952261575,
"uy": 1892.3440469027,
"uz": 1390070.2538015,
"ux": 1896.6141586185,
"uy": 1892.3641305421,
"uz": 1390070.0697025,
"w": 825000000.0,
"x": 0.00041893888871082,
"y": 0.00041443329984177,
"z": 0.014359761172405
"x": 0.000418942492732,
"y": 0.00041443676973596,
"z": 0.014359761118377
},
"lev=0": {
"Bx": 3827606.1055557,
"By": 3842354.8933761,
"Bz": 407217.779059,
"ExmBy": 1483324762851400.0,
"EypBx": 1496660538735900.0,
"Ez": 881943800062300.0,
"Psi": 9280644543.803,
"jx": 5.5558565157445e+17,
"jx_beam": 153192840604540.0,
"jy": 5.5356761991471e+17,
"jy_beam": 147817175094610.0,
"jz": 5.9232751189732e+17,
"jz_beam": 1.6907192451121e+17,
"rho": 9512985591.2042
"Bx": 3827189.0568481,
"By": 3842210.8404533,
"Bz": 407059.0544614,
"ExmBy": 1483278062810500.0,
"EypBx": 1496618843837500.0,
"Ez": 881986924308600.0,
"Psi": 9280250956.4227,
"jx": 5.5558985649908e+17,
"jx_beam": 153199275201000.0,
"jy": 5.5358766628575e+17,
"jy_beam": 147823963710550.0,
"jz": 5.9230578698296e+17,
"jz_beam": 1.6907192449347e+17,
"rho": 9513287764.6262
}
}

0 comments on commit 8e29a30

Please sign in to comment.