Skip to content

Isothermal equation of state ​

IDGroupMilestoneBackendsFigureRegression
EO (eo1 to eo7)EulerM13 (#100), P1, P2CPU, FNLyesiso-tube, iso-collide-hllc

Case and scope ​

[eos] type = isothermal closes the Euler equations with P=c02ρ (numerics, input). The energy equation is gone, the energy slot rE of the state is inert, and the isothermal Riemann problem has an exact solution built from mass and momentum alone. Every run is checked against that solution, which eos_oracle.py constructs from the jump conditions, independently of the code (its self-test, P0, checks it against properties it is not built from).

What the case catches:

  • a wrong eigensystem or Roe average: the characteristic projection would couple the transverse velocity to the acoustic waves, or move the shock and the plateau;
  • a wrong isothermal flux: the plateau, the shock speeds and the compression ρ∗=ρM12 of a collision;
  • an energy slot that is not inert: any non-zero rE, in any checkpoint;
  • a loss of the design order of the smooth flow, or of mass conservation;
  • a gamma-law path reached by the isothermal model: every input the isothermal gas does not define yet must be refused with its own message, not run on a meaningless pressure.

Models and numerics ​

ItemChoiceCode
Modeleuler with [eos] type = isothermal, sound_speed c0=1: MODEL_EULER_ISO, the energy slot inert (D-M13-1)adam_flume_euler_iso_library_body.INC, adam_flume_physics_object.F90
SpaceWENO5 characteristic flux splitting (eo1 to eo5); weno-riemann with the characteristic interpolation, the 6th-order flux correction and llf, hll, hllc (eo6)adam_flume_cpu_euler_iso_kernels.F90, adam_flume_cpu_euler_iso_{llf,hll,hllc}_kernels.F90; FNL adam_flume_fnl_euler_iso_kernels.F90, adam_flume_fnl_euler_iso_{llf,hll,hllc}_kernels.F90
TimeSSP-RK(3,3), CFL 0.5; SSP-RK(5,4) at CFL 0.1 for the order (eo3), so the time error stays below the WENO5 space error—

Initial and boundary conditions ​

LegSetup
eo1the shock tube: ρ=1∣0.125 at x=0.5, at rest, the transverse velocity v=0.3∣−0.2; 400 cells along x, y active with 4 cells (uniform), extrapolation faces, to t=0.2
eo2two streams ρ=1, u=±5 colliding at x=0.5, 400 cells, to t=1
eo3a right-running acoustic wave, ρ=1+10−6sin⁡2πx, u=c0(ρ−1), on the periodic [0,1], N=12,24,48 in two blocks on two ranks, one period
eo4the eo1 input with [cooling], a viscosity, [reference], an immersed cylinder, a wall-noslip or hydrostatic face, isentropic-vortex; euler-de (mhd-ideal until P5, MHD), passive scalars, cp/cv, no or a negative sound_speed, an unknown type
eo5the eo3 wave at amplitude 0.3, N=48, two ranks, to t=1: it breaks into a shock at tb≈1/(c0Ak)=0.53
eo6eo1 with weno-riemann and each solver
eo7the eo1, eo2, eo3 (N=48) and eo6 hllc runs of CPU and FNL

The exact solution. Across a shock the isothermal jump gives u∗=uK∓c0(ρ∗/ρK−1)ρK/ρ∗, across a fan u∗=uK∓c0ln⁡(ρ∗/ρK); ρ∗ is the root of the two, and the contact between them carries only the jump of the transverse velocity. In the tube ρ∗=0.34578, u∗=1.0619: a left fan, the contact at x=0.7124, a right shock at 0.8326. The collision compresses the gas to ρ∗=M12=26.963, M1=5.193 the Mach number in the frame of the shocks, which move out at ±0.1926.

A 1-D run cannot carry a transverse velocity. A null direction freezes its momentum for every Euler model (null_freeze), so in a 1-D tube ρv stays at its initial profile and the contact cannot move. The tube keeps y active, with four uniform cells whose fluxes cancel exactly.

Input files ​

FileRole
src/tests/flume/verification/eos/make_eos.pywrites the inputs from the sod-x regression input (`--case tube
src/tests/flume/verification/eos/check.shruns the legs (--legs eo1,...,eo7, default all but eo7; FLUME_EXE selects the backend; eo7 compares the work directories of both)
src/tests/flume/regression/iso-tube/input.ini, iso-collide-hllc/input.inithe frozen eo1 tube (WENO5 splitting) and eo2 collision (weno-riemann HLLC), 100 cells in four blocks
src/tests/flume/verification/eos/eos_oracle.pythe exact isothermal (and barotropic) Riemann solutions, the linear wave, and the comparisons with the runs (riemann, wave, inert)
make_doc_runs.sh <runs> eos, make_doc_figures.py --only isothermal-eosthe figure (7 runs, 4 minutes)
bash
cd src/tests/flume/verification/eos && ./check.sh                                      # CPU
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl ./check.sh                           # FNL
./check.sh --legs eo7                                                                 # CPU against FNL

Results ​

Isothermal equation of state: the shock tube, the collision, the order and the steepened wave

Top left: the shock tube against the exact solution; the contact carries the transverse velocity only. Top right: the Mach-5 collision, the dense layer at ρ∗=M12 behind a decaying train of post-shock oscillations. Bottom left: the L1 error of the acoustic wave after one period, fifth order. Bottom right: the wave at amplitude 0.3, broken into a shock after t≈0.53; the total mass is constant to round-off and rE stays 0.

LegAssertedBoundCPUFNL
eo1the plateau mean against ρ∗10−38.3⋅10−5 (108 cells; largest deviation 1.1⋅10−3)the same
eo1the right shock; the contact (mid-v crossing)1.5 cells; 2 cells0.13 cells; 0.11 cellsthe same
eo1rE; the L1 errors of ρ and v (reported)exactly 0; —0; 2.1⋅10−3, 2.0⋅10−3the same
eo2the layer mean against M12; both shocks10−3; 1.5 cells8.3⋅10−5 (144 cells; largest deviation 1.7⋅10−2); 0.05 cells eachthe same
eo3the L1 order of the finest pair>4.54.84 (4.94 on 12 → 24; L1 2.8⋅10−12 at N=48)the same
eo4the 13 invalid inputs (16 before P4, which defines [sinks], [gravity] and the density-only positivity_limiter = cell: under gravity)refusedrefusedrefused
eo5rE in every checkpoint; the total massexactly 0; 10−130; 1.1⋅10−160; 2.2⋅10−16
eo6eo1 with llf, hll, hllcas eo1plateau 6.1⋅10−5, 3.2⋅10−5, 3.2⋅10−5; shock 0.15, 0.07, 0.07 cells; contact 0.16 cells each; rE 0the same
eo7FNL against CPU, the last checkpoint, per field over its scale (a momentum's at least maxρc0); rE10−10; exactly 0(the same comparison)tube 1.7⋅10−14, collision 4.2⋅10−12, wave 2.4⋅10−15, HLLC tube 1.2⋅10−14 (largest field); 0

Related cases: Sod is the grid; radiative cooling checks the isothermal jump at the floor temperature of a radiative shock, which an isothermal gas makes exact.

Findings ​

  • The isothermal gas needs no pressure in its Riemann problem, and no star pressure in its HLLC. The contact carries only the transverse velocity, so the isothermal HLLC is HLL on mass and normal momentum with the transverse momenta upwinded by the mass flux.
  • HLLC's contact advantage does not show here. On the tube HLL and HLLC agree to the third digit (the transverse-velocity L1 2.139⋅10−3 against 2.134⋅10−3): the characteristic interpolation and the 6th-order flux correction already resolve the contact at 400 cells, so the Riemann solver's own contact resolution is not what limits it. eo6 checks the solvers are correct, not that HLLC is sharper.
  • A strong isothermal shock leaves a decaying oscillation train. At Mach 5 the dense layer oscillates about ρ∗ by 2 % next to each shock, falling to 0.2 % at the centre: the post-shock oscillation of WENO flux splitting at a strong shock (Arora & Roe 1997), not an error of the gas. Its mean is within 10−3 of M12.
  • CPU and FNL agree to round-off once a field is measured on its own scale. On the 10−6 acoustic wave the momentum differs by 2⋅10−15 absolute, which is 2⋅10−9 of the momentum's own size but 2⋅10−15 of ρc0. The momentum flux carries the pressure c02ρ, so its round-off is that of an O(1) quantity, and eo7 measures a momentum against at least maxρc0. The largest gap of the four runs, 4.2⋅10−12 in the Mach-5 collision's density, is round-off amplified at two strong shocks.
  • The inert slot costs nothing and stays exact. Zero flux, zero source and a zero eigenvalue keep rE at 0 to the bit in every checkpoint, also across shocks; the state layout and every model-agnostic kernel are unchanged.