Appearance
Order of accuracy: linear waves, CPAW, magnetised vortex
| ID | Group | Milestone | Backends | Figure | Regression |
|---|---|---|---|---|---|
| MV-5, MV-6, MV-7 | Ideal MHD | M2 (#41) | CPU, FNL | yes | — |
Case and scope
Three smooth problems whose exact solution after one period (or one crossing) is the initial state, so every smooth-flow ingredient (eigen-decomposition, WENO5 characteristic reconstruction, fluxes, periodic ghost fill, time integration) is measured against an exact answer:
- MV-5, linear waves (Stone et al. 2008, section 8.2): a small-amplitude eigenmode per family (fast, Alfvén, slow, entropy), 1-D along
and 2-D inclined. It catches a wrong eigenvector or a family-specific loss of order. - MV-6, circularly polarised Alfvén wave (Tóth 2000): an exact nonlinear solution at any amplitude. At
it exercises the WENO nonlinear weights, which the linear waves leave at their linear values. Left and right polarisations are mirror images under , so their errors must be equal bitwise (rounding is symmetric under a sign change). - MV-7, magnetised vortex (Balsara 2004): a steady 2-D equilibrium of pressure, centrifugal force, magnetic tension and magnetic pressure convected by the free stream, with every variable varying in both directions and a divergence-free field. It checks the
and order and that stays at truncation level.
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | ideal MHD, | models |
| Space | WENO5 flux splitting on characteristic variables (all three); weno-riemann HLLD under --numerics (MV-5, MV-6) | mhd_face_split_fluxes, mhd_eigenvectors, adam_flume_mhd_library.F90; numerics |
| Divergence control | MV-5, MV-6: none (MV-5 also GLM or EGLM with --divergence-control, glm_alpha = 0.18, glm_damping_length = 1.0 | models |
| div(B) operator (MV-7) | second-order centred difference (fdv_order = 2) | compute_divb_history, adam_flume_cpu_object.F90 |
| Time | SSP Runge–Kutta, 5 stages order 4 (runge-kutta-ssp-54); CFL 0.1 (MV-5, MV-6: the spatial error dominates), 0.4 (MV-7: errors equal to 4–5 digits at 0.1) | adam_rk_object.F90; numerics |
| Boundaries | periodic | boundary conditions |
| FNL backend | the same kernels on the device | adam_flume_fnl_object.F90 |
Initial and boundary conditions
| Leg | Domain and grid | Initial condition | Final time |
|---|---|---|---|
| MV-5, 1-D | mhd-linear-wave: | one period, | |
| MV-5, 2-D | the same | one period | |
| MV-6 | the MV-5 2-D grid, | mhd-cpaw: | |
| MV-7 | mhd-vortex: | one crossing, |
All legs: 2 ranks, periodic on the active axes.
Input files
| File | Role |
|---|---|
src/tests/flume/verification/mhd/linear-wave/make_linear_wave.py | writes the MV-5 input (--wave, --geometry 1d|2d, --cells, --amplitude, --divergence-control) |
src/tests/flume/verification/mhd/linear-wave/check.sh, linear_wave_oracle.py | MV-5: the error --numerics, --divergence-control, --legs LIST: mv5-1d, mv5-2d) |
src/tests/flume/verification/mhd/cpaw/make_cpaw.py | writes the MV-6 input (--polarisation, --geometry, --cells) |
src/tests/flume/verification/mhd/cpaw/check.sh, cpaw_oracle.py | MV-6: bounds, order, left = right (--numerics, --legs mv6) |
src/tests/flume/verification/mhd/vortex/make_mhd_vortex.py | writes the MV-7 input (--cells, --half-width, --cfl) |
src/tests/flume/verification/mhd/vortex/check.sh, mhd_vortex_oracle.py | MV-7: --legs mv7) |
src/tests/flume/verification/make_doc_runs.sh group order | the 1-D ladders 16/32/64 on the two schemes (24 runs) |
src/tests/flume/verification/make_doc_figures.py fig_order | draws linear-wave-order.png (--only order) |
bash
cd src/tests/flume/verification/mhd
linear-wave/check.sh # MV-5
cpaw/check.sh # MV-6
vortex/check.sh # MV-7 (about 40 min on the CPU, 31 of them at N = 256)
linear-wave/check.sh --numerics hlld # MV-5 on weno-riemannResults

The 1-D linear waves on 16, 32 and 64 cells per wavelength, splitting scheme and weno-riemann HLLD; the legend gives the orders of the two pairs.
| Test | Bound | CPU | FNL |
|---|---|---|---|
| MV-5, every family, observed order | hlld:primitive/hlld:characteristic | about 5: 4.96–4.97 from 16 to 32 cells (1-D); 4.96–5.02 on the asserted ladders | pass |
| MV-5, error of every run | per run, CPU baseline + 2% (e.g. 1-D fast | below | pass |
| MV-6, observed order on 32/64/128 | 4.89 and 4.99 | pass | |
| MV-6, | below | pass | |
| MV-6, left against right polarisation | bitwise (LR_TOL = 0) | bitwise | bitwise |
| MV-7, | below | pass | |
| MV-7, | below | pass | |
| MV-7, | 5.01 | pass | |
| MV-7, | 4.41 (pre-asymptotic: 3.41, 3.91, 4.41 on 32/64, 64/128, 128/256) | pass | |
| MV-7, | order | truncation level | pass |
| MV-7, initial checkpoint against the exact vortex | pass | pass |
FNL ran every ladder (work directories of both backends); the tables record the CPU values, and the backends agree to the printed digits.
Related cases: isentropic vortex is the Euler order test on the same grid; MHD on weno-riemann holds the orders of the HLLD runs; EGLM cleaning repeats MV-5 under EGLM; order across seams measures the order across 2:1 seams.
Findings
- Every linear-wave family converges at 4.96–4.97 from 16 to 32 cells. At 64 cells the error is
, six decades below the amplitude, and the round-off floor lowers the slow and entropy orders to 4.85: MV-5 asserts on the 16/32 pair (1-D) and on 32/64 (2-D) for that reason. - The amplitude is
, not the of Stone et al.: at the nonlinear error of the mode ( scales as at : at , at ) floors a fifth-order scheme already at –128, and below about the accumulated round-off floors it ( at ). At 2-D the slow and Alfvén waves reach the floor (orders 2.6 and 4.3 on 64/128). - With GLM or EGLM on MV-5,
sets the time step, so the errors differ from the nonebaseline (2-D slow wave 2.4×). - MV-7 runs GLM because with
nonethe discrete div(B) of the vortex grows exponentially at a rate proportional to: the run stops on a negative pressure at , 8.2, 4.3 for , 128, 256, whatever the CFL. - The MV-7
order is still pre-asymptotic at ( costs 2.5 h on the CPU); 32 cells is pre-asymptotic in too (order 3.65), so the ladder starts at 64.