Appearance
MHD rotor
| ID | Group | Milestone | Backends | Figure | Regression |
|---|---|---|---|---|---|
| MV-13 | Ideal MHD | M2 (#41) | CPU, FNL | yes | rotor |
Case and scope
A dense disc spins in a magnetised ambient gas (Balsara & Spicer 1999; the first rotor of Tóth 2000) and launches torsional Alfvén waves that brake it, compresses the field and drives strong shocks: a stringent 2-D test of positivity and of the multi-dimensional field evolution. There is no exact solution; the oracle checks:
- symmetry: the 180° rotation composed with
(the ambient field is uniform) maps the solution to itself. A symmetry defect of the scheme is at truncation level ( ) from the first steps; a correct scheme leaves a round-off seed amplified by the flow; - positivity: the floors are disabled, so a non-positive density or pressure stops the run.
There is no conservation check: the outflow boundaries do not conserve.
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | ideal MHD, | models |
| Space | WENO5 flux splitting on characteristic variables; weno-riemann under --numerics | compute_residuals_weno, compute_residuals_riemann, adam_flume_cpu_object.F90 |
| Divergence control | GLM, glm_ch_check = error), glm_alpha = 0.18, glm_damping_length = 1.0 | mhd_glm_face_split_fluxes, adam_flume_mhd_library.F90; models |
| Floors | disabled | models |
| Time | SSP Runge–Kutta, 5 stages (runge-kutta-ssp-54), CFL 0.4 | adam_rk_object.F90 |
| Boundaries | zeroth-order extrapolation (outflow) | set_boundary_conditions, adam_flume_cpu_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 | the vortex grid of V2 (quadtree, |
| Ranks | 2 |
| Initial condition | mhd-rotor: ambient |
| Boundaries | extrapolation on |
| Final time |
Input files
| File | Role |
|---|---|
src/tests/flume/verification/mhd/rotor/make_rotor.py | writes the input from vortex/vortex-n064.ini (--cells, --cfl, --time-max, --glm-ch, --it-save) |
src/tests/flume/verification/mhd/rotor/check.sh | runs the case (--np N, --numerics SPEC, --legs mv13) |
src/tests/flume/verification/mhd/orszag-tang/orszag_tang_oracle.py | the symmetry check, --field-parity even (the |
src/tests/flume/verification/make_doc_figures.py fig_rotor | draws rotor.png from <runs>/rotor (--only rotor) |
bash
cd src/tests/flume/verification/mhd
rotor/check.sh # CPU (about 10 min)
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl rotor/check.sh # FNL
rotor/check.sh --numerics hlld:primitive # weno-riemann, HLLD, primitive interpolationmake_doc_runs.sh <runs> mhd writes the figure run (<runs>/rotor: make_doc_figures.py --runs <runs> draws it.
Results

Density and magnetic pressure
| Check | Bound | CPU | FNL |
|---|---|---|---|
| symmetry (180° rotation with | pass | ||
| positivity (floors disabled) | run completes | pass | pass |
--numerics: symmetry at step 100 | |||
--numerics: symmetry at the end |
Related cases: Orszag–Tang shares the symmetry oracle; MHD on weno-riemann explains the two-point symmetry check; multi-realm runs split this rotor on a quadtree.
Findings
- The final symmetry defect grows smoothly from round-off (the time series has no jump, so no switch flips) and orders by the dissipation of the solver and by the backend's round-off: the least dissipative interpolations amplify the seed most, and FNL contracts differently into FMAs.
- A single end-of-run tolerance cannot separate a round-off seed from a defect across solvers, so under
--numericsthe symmetry is asserted twice: at step 100, before the flow amplifies the seed, within, and at the end within .