Skip to content

Brio–Wu and Ryu–Jones 4d ​

IDGroupMilestoneBackendsFigureRegression
— (mhd/riemann, M2-P3 exit)Ideal MHDM2 (#41)CPU, FNLyesbrio-wu

Case and scope ​

The Brio–Wu shock tube (γ=2, Bx=0.75, By=±1) develops a compound wave; Ryu–Jones 4d a switch-on/switch-off structure. Both stress the MHD eigensystem near its degeneracies, where a scheme that is not clean needs the positivity floors to survive. The leg also exercises the floors themselves on a state no clean solver produces: a negative pressure from the first stage.

What the case catches:

  • an unclean scheme: with the floors armed at 10−10 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-3 the 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 ​

ItemChoiceCode
Equationsideal MHD; Brio–Wu and the negative state γ=2, Ryu–Jones 4d γ=5/3 (cv=1, cp=γ)models
SpaceWENO5 flux splitting on characteristic variablescompute_residuals_weno, adam_flume_cpu_object.F90; mhd_face_split_fluxes, adam_flume_mhd_library.F90
Divergence controlnone; 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
Floorsarmed at 10−10 (clean legs); 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
TimeSSP Runge–Kutta, 3 stages, CFL 0.5adam_rk_object.F90
Boundarieszeroth-order extrapolationset_boundary_conditions, adam_flume_cpu_object.F90; boundary conditions
FNL backendthe same kernels on the devicecompute_residuals_weno_dev, apply_floors, adam_flume_fnl_object.F90

Initial and boundary conditions ​

ItemValue
Domain[0,1] along x; y and z null
Gridthe Sod grid of V1, N=512: 64 blocks of 128×4×4 cells, 4 along x
Ranks2
Initial conditionriemann-problem, discontinuity at x=0.5
Boundariesextrapolation on all six faces

States (ρ,u,v,w,p,Bx,By,Bz) (code units; Brio–Wu from Athena++ athinput.bw, Ryu–Jones 4d from the Athena C test athinput.rj4d):

LegγLeftRightt
Brio–Wu, none and GLM2(1,0,0,0,1,0.75,1,0)(0.125,0,0,0,0.1,0.75,−1,0)0.1
Ryu–Jones 4d, none5/3(1,0,0,0,1,0.7,0,0)(0.3,0,0,1,0.2,0.7,1,0)0.16
negative pressure (floored; stop)2the Brio–Wu left state(0.125,0,0,0,−0.1,0.75,−1,0)0.02

Input files ​

FileRole
src/tests/flume/verification/mhd/riemann/make_riemann.pywrites 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.shruns 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_riemanndraws 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, HLLD

make_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

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

Ryu-Jones 4d

Ryu–Jones 4d at t=0.16: the switch-on and switch-off structure.

CheckBoundCPUFNL
Brio–Wu (none, GLM), Ryu–Jones 4d: stages with floored cells (no MHD floors: log line)000
the same: final ρ, p positive and finite>0passpass
negative pressure, p_floor = 1e-3: floors engaged, run completesengagedpasspass
negative pressure, floors disabled: the run stops with "cells with a non-positive density or pressure"stoppasspass

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.