Appearance
EGLM cleaning
| ID | Group | Milestone | Backends | Figure | Regression |
|---|---|---|---|---|---|
| EV-2, EV-3, EV-4 | Ideal MHD | M3 (#47, M3-P4) | CPU, FNL | yes | orszag-tang-eglm |
Case and scope
The energy-consistent cleaning (divergence_control = eglm, Derigs et al. 2018) puts
in the order --divergence-control eglm option of the glm-pulse, Orszag–Tang and linear-wave scripts, and rj2a/check.sh compares EGLM with GLM:
- EV-2: the GLM pulse against the telegraph solution, which EGLM shares with
in field units (the oracle compares ). It catches a wrong EGLM cleaning block or damping; - EV-3: Ryu–Jones 2a, EGLM against GLM. With
the EGLM energy coupling and sources vanish, so the runs must agree bitwise on the 8 shared variables: it catches a source or an energy term that does not vanish; - EV-4: Orszag–Tang, the drifts bounded by their sources, and the 180° symmetry. It catches a source with a wrong magnitude or sign;
- MV-5 under EGLM: the linear-wave orders;
- the Balsara–Spicer blast without limiter and floors, the case EGLM was expected to help.
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | ideal MHD with EGLM, | models; mhd_eglm_conservative_to_auxiliary, mhd_eglm_eigenvectors, mhd_eglm_flux, adam_flume_mhd_library.F90 |
| Space, splitting | WENO5 flux splitting on characteristic variables | mhd_eglm_face_split_fluxes, adam_flume_mhd_library.F90 |
Space, weno-riemann | HLLD, characteristic interpolation (and primitive on the blast) | mhd_eglm_riemann_hlld, adam_flume_mhd_riemann_library.F90 |
| Sources and damping | the nonconservative sources above; the damped cleaning energy becomes heat | add_eglm_sources, add_glm_damping, adam_flume_cpu_mhd_eglm_kernels.F90 |
| Time, boundaries | as in each verification (SSP-33 for the pulse and Ryu–Jones 2a, SSP-54 for Orszag–Tang, the waves and the blast) | adam_rk_object.F90 |
| FNL backend | the same kernels on the device | adam_flume_fnl_mhd_eglm_kernels.F90, adam_flume_fnl_object.F90 |
Initial and boundary conditions
| Leg | Setup |
|---|---|
| EV-2 | the MV-3 legs of GLM cleaning (d'Alembert and damped at min-cell, walls) at pulse amplitude |
| EV-3 | Ryu–Jones 2a, glm_ch = 2.0, glm_alpha = 0.18 |
| EV-4 | Orszag–Tang, |
| MV-5 under EGLM | the MV-5 ladders of order of accuracy, |
| Blast | Balsara–Spicer, |
Input files
| File | Role |
|---|---|
src/tests/flume/verification/mhd/glm-pulse/check.sh --divergence-control eglm | EV-2 |
src/tests/flume/verification/mhd/rj2a/check.sh | EV-3 (the EGLM leg ev3, which needs mv4, is part of the default run) |
src/tests/flume/verification/mhd/orszag-tang/check.sh --divergence-control eglm | EV-4 and the symmetry |
src/tests/flume/verification/mhd/eglm_conservation_oracle.py | the EV-4 drift bounds |
src/tests/flume/verification/mhd/linear-wave/check.sh --divergence-control eglm | MV-5 under EGLM |
src/tests/flume/verification/mhd/positivity-probe/make_blast.py --eglm | the blast input |
src/tests/flume/verification/make_doc_figures.py fig_eglm_energy | draws eglm-energy.png from the conservation histories of the orszag-tang work directories (--only eglm-energy) |
bash
cd src/tests/flume/verification/mhd
glm-pulse/check.sh --divergence-control eglm # EV-2
orszag-tang/check.sh --divergence-control eglm [--numerics hlld] # EV-4, symmetry
linear-wave/check.sh --divergence-control eglm [--numerics hlld] # MV-5 under EGLM
rj2a/check.sh [--numerics hlld] # EV-3 (EGLM leg)Results

The total energy of the periodic Orszag–Tang box,
Measured in issue #47, M3-P4; CPU and FNL agree to the printed digits unless a cell says otherwise:
| Check | Bound | Splitting | HLLD characteristic |
|---|---|---|---|
| EV-2, pulse against the telegraph solution (amplitude | — | ||
| EV-2, | — | ||
| EV-3, Ryu–Jones 2a, EGLM against GLM | bitwise (splitting); --numerics) | bitwise, | |
| EV-4, Orszag–Tang: | round-off; | 0; | |
| Orszag–Tang symmetry at step 100 / at | |||
| linear waves, observed order | 4.96–4.98 | 4.96–4.97 | |
| Balsara–Spicer blast ( | — | non-positive pressure at step 3 | reaches |
The EV-2 legs at 64 and 128 cells, min-cell and walls have their own bounds (CPU M3-P4c + 2%: min-cellhlld:characteristic.
Related cases: GLM cleaning is the GLM version of EV-2; Orszag–Tang the GLM version of EV-4; positivity limiter makes the splitting scheme run the blast; G3b handles the EGLM reflux at 2:1 seams.
Findings
- EV-2 runs at amplitude
because EGLM couples the pair to the fluid: the damped cleaning energy becomes heat, the heat drives a flow, and the source moves . At the GLM amplitude 0.1 this floors the damped legs at a relative of (against for GLM); at EGLM equals GLM to 3 digits (relative both, on the damped leg at 256), so the telegraph oracle is exact for EGLM there. The drift scales as the amplitude cubed. - EV-4 asserts
to round-off and bounds every other drift, at every step, by twice the time integral of its source magnitude: (momentum), ( ), (energy). It is a necessary bound, not a tight one: the signed sources largely cancel (energy drift of its bound; and , where the 180° symmetry cancels their sources). - The symmetry defect is round-off amplified by the flow, more by the EGLM sources on the splitting scheme (
against for GLM at ), so it is checked at step 100 within and at the end within , as for the rotor. - On the blast HLLD with primitive interpolation also reaches
; the splitting scheme needs the positivity limiter (M3-P5). --amris not combined with EGLM inorszag-tang/check.sh: the EGLM sources at 2:1 seams are out of scope there.