Appearance
Brio–Wu and Ryu–Jones 4d
| ID | Group | Milestone | Backends | Figure | Regression |
|---|---|---|---|---|---|
— (mhd/riemann, M2-P3 exit) | Ideal MHD | M2 (#41) | CPU, FNL | yes | brio-wu |
Case and scope
The Brio–Wu shock tube (
What the case catches:
- an unclean scheme: with the floors armed at
the runs must reach the final time with zero floored cells in every stage, and a positive, finite final density and pressure; - floors that do not engage: with
p_floor = 1e-3the negative-pressure state must be floored and the run must complete; - floors that hide a failure: with the floors disabled the same state must stop the run with its message.
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | ideal MHD; Brio–Wu and the negative state | models |
| Space | WENO5 flux splitting on characteristic variables | compute_residuals_weno, adam_flume_cpu_object.F90; mhd_face_split_fluxes, adam_flume_mhd_library.F90 |
| Divergence control | none; Brio–Wu also with GLM (glm_ch = 4.0, glm_alpha = 0.18, glm_damping_length = 1.0, glm_ch_check = warning) | mhd_glm_face_split_fluxes, adam_flume_mhd_library.F90; models |
| Floors | armed at p_floor = 1e-3 (floored leg); disabled (stop leg) | apply_floors, adam_flume_cpu_object.F90 and adam_flume_cpu_mhd_kernels_agnostic.INC; models |
| Time | SSP Runge–Kutta, 3 stages, CFL 0.5 | adam_rk_object.F90 |
| Boundaries | zeroth-order extrapolation | set_boundary_conditions, adam_flume_cpu_object.F90; boundary conditions |
| FNL backend | the same kernels on the device | compute_residuals_weno_dev, apply_floors, adam_flume_fnl_object.F90 |
Initial and boundary conditions
| Item | Value |
|---|---|
| Domain | |
| Grid | the Sod grid of V1, |
| Ranks | 2 |
| Initial condition | riemann-problem, discontinuity at |
| Boundaries | extrapolation on all six faces |
States athinput.bw, Ryu–Jones 4d from the Athena C test athinput.rj4d):
| Leg | Left | Right | ||
|---|---|---|---|---|
Brio–Wu, none and GLM | 2 | 0.1 | ||
Ryu–Jones 4d, none | 5/3 | 0.16 | ||
| negative pressure (floored; stop) | 2 | the Brio–Wu left state | 0.02 |
Input files
| File | Role |
|---|---|
src/tests/flume/verification/mhd/riemann/make_riemann.py | writes the input from sod/sod-x.ini (--case bw|rj4d|negative, --cells, --divergence-control, --rho-floor, --p-floor) |
src/tests/flume/verification/mhd/riemann/check.sh | runs the legs and checks the logs and the final checkpoint (--np N, --numerics SPEC, --legs LIST: clean, floored, stop) |
src/tests/flume/verification/make_doc_figures.py fig_mhd_riemann | draws brio-wu.png and rj4d.png from <runs>/brio-wu and <runs>/rj4d (--only mhd-riemann) |
bash
cd src/tests/flume/verification/mhd
riemann/check.sh # CPU
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl riemann/check.sh # FNL
riemann/check.sh --numerics hlld # weno-riemann, HLLDmake_doc_runs.sh <runs> mhd writes the figure runs (<runs>/brio-wu: 512 cells, GLM; <runs>/rj4d: 512 cells, no cleaning); make_doc_figures.py --runs <runs> draws it.
Results

Brio–Wu shock tube with GLM: density, normal velocity, pressure and the tangential fields at

Ryu–Jones 4d at
| Check | Bound | CPU | FNL |
|---|---|---|---|
Brio–Wu (none, GLM), Ryu–Jones 4d: stages with floored cells (no MHD floors: log line) | 0 | 0 | 0 |
| the same: final | pass | pass | |
negative pressure, p_floor = 1e-3: floors engaged, run completes | engaged | pass | pass |
| negative pressure, floors disabled: the run stops with "cells with a non-positive density or pressure" | stop | pass | pass |
On weno-riemann (HLLD, either interpolation) the floored-cell count and the HLLD fallbacks to HLL are both 0 (MHD on weno-riemann); the fallbacks are reported, not asserted.
Related cases: Ryu–Jones 2a has an exact solution on the same grid; positivity limiter removes the floors from the hard problems.
Findings
- Both problems run clean on the splitting scheme: the eigensystem holds near its degeneracies without floors.
- A negative-pressure state is floored when the floors are armed and stops the run when they are not: the floors never act silently on a run that does not ask for them.
- The figures have no exact solution overlaid; the leg asserts cleanliness and positivity, not accuracy.