ECP-WarpX / WarpX

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

Density jump in cylindrical RZ simulations #4700

Open jhornung-gh opened 8 months ago

jhornung-gh commented 8 months ago

Hello,

I am completely new to cylindrical PIC simulations and I have an issue with the density profile around r = 0. Maybe this is a known Issue and you can quickly give me some advise on how to resolve it.

I see an increased density peak around r =0 which is more than one order of magnitude higher than the surrounding density (see following image). I attached a zoom-in on the electron density for different modes (0 and 1, in this order) at a timestep of 20000, however this feature, desipte a lower amplitude, is already visible at timestep 0.

e_dens_0_20000 e_dens_1_20000

The figures were generated using the openpmd-viewer with a resolution in radial direction of 94 nm and a total of 32 particles per cell (num_particles_per_cell_each_dim = 2 8 2)

Increasing the particle number and reducing the resolution in r-direction did not resolve the issue and I don't see this feature in the electric field. Could it be an issue with the boundary conditions? I also attached you the input file for this simulation.

example.txt

Thank you very much!

aveksler1 commented 8 months ago

Hi,

By how much did you increase the particles per cell? Cylindrical RZ simulations are prone to noise near the r=0 axis. I've typically had to run simulations with PPC's > 300 to see reduction in the noise, but I have never been able to eliminate the issue completely.

jhornung-gh commented 8 months ago

Hi, thank you for your response! We only increased it by a factor of 2, going to 300 ppc would make the simulation way to heavy. Do you know if it strongly influences the reliability of the simulation, especially with respect to the resultings particle spectra?

aveksler1 commented 8 months ago

@jhornung-gh In my particular case no, but I cannot speak past that, sorry. Maybe you could try to increase PPC by a factor of 2/4/8/... and seeing if your results are converged?