Skip to content

Commit

Permalink
[mini] Fix b0 calculation in collisions (#958)
Browse files Browse the repository at this point in the history
* fix error in b0 calculation

* reset benchmark because an error in the collisions was fixed

---------

Co-authored-by: Tools <hipace.tools@desy.de>
  • Loading branch information
SeverinDiederichs and Tools authored May 23, 2023
1 parent dd1617f commit 34a2c8e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/particles/collisions/UpdateMomentumPerez.H
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ void UpdateMomentumPerezElastic (
// Compute b0
T_R const b0 = amrex::Math::abs(q1*q2) * inv_c2 /
(T_R(4.0)*MathConst::pi*PhysConstSI::ep0) * gc/mass_g *
( m1*g1s*m2*g2s/(p1sm*p1sm*inv_c2) + T_R(1.0) ) *
( m1*g1s*m2*g2s/(p1sm*p1sm*inv_c2) + T_R(1.0) );

// Compute the minimal impact parameter
Expand Down
26 changes: 13 additions & 13 deletions tests/checksum/benchmarks_json/collisions.SI.1Rank.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"lev=0": {
"Bx": 185894.49970857,
"By": 185895.56149722,
"Bz": 5398.3222513339,
"ExmBy": 84160567478008.0,
"EypBx": 84160440559263.0,
"Ez": 71704816487098.0,
"Psi": 1089584703.5587,
"Sx": 5219478972547400.0,
"Sy": 5219255132250900.0,
"chi": 4056826099294100.0,
"jx": 1.4609565125223e+16,
"Bx": 185895.73026042,
"By": 185896.51121669,
"Bz": 5397.3617493578,
"ExmBy": 84160800520468.0,
"EypBx": 84160737818435.0,
"Ez": 71704902663921.0,
"Psi": 1089584989.4535,
"Sx": 5219436746330300.0,
"Sy": 5219267801701100.0,
"chi": 4056826200594800.0,
"jx": 1.4609509906637e+16,
"jx_beam": 0.0,
"jy": 1.4609736131743e+16,
"jy": 1.4609638654652e+16,
"jy_beam": 0.0,
"jz_beam": 1.0840992316526e+16,
"rhomjz": 178184621.6204
"rhomjz": 178181264.72285
},
"beam": {
"charge": 1.1933011570032e-15,
Expand Down

0 comments on commit 34a2c8e

Please sign in to comment.