Open bzdjordje opened 2 years ago
Thanks! Is this only a problem in 2D (but conserved in 3D)?
I have only tried this in 2D since it's for an ion acceleration application, but I can check in 3D as well.
Thanks for reporting this @bzdjordje Could you also post the script that you used in order to compute the energy? Also: in which units is the energy that you quote on the plots?
Note that the formulas are defined here
In principle, this should always have the same energy (as beta
changes - at least in 3D), but this formula does make a number of approximation, including the paraxial approximation, and it assumes that the longitudinal field (Ez
) is negligible in the total energy.
Well, actually, I had a look at the code, and it looks like my comment above is incorrect: the current code does not preserve the energy. @bzdjordje Would you be able to try the code here: https://github.com/ECP-WarpX/WarpX/pull/3054 and to recompile and rerun your test?
Modifying just the PFT beta with a sweep of values -0.4e-15, -0.2e-15, 0, 0.2e-15, 0.4e-15 seems to increase the laser energy away from the baseline Gaussian mode, while I believe it should remain constant. The field energy corresponds to the maximum field energy in the simulation box using reduced diagnostics. @MaxThevenet @RemiLehe
input_pft.txt