Appearance
Field loop advection
| ID | Group | Milestone | Backends | Figure | Regression |
|---|---|---|---|---|---|
| MV-9 | Ideal MHD | M2 (#41); --agree #79 | CPU, FNL | yes | field-loop |
Case and scope
A weak magnetic loop,
so the generated
What the case catches:
- a divergence error above the GLM level:
under a bound and decreasing under refinement; - excess dissipation:
above a bound; - a seam div(B) source that does not decay (
--amr): the seam div(B) must fall from its peak; - backend disagreement on
( --agree): the CPU and FNL runs compared field by field.
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | ideal MHD, | models |
| Space | WENO5 flux splitting on characteristic variables; weno-riemann under --numerics | mhd_glm_face_split_fluxes, mhd_eigenvectors_core, adam_flume_mhd_library.F90; numerics |
| Divergence control | GLM, glm_ch_check = error), glm_alpha = 0.18, glm_damping_length = 1.0 | models |
| Time | SSP Runge–Kutta, 5 stages (runge-kutta-ssp-54), CFL 0.4 | adam_rk_object.F90 |
AMR (--amr) | primitive-box marker at initialisation; 2:1 restriction, tricubic ghost fill, reflux; seam div(B) column of the history | interp_seam_ghost, adam_field_object.F90; 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 | the vortex grid of V2 (quadtree, |
Grid, --amr | ladder nk = 4 |
| Ranks | 2 |
| Initial condition | field-loop: |
| Boundaries | periodic on |
| Final time | --amr |
Input files
| File | Role |
|---|---|
src/tests/flume/verification/mhd/field-loop/make_field_loop.py | writes the input from vortex/vortex-n064.ini (--cells, --time-max, --glm-ch, --vz, --refine-box) |
src/tests/flume/verification/mhd/field-loop/check.sh | runs the ladder (--amr, --agree, --numerics SPEC, --legs mv9) |
src/tests/flume/verification/mhd/field-loop/field_loop_oracle.py | |
src/tests/flume/verification/mhd/seam_divb_oracle.py | the seam div(B) decay (--amr) |
src/tests/flume/verification/make_doc_figures.py fig_field_loop | draws field-loop.png from <runs>/field-loop (--only field-loop) |
bash
cd src/tests/flume/verification/mhd
field-loop/check.sh # CPU (about 10 min)
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl field-loop/check.sh # FNL
field-loop/check.sh --agree # CPU against FNL, after both runs
field-loop/check.sh --amr # 2:1 seams (about 28 min)make_doc_runs.sh <runs> mhd writes the figure run (<runs>/field-loop: make_doc_figures.py --runs <runs> draws it.
Results

Magnetic pressure
| Check | Bound | CPU | FNL |
|---|---|---|---|
| pass | |||
| its rate under refinement | 0.79 (0.20 from 128 to 256) | pass | |
| 0.872 / 0.937 | pass | ||
--amr: | pass | ||
--amr: | 0.802 / 0.901 | pass | |
--amr: final seam div(B) / its peak | 0.1 | 0.033 / 0.011 | pass |
--agree: CPU against FNL, field by field ( | — |
The uniform --amr ladder is compared with give weno-riemann energies are in MHD on weno-riemann.
Related cases: glm cleaning measures the GLM transport and damping on an exact solution; runtime regrids and accuracy of runtime AMR track this loop with a moving refinement (regression field-loop-regrid); the M6 seam studies G3a and G3b run it across a 2:1 seam under GLM and EGLM.
Findings
- The loop field jumps at
, so the discrete div(B) there is over a ring wide: the source is in and the decrease is slow. No convergence order is expected; the measured level matches the GLM level of Mignone & Tzeferacos ( ). - On AMR the refined half dissipates less (
0.802, 0.901 against 0.759, 0.884 uniform); the seams add at and none at . The seam div(B) peaks at the first step (the initial-data error of the loop edge) and GLM removes it; the collocated PRISM seam runs away instead (#29). - The backends agree to round-off on
as on the fluid. Until #79 they differed by on : the slow-wave normalisation of the eigenvectors cancelled catastrophically; it is now cancellation-free (numerics).