-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEL simulation in the boosted frame #4861
Comments
Hi. You seem to be doing the Lorentz Transform of the undulator field by hand, which is not needed I think with WarpX. Let me check tomorrow with the team. |
@rl3418 Also: I tried to quickly estimate the expected microbunching wavelength. This seems roughly consistent with the wavelength of the small-amplitude density modulation seen in the orange curve. So my impression is that that the WarpX simulation starts to show (sinusoidal) microbunching. But again, I am not sure what the sharper, shorter-wavelength modulations in the Osiris simulations correspond to, physically. Does this make sense? |
Hi. I see that you are actually doing the Lorentz Transform of all quantities by hand rather than relying on WarpX doing this automatically for you, which is the preferred way. and setting every quantity, e.g., beam density, length and velocity, and the undulator field, in the lab frame, then use back-transformed diagnostics (see https://warpx.readthedocs.io/en/latest/usage/parameters.html#backtransformed-diagnostics) to get the data back-transformed automatically from the boosted frame of simulation to the lab frame. You can also read more about how boosted frame simulations work under the hood from the theory section: https://warpx.readthedocs.io/en/latest/theory/boosted_frame.html# Let us know if you have questions about that. |
Thanks for the reply, I'll try the warpx.gamma_boost parameter then. I think your calculation is correct. The radiation wavelength is about 1.8e-5 m. I'm just trying to do a scan to see if the FEL gain length from the boosted frame simulations agree with the theoretical prediction. The modulation in the Osiris simulations does seem a bit unphysical, which is why I moved to the WarpX in the first place. I originally thought that the beam is just reaching the saturation level very fast. |
Does dt and dx transform to dt'=dt*gamma*(1+beta) and dz'=dz*gamma*(1+beta) when the warpx.gamma_boost parameter is specified? Also, does warpx transform the <species_name>.zinject_plane automatically as well? |
Seems like the time step is taken to be warpx.const_dt. Is this supposed to specified in the boosted frame? |
Yes, correct. We transform all input parameters from lab to boosted frame automatically, to make WarpX easy to use in the boosted frame.
I would suggest to use the CFL option |
I'm trying to do a 1D simulation of an gamma=200 beam travelling through an undulator. I transformed everything to a frame with gamma_f=50 an performed a simulation in that frame. The results I obtained from WarpX is very different compared to OSIRIS. I have attached to input file I used and a comparison of the density evolution in the boosted frame.
200_50.txt
The text was updated successfully, but these errors were encountered: