ComputationalRadiationPhysics / picongpu

Performance-Portable Particle-in-Cell Simulations for the Exascale Era :sparkles:
https://picongpu.readthedocs.io
Other
702 stars 217 forks source link

Lehe solver single electron under plane wave pulse simulation differs from Yee solver and analytical result #3726

Open tomaslevyy opened 3 years ago

tomaslevyy commented 3 years ago

Same simulation of a single electron under a plane wave laser pulse (A0=5, 800 nm, RAMP_INIT = 14.) show diferent results between Lehe and Yee methods, beeing the Yee method in accordance with analytic results [qucosa 102681]. The x-axis amplitude of oscilation at its maximum should be (analitically): A0·wavelenght/(pi)=1.27 micrometers. maximum x-momentum should be: A0=5 [m·gamma·beta] (this is shown unitless in the right vertical axis, momentum plotted in green discontinuous lines) maximum y-momuentum should be: A0^2/2=12.5

Here I show with Yee method:

plot1 plot2 plot3 plot4

Here I show with Lehe method:

plota plotb plotd plotc

Yee solver is in accordance with analytical results. Lehe solver shows more y-momentum (16 vs 12.5) making the particle to reach further away (6.5 microns vs 5 microns) x- momentum and amplitude in both metods are according to analytical result. The only differences between both simulations' .param and .cfg are this


diff -r 1Particle14sA5Lehe/input/include/picongpu/param/ 1Pfoil14sLARGE/input/include/picongpu/param/
diff -r 1Particle14sA5Lehe/input/include/picongpu/param/density.param 1Pfoil14sLARGE/input/include/picongpu/param/density.param
67c67
<                 const pmacc::math::UInt64<DIM3> cell_start(264u, 120u, 0u);
---
>                 const pmacc::math::UInt64<DIM3> cell_start(512u, 120u, 0u);
Only in 1Particle14sA5Lehe/input/include/picongpu/param/: fieldSolver.param

diff -r 1Particle14sA5Lehe/tbg/submit.cfg 1Pfoil14sLARGE/tbg/submit.cfg
35c35
< TBG_devices_x=4
---
> TBG_devices_x=6
39,40c39,40
< TBG_gridSize="528 9216"
< TBG_steps="30000"
---
> TBG_gridSize="1024 9216"
> TBG_steps="80000"

Note that in both the particle starts at the same position in y, and the the different initial x position should matter as it is a plane wave. Thanks

sbastrakov commented 3 years ago

Hello @tomaslevyy , could you attach the whole set of .param files for this simulation?

sbastrakov commented 3 years ago

I suspect you are generating the field with what picongpu calls laser. However, it is only fully accurate for the standard Yee solver (regardless of absorbers). Then what you observe may be caused just by this fact. Now thinking of that, we should probably print a warning for such a combination at runtime. @steindev what do you think?

You have two ways of fully accurate laser setup with other field solvers:

tomaslevyy commented 3 years ago

Those are the .param

density.txt dimension.txt fieldAbsorber.txt fieldSolver.txt fileOutput.txt grid.txt laser.txt memory.txt particle.txt speciesDefinition.txt speciesInitialization.txt

Thanks!

sbastrakov commented 3 years ago

Yes, so you are comparing two simulations with slightly different lasers.

Note that of course the two field solvers in question would propagate the laser differently. And you are probably interested to see this effect for your test case.

However, here the laser itself is generated differently due to quirks of our internal implementation. With my suggestions above, you could eliminate this difference.

tomaslevyy commented 3 years ago

Perfect, thank you @sbastrakov

PrometheusPi commented 3 years ago

@sbastrakov and @steindev Could you please briefly comment on what differences (in the laser parameters) are to be expected if we use our laser implementation (based on the Yee solver) and use the Lehe solver instead?

sbastrakov commented 3 years ago

Tbh I am not sure how to evaluate it. It would just generate a somewhat similar, but different laser.