Appearance
MHD with a zero field
| ID | Group | Milestone | Backends | Figure | Regression |
|---|---|---|---|---|---|
| MV-2 | Ideal MHD | M2 (#41, P3) | CPU, FNL | no | uniform-amr-mhd |
Case and scope
The MHD face kernels (the physical_model = mhd-ideal. With divergence_control = none and glm, run two legs:
- Sod along
, , through the MHD path: against the exact Riemann solution within the M1 bound of V1; the and runs equal the run bit for bit after the permutation of the axes; (and ) stay exactly zero; - a uniform MHD state (
, , and all non-zero) on the periodic box of V3: - single level: the last checkpoint equals the step-0 state bit for bit (the MHD fluxes of equal states cancel);
- with the 2:1 refined octant: equal to round-off,
relative.
What the case catches: an MHD kernel that does not reduce to Euler at
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | ideal MHD, make_input.py) | models |
| Space | WENO5 (weno-u-5) flux splitting on characteristic variables; the 7×7 Roe–Balsara core at the arithmetic face average | compute_residuals_weno, adam_flume_cpu_object.F90; mhd_face_average, mhd_eigenvectors, mhd_face_split_fluxes, mhd_glm_face_split_fluxes, adam_flume_mhd_library.F90; numerics |
| Cleaning | none, or GLM with glm_alpha = 0.18, glm_damping_length = 1, glm_ch_check = warning | models; add_glm_damping, adam_flume_cpu_mhd_glm_kernels.F90 |
| Time | SSP Runge–Kutta, 3 stages, CFL 0.5 | adam_rk_object.F90 |
| AMR (uniform, AMR leg) | geometric box marker on the octant; 2:1 ghost restriction and interpolation; reflux | mark_by_geometry, adam_flume_common_object.F90; interp_seam_ghost, adam_field_object.F90; boundary conditions |
| Boundaries | Sod: extrapolation; uniform: periodic | boundary conditions, periodic |
| FNL backend | the same kernels on the device | adam_flume_fnl_object.F90 |
Initial and boundary conditions
Every input is derived from a committed Euler input by make_input.py: physical_model = mhd-ideal, an [mhd] section, none) or 9 (glm), and bx, by, bz added to every region and inflow state.
| Leg | Base input | Grid | State | Boundaries | Steps |
|---|---|---|---|---|---|
| Sod | sod/sod-{x,y,z}.ini | as V1: 64 blocks of | riemann-problem: | extrapolation | none, 241 steps glm: the |
| uniform, single | conservation/amr-periodic.ini, markers_number = 0 | uniform, | periodic | 10 | |
| uniform, AMR | conservation/amr-periodic.ini | the octant | the same | periodic | 10 |
Ranks: 2 in every leg.
Input files
| File | Role |
|---|---|
src/tests/flume/verification/mhd/zero-field/make_input.py | derives the MHD input from an Euler one (--divergence-control, --b, --set section.key=value) |
src/tests/flume/verification/sod/sod-{x,y,z}.ini | the Sod base inputs |
src/tests/flume/verification/conservation/amr-periodic.ini | the V3 base input of the uniform legs |
src/tests/flume/verification/mhd/zero-field/check.sh | runs every leg (--np N, --legs LIST: mv2-sod, mv2-uniform; FLUME_EXE selects the backend) |
src/tests/flume/verification/sod/sod_oracle.py | --l1-max 3.31e-03), the |
src/tests/flume/verification/mhd/plumbing/mhd_plumbing_oracle.py | --zero (--steady (last checkpoint against step 0) |
bash
cd src/tests/flume/verification/mhd/zero-field && ./check.sh # CPU
FLUME_EXE=$PWD/../../../../../../exe/adam_flume_fnl ./check.sh # FNLResults
A contract leg: no figure. Work directories of both backends are kept (zero-field/work-adam_flume_{cpu,fnl}-np2-*) with logs and histories; the checkpoints are deleted after the oracles and the oracle lines are not kept, so the cell-level verdicts below rest on the check.sh run. The values quoted are read from the kept histories:
| Check | Bound | CPU | FNL |
|---|---|---|---|
| Sod, | not kept | not kept | |
| Sod, | bitwise | not kept | not kept |
| Sod, | exactly zero | not kept; glm div(B) history is 0 at every step | the same |
| uniform, single level: last against step-0 checkpoint | bitwise | not kept; every volume integral constant to the printed digit, | the same |
| uniform, 2:1 octant: last against step-0 checkpoint | not kept; integrals constant to the printed digit, | integrals constant, |
The regression case uniform-amr-mhd freezes the uniform AMR leg (GLM, 10 steps; regression/run.sh).
Related cases: MHD plumbing checks the time step, outputs and restart of the same model; Sod shock tube is the Euler reference; Ryu–Jones 2a (MV-4) is the first test with a non-zero field; conservation across AMR seams (V3) is the base of the uniform legs and MHD conservation (MV-11) its MHD counterpart.
Findings
- The Sod legs are not bitwise against the Euler path: at
the MHD eigenspaces are degenerate and WENO acts in a different characteristic basis, so the expectation is the V1 accuracy bound, not equality. - The uniform state across the 2:1 patch is exact only to round-off. The cause is the interface, not the MHD kernels: the coarse–fine ghost fill reproduces a constant only to round-off for general values, and the Euler path does the same (a uniform Euler state with
drifts by on this grid, while the committed all-ones state happens to be exact; check.shheader). - The work directories
*-none-uniformand*-glm-uniform(CPU, dated before the others) predate the single/AMR split;check.shno longer writes them.