osiris-code / osiris

OSIRIS Particle-In-Cell code
GNU Affero General Public License v3.0
42 stars 6 forks source link

unphysical divergence for an electron beam propagating in free space #5

Closed rl3418 closed 11 months ago

rl3418 commented 11 months ago

Osiris predicted unphysical divergence for an electron beam travelling in free space with gamma=200, n_e~1e20m-3. The momentum along the propagation direction drops rapidly to zero, but for a relativistic beam the longitudinal momentum shouldn't change by much. I performed the same simulations using Smilei. According to Smilei the longitudinal momentum doesn't drop by much, which is exactly what I expect.

I've attached the results I got from Osiris and Smilei. Under the Osiris folder you could also find information about the libraries I used to compile Osiris.

potential bug with osiris.zip

ricardo-fonseca commented 11 months ago

By default, OSIRIS assumes that you are initializing your simulation with a self-consistent field distribution, which is not the case for your input file. This leads to the formation of non-physical EM fields, that will eventually break up your beam. I would recommend that you check the documentation on how to initialize the beam fields properly. You should also use the moving window along x, not y.