Summary
Commit b603cbb (PR #6617) changed the default behavior of split_momentum_push for simulations using embedded boundaries (EB), causing catastrophic energy non-conservation when running the semi-implicit electrostatic solver (warpx_effective_potential=True) with DSMCCollisions.
Affected configuration
- Solver:
ElectrostaticSolver, method='Multigrid', warpx_effective_potential=True (SIPIC)
- Collisions:
DSMCCollisions
- Geometry: 3D Cartesian with embedded boundary (
EB::enabled() == true)
- Evolve scheme: Explicit
- Build: 3D, CUDA, double precision, MPI
Root cause
In Source/WarpX.cpp::ReadParameters(), PR #6617 changed:
// Before (working)
if (evolve_scheme == EvolveScheme::Explicit && !EB::enabled()) {
m_collisions_split_momentum_push = true;
}
// After (broken)
if (evolve_scheme == EvolveScheme::Explicit) {
m_collisions_split_momentum_push = true;
}
Since warpx_effective_potential uses EvolveScheme::Explicit, the new condition evaluates to true for SIPIC+EB runs. Before this commit, !EB::enabled() blocked split_momentum_push from activating. After this commit, it is enabled by default for all explicit+EB simulations with collisions, without any user-facing warning.
The mid-v push is not compatible with the SIPIC effective potential solver: splitting the Boris push and scattering particle velocities mid-step via DSMC breaks the energy consistency that the semi-implicit field solve relies upon.
Bisection
| Commit |
Description |
Energy conserved? |
58f84cf |
Replace WARPX_PROFILE with ABLASTR_PROFILE |
✅ Yes |
b603cbb |
Enable mid-v push with embedded boundaries (#6617) |
❌ No |
Observed symptoms
1. Silent energy drain (0–15 µs): total energy decays ~4× faster than in the working commit.
2. Catastrophic energy spike at ~18 µs: total energy increases from ~4.5×10⁴ J to ~9.2×10⁵ J (20× the initial value), predominantly in electrons.
Part_energy.txt — working commit (58f84cf):
step time(s) total(J) ions(J) electrons(J)
0 0.000e+00 4.7603e+04 2.3983e+04 2.3620e+04
7490 7.490e-06 4.7243e+04 2.3928e+04 2.3314e+04
14980 1.498e-05 4.7105e+04 2.3821e+04 2.3283e+04
20972 2.097e-05 4.7020e+04 2.3752e+04 2.3267e+04
Part_energy.txt — broken commit (b603cbb):
step time(s) total(J) ions(J) electrons(J)
0 0.000e+00 4.7601e+04 2.3982e+04 2.3619e+04
7490 7.490e-06 4.6269e+04 2.3935e+04 2.2334e+04
14980 1.498e-05 4.5437e+04 2.3742e+04 2.1693e+04
17227 1.723e-05 4.7535e+04 2.3866e+04 2.3668e+04 <- sudden jump
17976 1.798e-05 9.1887e+05 1.7563e+05 7.4323e+05 <- catastrophic spike
Throughput also drops from 1.65 steps/s (58f84cf) to 1.43 steps/s (b603cbb), consistent with the extra particle push kernel being active.
Workaround
Add to simulation inputs before WarpX initialization:
sys.argv += ['collisions.split_momentum_push=0']
Suggested fix
Restore the !EB::enabled() guard until split_momentum_push is validated for EB, or add an explicit check blocking split_momentum_push when warpx_effective_potential=True:
if (evolve_scheme == EvolveScheme::Explicit && !warpx_effective_potential) {
m_collisions_split_momentum_push = true;
}
Alternatively, emit a warning and force split_momentum_push=false when both EB and warpx_effective_potential are active.
Reported by
Ales Necas
Summary
Commit
b603cbb(PR #6617) changed the default behavior ofsplit_momentum_pushfor simulations using embedded boundaries (EB), causing catastrophic energy non-conservation when running the semi-implicit electrostatic solver (warpx_effective_potential=True) withDSMCCollisions.Affected configuration
ElectrostaticSolver,method='Multigrid',warpx_effective_potential=True(SIPIC)DSMCCollisionsEB::enabled() == true)Root cause
In
Source/WarpX.cpp::ReadParameters(), PR #6617 changed:Since
warpx_effective_potentialusesEvolveScheme::Explicit, the new condition evaluates totruefor SIPIC+EB runs. Before this commit,!EB::enabled()blockedsplit_momentum_pushfrom activating. After this commit, it is enabled by default for all explicit+EB simulations with collisions, without any user-facing warning.The mid-v push is not compatible with the SIPIC effective potential solver: splitting the Boris push and scattering particle velocities mid-step via DSMC breaks the energy consistency that the semi-implicit field solve relies upon.
Bisection
58f84cfb603cbbObserved symptoms
1. Silent energy drain (0–15 µs): total energy decays ~4× faster than in the working commit.
2. Catastrophic energy spike at ~18 µs: total energy increases from ~4.5×10⁴ J to ~9.2×10⁵ J (20× the initial value), predominantly in electrons.
Part_energy.txt — working commit (
58f84cf):Part_energy.txt — broken commit (
b603cbb):Throughput also drops from 1.65 steps/s (
58f84cf) to 1.43 steps/s (b603cbb), consistent with the extra particle push kernel being active.Workaround
Add to simulation inputs before WarpX initialization:
Suggested fix
Restore the
!EB::enabled()guard untilsplit_momentum_pushis validated for EB, or add an explicit check blockingsplit_momentum_pushwhenwarpx_effective_potential=True:Alternatively, emit a warning and force
split_momentum_push=falsewhen both EB andwarpx_effective_potentialare active.Reported by
Ales Necas