Skip to content

Commit

Permalink
add Bz component to beam pusher (#973)
Browse files Browse the repository at this point in the history
* add Bz component to beam pusher

* reset benchmark because beam pusher was adjusted

---------

Co-authored-by: Tools <hipace.tools@desy.de>
  • Loading branch information
SeverinDiederichs and Tools authored Jun 8, 2023
1 parent bd7d541 commit 6c21b2b
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 60 deletions.
4 changes: 2 additions & 2 deletions src/particles/pusher/BeamParticleAdvance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ AdvanceBeamParticlesSlice (BeamParticleContainer& beam, const Fields& fields,

// use intermediate fields to calculate next (n+1) transverse momenta
const amrex::ParticleReal ux_next = ux + dt * charge_mass_ratio
* ( ExmByp + ( clight - uz * gammap_inv ) * Byp );
* ( ExmByp + ( clight - uz * gammap_inv ) * Byp + uy*gammap_inv*Bzp);
const amrex::ParticleReal uy_next = uy + dt * charge_mass_ratio
* ( EypBxp + ( uz * gammap_inv - clight ) * Bxp );
* ( EypBxp + ( uz * gammap_inv - clight ) * Bxp - ux*gammap_inv*Bzp);

// Now computing new longitudinal momentum
const amrex::ParticleReal ux_intermediate = ( ux_next + ux ) * 0.5_rt;
Expand Down
16 changes: 8 additions & 8 deletions tests/checksum/benchmarks_json/adaptive_time_step.1Rank.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
"lev=0": {
"Bx": 3238.6172166428,
"By": 3238.6172166428,
"Bz": 1.556879883973e-07,
"Bz": 1.5568798839709e-07,
"ExmBy": 0.0,
"EypBx": 0.0,
"Ez": 1.8570346400715e-05,
"Ez": 1.8570346400716e-05,
"Psi": 0.0,
"Sx": 8186.992902618,
"Sy": 8186.992902618,
"chi": 0.0,
"jx": 3.1502487470463e-05,
"jx_beam": 3.1502487470463e-05,
"jy": 3.1502487470463e-05,
"jy_beam": 3.1502487470463e-05,
"jx": 3.1502487470462e-05,
"jx_beam": 3.1502487470462e-05,
"jy": 3.1502487470462e-05,
"jy_beam": 3.1502487470462e-05,
"jz_beam": 6455.9967596791,
"rhomjz": 0.0
},
Expand All @@ -24,8 +24,8 @@
"x": 43910.016154202,
"y": 43910.016154202,
"z": 103295.90024655,
"ux": 0.52324418996684,
"uy": 0.52324418996684,
"ux": 0.52324418996683,
"uy": 0.52324418996683,
"uz": 103296048.58148,
"w": 6456.0
}
Expand Down
44 changes: 22 additions & 22 deletions tests/checksum/benchmarks_json/ionization.2Rank.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
"lev=0": {
"Bx": 2689634.1701211,
"By": 2671452.5339732,
"Bz": 419499.57920538,
"ExmBy": 1614988840098500.0,
"EypBx": 1595251829176400.0,
"Ez": 655267143631080.0,
"Psi": 10659250329.435,
"Sx": 7.6801881446419e+17,
"Sy": 7.6348233522278e+17,
"chi": 2086501751035400.0,
"jx": 5.1044497606322e+17,
"jx_beam": 215269401762800.0,
"jy": 5.2149835863969e+17,
"jy_beam": 215265762161610.0,
"jz_beam": 1.6907146636311e+17,
"rhomjz": 9034075714.9063
"Bx": 2689634.2223404,
"By": 2671452.3497875,
"Bz": 419498.97165975,
"ExmBy": 1614989148520300.0,
"EypBx": 1595251990768200.0,
"Ez": 655267124092800.0,
"Psi": 10659251571.635,
"Sx": 7.6801785965266e+17,
"Sy": 7.6348178542711e+17,
"chi": 2086501774975900.0,
"jx": 5.1044479556346e+17,
"jx_beam": 215269231084950.0,
"jy": 5.2149802784797e+17,
"jy_beam": 215266315701000.0,
"jz_beam": 1.6907146636335e+17,
"rhomjz": 9034071533.0881
},
"beam": {
"charge": 1.127932350336e-16,
"id": 248160,
"mass": 6.413006125856e-28,
"x": 0.0002447464565948,
"y": 0.00024424132449348,
"z": 0.014359627327001,
"ux": 2953.6512428163,
"uy": 2958.4626626614,
"uz": 1386888.171785,
"x": 0.0002447472090224,
"y": 0.00024424259795952,
"z": 0.014359627327289,
"ux": 2953.6513634741,
"uy": 2958.4623387526,
"uz": 1386888.1720874,
"w": 825000000.0
}
}
56 changes: 28 additions & 28 deletions tests/checksum/benchmarks_json/production.SI.2Rank_pwfa.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
{
"lev=0": {
"Bx": 0.022061120888569,
"By": 8975.2617543366,
"Bz": 0.031347907268044,
"ExmBy": 3101167123509.8,
"EypBx": 8140345.8483614,
"Ez": 2413402895305.4,
"Psi": 119968842.20863,
"Sx": 77263810795965.0,
"Sy": 126524085.25783,
"chi": 4383226808561.0,
"jx": 160567306286450.0,
"jx_beam": 160965885403.03,
"jy": 1020466184.8443,
"jy_beam": 89885.987825344,
"jz_beam": 483599930174930.0,
"rhomjz": 2214667.3800934
"Bx": 0.02206113412832,
"By": 8975.2617603234,
"Bz": 0.031347911731574,
"ExmBy": 3101167125023.1,
"EypBx": 8140345.8781593,
"Ez": 2413402893798.8,
"Psi": 119968842.1441,
"Sx": 77263811082688.0,
"Sy": 126526644.36943,
"chi": 4383226808592.1,
"jx": 160567306260430.0,
"jx_beam": 160965883855.23,
"jy": 1020466990.0208,
"jy_beam": 89923.839252715,
"jz_beam": 483599928874210.0,
"rhomjz": 2214667.3720966
},
"driver": {
"charge": 1.602176634e-13,
"id": 499935519084,
"mass": 9.1093837015e-25,
"x": 3.1385115751054,
"y": 3.1239795539825,
"z": 23.933624693334,
"ux": 1034932.9216195,
"uy": 1033344.8579317,
"uz": 983497452.683,
"x": 3.1385117654662,
"y": 3.1239797597931,
"z": 23.933624693298,
"ux": 1034932.8383917,
"uy": 1033344.7668538,
"uz": 983497452.68736,
"w": 3744396137.536
},
"witness": {
"charge": 1.602176634e-13,
"id": 750000500000,
"mass": 9.1093837015e-25,
"x": 2.4520422159035,
"y": 2.4577218239084,
"z": 160.00761694789,
"ux": 1127622.0966788,
"uy": 1132127.4166013,
"uz": 1032541147.5592,
"x": 2.4520419409964,
"y": 2.4577216202365,
"z": 160.00761694795,
"ux": 1127622.2288566,
"uy": 1132127.5121846,
"uz": 1032541147.5503,
"w": 1248301814.8922
}
}

0 comments on commit 6c21b2b

Please sign in to comment.