WarpX
WarpX copied to clipboard
exponential growth of electric field energy in CI test
I ran the 2d_particle_thermal_boundary CI test for 15 times longer and I observed an exponential increase in the electric field energy. See the image below.
The input deck is here: Examples/Tests/particle_thermal_boundary/inputs_test_2d_particle_thermal_boundary
This test is a thermal e-C12 plasma with a temperature of 2 keV in a 2D box. The field BCs are PML at all boundaries. The particle BCs are thermal at all boundaries.
The fact that the magnetic field energy does not grow suggests that this problem may be related to lack of charge conservation. Below is a summary of the charge conservation from this test at the last time step. Charge is not conserved near the boundaires.
WarpX uses filtering by default. If filtering is turned off, the system goes unstable faster and the charge density at an early time looks as follows
These simulations use 4 boxes on 4 processors. There is a diagnostic issue at the box corners that touch the boundaries. Ignoring that, there seems to still be a lack of charge conservation in the first cell near the boundary.
I've looked into how rho/J are set at the boundaries and I found several bugs. Below is a comparison of the electric field energy for this problem obtained from the development branch and using PR #5909 that address the boundary bugs. The electric field energy still blows up eventually, but the growth is slower with the bugs fixed. As @RemiLehe mentioned during the weekly meeting, there still seems to be an issue with charges near PML boundaries.
The boundary bugs in the development branch are that rho/J deposited into the guard region is not appropriately reflected back into the domain at domain corners that touch multiple PMC/PEC boundaries.
With these fixes, the charge density (with filtering on) looks as follows:
These plots show charge is conserved everywhere except for the cells that touch the domain boundaries. This is because the normal electric field in the guard cell and the tangential electric field along the domain boundaries are computed using the PML routine. This electric field is not the same as that which would be consistent with the assumed symmetry BC used for the particles and J/rho.