Closed berceanu closed 3 years ago
I see the same issue in the LWFA + ionization example.
For comparison, here is the full rho
field:
Thanks for reporting this issue.
Regarding 1. (positive value): this is in fact somewhat expected. The reason is that the charge density that is written to the file is smoothed by default (so that it looks a bit less noisy). Because of the specific way in which it is smoothed (spectral filter in the Fourier-Bessel space), this can result to slightly positive value, especially near sharp gradients. (e.g. in your case, the positive values seem to appear near the sharp radial edges of the plasma)
Regarding 2. (values that do not match the expected physical values): this is unexpected. Are you maybe running boosted-frame simulation in this case? Would you be willing to share an input script that reproduces this issue?
Hi Remi, thanks for your reply!
Regarding 2. (values that do not match the expected physical values): this is unexpected. Are you maybe running boosted-frame simulation in this case? Would you be willing to share an input script that reproduces this issue?
Well, I see that for the ionization example script there doesn't seem to be an issue.
The density of elec
electrons (species "electrons"
) is n_e = 7.e24
.
rho, rho_info = ts.get_field(
field="rho_electrons",
iteration=200,
plot=True,
)
print(rho.min()) # -1193713.527295697
# close to 1, as expected
print(rho.min() / (-q_e * n_e)) # 1.064367696329484
rho_electrons
contain positive values? According to the docs, it is thei.e. the density of the plasma electrons in this case.
HDF5
file, it is measured in C/m^3, so shouldn't I get 1 if I divide it by(-q_e * n_e)
? Instead, I getrho_electrons.min() / (-q_e * n_e) = 0.08681711041436878
Relevant code bits: