Appearance
MHD plumbing
| ID | Group | Milestone | Backends | Figure | Regression |
|---|---|---|---|---|---|
— (mhd/plumbing, M2-P1) | Ideal MHD | M2 (#41, P1) | CPU, FNL | no | — |
Case and scope
M2-P1 wired the ideal-MHD model through FLUME end to end: the input predicate (state width and names), the MHD conversions and fast magnetosonic speed, the per-model kernel instances, the initial- and boundary-condition keys and the wall rule, the outputs and the restart. The leg checks that plumbing, for both variants divergence_control = none (glm (
- time step: one step of the unperturbed uniform state (
). The step must equal , with the fast speed computed by the oracle independently of the Fortran; under GLM it is bounded by , the active bound here (M2-P4); - auxiliary fields: the saved MHD auxiliaries equal the values recomputed from the saved conservative fields;
- restart: 5 steps, a restart and 5 more steps of the seeded (
) state equal the continuous 10-step run bit for bit, the residual and conservation histories byte for byte, and every model variable ( bx,by,bz[,psi]) is saved; - refusals (variant
none): an unknowndivergence_controlandisentropic-vortexwith MHD stop with their error messages.
What the case catches: a wrong fast-speed formula, a wrong
The retired zero-residual legs
At M2-P1 the MHD face fluxes did not exist yet, so the residual was exactly zero and the leg also required constant integrals and 10 steps equal to 1 step. Since M2-P3 the face fluxes are live and those legs are retired; the exact steady state is checked by MV-2 (zero field, uniform state, bitwise). The oracle's module docstring still describes the P1 state ("no face fluxes yet"); its --static mode is no longer called by check.sh.
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | ideal MHD, none ( | models; initialize, adam_flume_physics_object.F90 |
| GLM | glm_alpha = 0.18, glm_damping_length = 1, glm_ch_check = warning | models; adam_flume_mhd_object.F90 |
| Space | WENO5 (weno-u-5) flux splitting on characteristic variables | compute_residuals_weno, adam_flume_cpu_object.F90; mhd_face_split_fluxes, mhd_glm_face_split_fluxes, adam_flume_mhd_library.F90 |
| Time step | $\mathrm{CFL} / \max \sum_d ( | u_d |
| Time | SSP Runge–Kutta, 3 stages, CFL 0.8 | adam_rk_object.F90 |
| Auxiliary fields | compute_q_aux, adam_flume_cpu_object.F90; mhd_conservative_to_auxiliary, adam_flume_mhd_library.F90; models | |
| Output and restart | HDF5 checkpoints; restart files | save_xh5f, save_restart_files, load_restart_files, adam_flume_common_object.F90 |
| Refusals | unknown divergence_control; isentropic-vortex requires euler | load_from_file, adam_flume_mhd_object.F90, adam_flume_ic_object.F90 |
| Boundaries | extrapolation, wall-inviscid, inflow (with | adam_flume_bc_object.F90; boundary conditions |
| FNL backend | the same kernels on the device | adam_flume_fnl_object.F90 |
Initial and boundary conditions
| Item | Value |
|---|---|
| Domain | |
| Grid | octree, two uniform levels (iu_ref_levels = 2): 64 blocks of ngc = 3 (both ranks own blocks, so the restart check is meaningful) |
| Ranks | 2 |
| Initial condition | uniform: |
| Boundaries | extrapolation; wall-inviscid; inflow with the region state; extrapolation |
| Steps | dt check 1; auxiliary check 10; restart check 5 + 5 against 10 |
| Check | Variant (leg) | Change | Expected |
|---|---|---|---|
| dt | none, glm | it_max = 1 | step 1 equals the oracle's dt to |
| aux | none, glm | — | auxiliaries equal the recomputed ones to |
| restart | none, glm | restart_save = 5, then restart = .true. | bitwise fields, identical histories, model variables saved |
| refused | none | divergence_control = bogus | unknown [mhd].(divergence_control) "bogus" |
| refused | none | type = isentropic-vortex | isentropic-vortex requires [physics].(physical_model) = euler |
Input files
| File | Role |
|---|---|
src/tests/flume/verification/mhd/plumbing/mhd-uniform-none.ini | the case, divergence_control = none |
src/tests/flume/verification/mhd/plumbing/mhd-uniform-glm.ini | the case, divergence_control = glm |
src/tests/flume/verification/mhd/plumbing/check.sh | runs every leg (--np N, --build, --legs LIST: none, glm, refused; FLUME_EXE selects the backend); a leg is a variant, none and glm each run the dt, aux and restart checks |
src/tests/flume/verification/mhd/plumbing/mhd_plumbing_oracle.py | --dt, --aux, --compare; also --zero and --steady used by MV-2 |
bash
cd src/tests/flume/verification/mhd/plumbing && ./check.sh # CPU
FLUME_EXE=$PWD/../../../../../../exe/adam_flume_fnl ./check.sh # FNLResults
A contract leg: no figure. The work directories of both backends are kept (plumbing/work-adam_flume_{cpu,fnl}-np2-*), with their logs and histories; the checkpoints are deleted, and the oracle's printed lines are not kept. The table quotes what those files still show:
| Check | Bound | CPU | FNL |
|---|---|---|---|
dt of step 1, none (history *-dt) | oracle | the same digits | |
dt of step 1, glm: the | oracle | the same digits | |
restart: residual and conservation histories against the continuous run (*-A vs *-B, cmp) | byte-identical | identical, both variants | identical, both variants |
| auxiliary fields against the recomputed ones | not kept | not kept | |
| restart: interior fields, every variable, model variables present | bitwise | not kept | not kept |
unknown divergence_control | refused | unknown [mhd].(divergence_control) "bogus"; expected one of glm, none | the same |
isentropic-vortex with MHD | refused | [initial_conditions].(type) = isentropic-vortex requires [physics].(physical_model) = euler | the same |
The dt oracle values are recomputed from the oracle's formula and the input; the measured values are the step-1 rows of the kept conservation histories.
Related cases: zero field (MV-2) took over the exact-steady-state legs; GLM divergence cleaning verifies the
Findings
- The fast-speed time step agrees with the independent textbook formula to one ulp on both backends, and the GLM step is set by
, so a missing from the time step would fail the leg. - The restart reproduces the continuous run's histories byte for byte on both backends and both variants.
- The work directories
*-none-Cand*-glm-C(dated before the others) belong to the retired "10 steps = 1 step" leg;check.shno longer writes them. - The auxiliary and bitwise-field verdicts rest on the
check.shrun; the checkpoints they read are deleted after the oracle, so this page cannot re-derive them.