Skip to content

Barotropic equation of state ​

IDGroupMilestoneBackendsFigureRegression
EO (eb1 to eb8)EulerM13 (#100), P3CPU, FNLyesbaro-tube, baro-collide-hllc

Case and scope ​

[eos] type = barotropic closes the Euler equations with a continuous piecewise polytrope, P=KkρΓk (numerics, input): the energy slot is inert, as for the isothermal gas, and the sound speed c2=dP/dρ jumps where Γ changes. On a convex table, where Γ only increases upward, the Riemann problem still has an exact solution built from mass and momentum alone, and eos_oracle.py constructs it independently of the code; the default table of Mathew & Federrath (2021) is not convex, so it is checked by self-convergence.

What the case catches:

  • a wrong table or segment lookup: the plateau at a break density, which a rarefaction through a convex break leaves between its two fans, and the shocks that jump across segments;
  • a wrong Roe speed: the HLL and HLLC speeds use the secant [P]/[ρ];
  • a wrong c2=P′(ρ): the acoustic wave's speed, hence its order;
  • a table that disagrees with the closed form: the one-segment table Γ=1 against the isothermal gas;
  • a scheme that does not converge where no exact solution is available, across a non-convex break;
  • a backend that disagrees, or a table the device does not hold.

Models and numerics ​

ItemChoiceCode
Modeleuler with [eos] type = barotropic: MODEL_EULER_BARO, the energy slot inert (D-M13-1), the table registered in adam_flume_eos_tables_libraryadam_flume_euler_baro_library.F90, adam_flume_eos_tables_library.F90
SpaceWENO5 characteristic flux splitting (eb1 to eb3, eb5, eb6); weno-riemann with llf, hll, hllc (eb7)adam_flume_cpu_euler_baro_kernels.F90, adam_flume_cpu_euler_baro_{llf,hll,hllc}_kernels.F90; FNL adam_flume_fnl_euler_baro_*
TimeSSP-RK(3,3), CFL 0.5; SSP-RK(5,4) at CFL 0.1 for the order (eb3)—

Initial and boundary conditions ​

The convex test table is POLY of eos_oracle.py: c0=1, breaks ρ=2,8, exponents 1,1.4,5/3.

LegSetup
eb1POLY tube, ρ=10∣0.5, v=0∣0.7, at rest, 1600 cells, y active, t=0.15: ρ∗=2.602; the left fan runs from ρ=10 through the break 8, where it splits into two fans with a plateau at ρ=8
eb2POLY collision (ρ,u)=(1,3.4)∣(1.5,−2.6), 400 cells, t=0.3: ρ∗=8.056, both shocks into the Γ=5/3 segment, moving at −0.466 and 0.612
eb3the acoustic wave of amplitude 10−6 on ρ0=5 (Γ=1.4, c2=P′(5)=2.0198), periodic [0,1], N=12,24,48, one period
eb4decreasing densities, exponents of another count, an exponent below 1, 9 segments, a negative reference_density, the gas keys, [reference], no sound_speed
eb5the one-segment table exponents = 1 and the isothermal gas, both c0=1.3, on the eo1 tube, t=0.15
eb6the default table (cgs, c0=0.2 km/s), the periodic tube ρ=10−7∣10−8 g cm−3 at rest on 1 cm, t=3⋅10−7 s: the left fan runs down through the non-convex break 3.84⋅10−8; N=200,400,800 and the reference N=1600, [weno] weights = si (the data are far from order 1)
eb7eb2 with weno-riemann and each solver
eb8the eb1, eb2, eb3 (N=48) and eb7 hllc runs of CPU and FNL

The frame of the collision. eb2 is the collision (1,4)∣(1.5,−2) seen from a frame moving at 0.6. In the original frame the left shock moves at 0.134 relative to the grid, and a slowly moving shock sheds persistent post-shock noise into the flow behind it (Arora & Roe 1997): under HLL and HLLC the layer's mean misses ρ∗ by 1.3⋅10−3, with a 4.6 % ripple. In the shifted frame every shock moves at least 0.36, the ripple is 0.47 % and the mean error 3.8⋅10−5. A defect of the solvers would move with the problem; this one does not, so the legs use the shifted frame, and the figure shows both.

Input files ​

FileRole
src/tests/flume/verification/eos/make_eos.pywrites the inputs (--eos barotropic --densities --exponents --rho-ref, --left/--right states, --rho0)
src/tests/flume/verification/eos/check.shruns the legs (--legs eb1,...,eb8, default all but eb8 and eo7; FLUME_EXE selects the backend)
src/tests/flume/verification/eos/eos_oracle.pythe exact barotropic Riemann solver (convex tables), the linear wave, the comparisons: riemann (with the break plateaus), wave, agree, selfconv
src/tests/flume/regression/baro-tube/input.ini, baro-collide-hllc/input.inithe frozen eb1 tube (WENO5 splitting) and eb2 collision (weno-riemann HLLC), 100 cells in four blocks
make_doc_runs.sh <runs> eos, make_doc_figures.py --only barotropic-eosthe figure (10 runs, 20 minutes on one CPU node)
bash
cd src/tests/flume/verification/eos && ./check.sh --legs eb1,eb2,eb3,eb4,eb5,eb6,eb7      # CPU
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl ./check.sh --legs eb1,eb2,eb3,eb7      # FNL
./check.sh --legs eb8                                                                 # CPU against FNL

Results ​

Barotropic equation of state: the tube across the breaks, the collision in two frames, the order and the default table

Top left: the tube across the breaks of POLY; the inset shows the plateau at the break ρ=8 between the two fans. Top right: the collision under HLL, the density behind the left shock in the slow-shock frame and in the shifted one. Bottom left: the acoustic wave on the Γ=1.4 segment, fifth order. Bottom right: the default table, its fan through the non-convex break, converging to the finest run.

LegAssertedBoundCPUFNL
eb1the plateau mean; the break plateau at ρ=8; the right shock; the contact; rE10−3; 10−3; 1.5 cells; 2 cells; 06.0⋅10−5; 6.6⋅10−6; 0.37; 0.29; 0the same
eb2the layer mean against ρ∗=8.056; both shocks10−3; 1.5 cells8.1⋅10−6; 0.13, 0.20the same
eb3the L1 order of the finest pair>4.54.71 (4.94 coarser)the same
eb4the 8 invalid tables and inputsrefusedrefusedrefused
eb5the table Γ=1 against the isothermal gas, per field over its scale10−101.9⋅10−142.9⋅10−14
eb6the L1 distance to the N=1600 run, order per pair; ρ>0; rE; the total mass≥0.5; —; 0; 10−131.21, 1.58; minρ=10−8; 0; 1.2⋅10−16the same orders; 2.4⋅10−16
eb7eb2 with llf, hll, hllcas eb2layer 2.6⋅10−5, 3.8⋅10−5, 3.8⋅10−5; shocks ≤0.21 cellsthe same
eb8FNL against CPU, per field over its scale; rE10−10; 0(the same comparison)9.1⋅10−13 (eb7 hllc, ru); 0

Related cases: the isothermal gas is the one-segment table Γ=1.

Findings ​

  • A rarefaction through a convex break splits, and the code keeps the plateau. The fan from ρ=10 to ρ∗=2.6 meets the break ρ=8, where c jumps up: the exact solution has two fans with a constant state at the break density between them, and the run holds it to 6.6⋅10−6 over 24 of its 34 cells.
  • The slowly moving shock, not the solver. A Galilean shift of −0.6 cuts the HLL ripple behind the left shock from 4.6 % to 0.47 % and the plateau error from 1.3⋅10−3 to 3.8⋅10−5: the noise is the frame-dependent slowly-moving-shock anomaly, worst for the least dissipative fluxes (LLF: 1.5 %).
  • The default table converges where no exact solution exists. Across the non-convex break of Mathew & Federrath (2021) the runs approach the finest one at orders 1.21 and 1.58, with the density kept at 10−8 and the mass to 2.4⋅10−16.