Appearance
Orszag–Tang vortex
| ID | Group | Milestone | Type | Backends | Figure | Regression |
|---|---|---|---|---|---|---|
| MV-12 | Ideal MHD | M2 (#41) · P6a | P | CPU, FNL | yes | orszag-tang |
Case and scope
The standard 2-D test of MHD turbulence and shock interactions (Stone et al. 2008, section 8.4): interacting shocks, a current sheet and low-
- symmetry: the 180° rotation about
maps the initial state to itself (scalars even, vectors odd), so the discrete solution must keep that symmetry. A wrong ghost fill or a sign error gives a truncation-level defect ( ); a correct scheme leaves a round-off seed amplified by the flow; - conservation: the periodic box conserves the integrals of
, , and ; - positivity: the floors are disabled, so a non-positive density or pressure stops the run; a completed run has zero floored cells.
With --amr the centre box is refined once, so 2:1 seams are crossed by the shocks: symmetry and conservation must hold there too, and the seam must not be a larger div(B) source than the flow features themselves.
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | ideal MHD, | models |
| Space | WENO5 flux splitting on characteristic variables | compute_residuals_weno, adam_flume_cpu_object.F90; mhd_glm_face_split_fluxes, adam_flume_mhd_library.F90 |
| Divergence control | GLM, glm_ch_check = error), glm_alpha = 0.18, glm_damping_length = 1.0 | models |
| Floors | disabled | models |
| Time | SSP Runge–Kutta, 5 stages (runge-kutta-ssp-54), CFL 0.4 | adam_stepper_object.F90 (SELAH) |
AMR (--amr) | geometric primitive-box marker at initialisation, no regrid; 2:1 restriction, tricubic ghost fill, reflux | interp_seam_ghost, adam_field_object.F90; apply_reflux_corrections, adam_forest_object.F90; numerics |
| Diagnostics | conservation history every step; div(B) history (seam-local column on AMR) | compute_conservation, compute_divb_history, adam_flume_cpu_object.F90 |
| Boundaries | periodic | boundary conditions |
| FNL backend | the same kernels on the device | adam_flume_fnl_object.F90 |
Initial and boundary conditions
| Item | Value |
|---|---|
| Domain | |
| Grid, uniform | the vortex grid of V2 (quadtree, |
Grid, --amr | nk = 1 (mhd/amr_box.py; --ratio 8 gives the octree with null nk = 4 of the measurements before #142); plus the uniform |
| Ranks | 2 |
| Initial condition | orszag-tang, evaluated as odd functions of |
| Boundaries | periodic on |
| Final time |
Input files
| File | Role |
|---|---|
src/tests/flume/verification/mhd/orszag-tang/make_orszag_tang.py | writes the input from vortex/vortex-n064.ini (--cells, --refine-box, --ratio, --nk, --divergence-control, --it-save) |
src/tests/flume/verification/mhd/amr_box.py | refines a box by one 2:1 level at initialisation |
src/tests/flume/verification/mhd/orszag-tang/check.sh | runs the uniform leg, or --amr, or --divergence-control eglm (--numerics SPEC, --legs mv12) |
src/tests/flume/verification/mhd/orszag-tang/orszag_tang_oracle.py | the 180° symmetry, the conservation, the positivity |
src/tests/flume/verification/mhd/seam_divb_oracle.py | the seam div(B) against the uniform reference (--amr) |
src/tests/flume/verification/make_doc_figures.py fig_orszag_tang | draws orszag-tang.png and orszag-tang-amr.png from <runs>/orszag-tang and <runs>/orszag-tang-amr (--only orszag-tang) |
bash
cd src/tests/flume/verification/mhd
orszag-tang/check.sh # uniform 128^2, CPU (about 5 min)
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl orszag-tang/check.sh # FNL
orszag-tang/check.sh --amr # 2:1 seams (about 30 s on the quadtree)make_doc_runs.sh <runs> mhd writes the figure runs (<runs>/orszag-tang: <runs>/orszag-tang-amr: make_doc_figures.py --runs <runs> draws it.
Results

Density and pressure at

Density on the
| Check | Bound | CPU | FNL |
|---|---|---|---|
| 180° rotational symmetry at | |||
| integrals of | |||
| positivity (floors disabled) | run completes | pass | pass |
--amr: symmetry | |||
--amr: conservation | |||
--amr: peak seam | 1.0 | 0.76 ( | the same |
Measured: ADAM 0bcdf870 + the night-2026-11-22 tree (the paper commit, tag pending), CPU gfortran 16.2.0 + Open MPI 5.0.11 (iac_gnu) on medooza (gnode22), FNL nvfortran 26.9, CUDA 12.9 (iac_nvf) on NVIDIA A30, 2026-11-23 (orszag-tang/check.sh, orszag-tang/check.sh --amr, jobs 1369376 CPU, 1369378 FNL).
The symmetry defect of the uniform run grows from --amr rows run on the quadtree with nk = 1; the octree values of M2 (null nk = 4) were
Symmetry defect against the grid (#145). The uniform leg at check.sh --cells N), and the defect at every 10th step of the uniform runs, the --amr run and two more layouts (checkpoints every 10 steps; orszag_tang_oracle.py at each):
| Run | Cells, finest spacing | Steps to | Defect at | Defect at | Defect at |
|---|---|---|---|---|---|
uniform --cells 32) | 1024, 1/32 | 320 | |||
--amr: | 1792, 1/64 | 640 | |||
uniform --cells 64) | 4096, 1/64 | 640 | |||
| every block refined through the AMR path ( | 4096, 1/64 | 640 | |||
| 7168, 1/128 | 1281 | ||||
| uniform | 16384, 1/128 | 1281 |
The columns at 0bcdf870 + the night-2026-11-22 tree (HEAD 95ffd728 with the working tree of 2026-11-23), CPU gfortran 16.2.0 + Open MPI 5.0.11 (iac_gnu) on medooza (gnode25), 2 ranks, 2026-11-23 (orszag-tang/check.sh --cells 32, --cells 64; the series with make_orszag_tang.py --it-save 10; jobs 1369617, 1369627).
The defect does not grow with the number of steps. It stays at --amr run has
Related cases: rotor uses the same symmetry oracle; EGLM cleaning runs this problem under EGLM (EV-4); quadtree AMR runs the --amr problem on three trees; MHD on weno-riemann runs it on HLLD.
Findings
- The initial state is bitwise symmetric and the scheme is symmetric in exact arithmetic, but its left- and right-biased reconstructions round differently: the defect is a round-off seed amplified by the flow, four to five decades below what a wrong fill or a sign error produces.
- On AMR the refined box is symmetric about the centre and the reflux keeps the integrals: symmetry (
) and conservation ( ) hold across the seams. - The adaptive run is more symmetric than the uniform one because it is coarse where the defect grows, not because it takes fewer steps (#145): the seed is amplified by three decades between
and near and its image on and finer cells, and not on cells. With every block refined, the AMR path gives the uniform run bit for bit. - The div(B) beside the seams stays below the uniform-grid peak: the shocks, not the seams, set the div(B) maximum.
- The AMR variant runs on a quadtree with
nk = 1, true 2-D, since #142 (A8). It ran on an octree with nulland nk = 4(four times the cells) because, before #46, a quadtree seam produced a spuriousdependence. On this problem the two trees agree to round-off at ( ); MV-15 keeps the octree as its reference.