ECP-WarpX / WarpX

WarpX is an advanced electromagnetic & electrostatic Particle-In-Cell code.
https://ecp-warpx.github.io
Other
310 stars 196 forks source link

Unstable Galilean LWFA simulation in 3D #1011

Open RemiLehe opened 4 years ago

RemiLehe commented 4 years ago

I have an LWFA case in the boosted frame, with the PSATD Galilean scheme, which seems to be unstable in 3D but stable in 2D. There is probably a bug, so I am attaching some info about this:

MaxThevenet commented 4 years ago

Thanks @RemiLehe for reporting this, I will try to investigate soon.

RemiLehe commented 4 years ago

Note: I also tried to simulate the same case with FBPIC, using the Galilean frame (and 3 azimuthal modes) and did not see an instability:

Screen Shot 2020-05-12 at 9 02 41 PM

(The modulation of the field along z is due to the fact that the laser driver focuses and defocuses alternatively in the plasma channel, which leads to this pattern in the boosted frame.)

Here is the script: fbpic_script.py.txt

LDAmorim commented 4 years ago

Hi @RemiLehe , Could you please share the bash scripts on Summit? So I can reproduce the issue with the same parallelization (I learned with my last one that that could play a role sometimes - although probably not in this one). Thanks

RemiLehe commented 4 years ago

Of course! Here is the submission script that I used: submission_script.txt (The 2D and 3D simulations were submitted in the same way: both on 1 node, i.e. 6 GPUs)

LDAmorim commented 4 years ago

Thanks!!

LDAmorim commented 4 years ago

Hi again, Sorry that I took a while, but I finally got to compare the 2D and 3D runs with the inputs @RemiLehe shared in this issue. I got the same results:

3D run: image

2D run: image

The time step is the same so both plots should correspond to the same time. Also it seems that in 3D this instability started after: image

At which point both runs seem to agree: image

Cheers, Diana

MaxThevenet commented 4 years ago

The problem seems to be due to transverse boundary conditions. Replacing

geometry.is_periodic = 0 0 0

with

geometry.is_periodic = 1 1 0

in the 3D input file above seems to remove the instability, see image below. There could be a joke in the PSATD, e.g., some guard cells would have to be reset to 0 at every iteration.

diag_Ex_yt_01000

LDAmorim commented 4 years ago

Thanks for finding the issue @MaxThevenet and @jlvay !

Small update: Testing the input that Rémi shared initially but with geometry.is_periodic = 1 1 0 indeed showed correct fields and particle distribution.

image