Shocks, Weak Solutions, and Entropy Conditions
Scrollable formula. Use Left and Right arrow keys to reveal hidden content.
Scrollable table. Use Left and Right arrow keys to reveal additional columns.
Scrollable figure. Use Left and Right arrow keys to inspect hidden content.
Compressive waves in relativistic Euler flow can steepen until derivatives diverge even though density, pressure, and velocity remain finite. Beyond that time the equations must be interpreted weakly: integral conservation selects the allowed jump relations, and an entropy condition excludes unphysical branches. This page derives those conditions and reports an executed, reproducible special-relativistic shock-tube verification against an independently implemented exact Riemann solution.
Required background. Hilbert Stress–Energy from Metric Variation supplies stress–energy conservation; Events, Intervals, and Minkowski Geometry supplies relativistic velocity; and Differential Equations supplies weak solutions and characteristics.
Helpful background. The Einstein Equation gives gravitational coupling; Relativistic Matter and Compact Objects gives the matter context; and Computational Relativity provides numerical evolution methods.
Conservation across a discontinuity
Section titled “Conservation across a discontinuity”Assume that the shock carries no separate surface stress or particle reservoir. The continuum inputs are baryon conservation, stress–energy conservation, and an equation of state:
Let a smooth hypersurface separate left and right states and let be any nonzero normal covector. Integrating over a thin pillbox and taking its thickness to zero gives the Rankine–Hugoniot conditions
where . Scaling changes neither condition. In one-dimensional Minkowski coordinates, a balance law
with a jump moving at speed obeys
For one-dimensional special-relativistic hydrodynamics, let be rest-mass density, specific internal energy, specific enthalpy, and . A rest-mass-subtracted conservative state and its flux are
The total energy is and has flux ; mixing the and conventions would corrupt the energy jump. Andersson and Comer develop the related Eulerian variables and conservative-to-primitive map in Andersson and Comer 2021, §§ 11.2–11.3, Eqs. (11.21)–(11.50). Conservation alone admits compressive shocks, unphysical expansion shocks, and contact discontinuities unless the characteristic family and entropy behavior are also examined. Martí and Müller describe the hyperbolic wave structure in Martí and Müller 2015, § 3.2.1 and give the exact relativistic Riemann construction in § 8.5, pp. 128–133, Eqs. (179)–(200).
Entropy admissibility and wave families
Section titled “Entropy admissibility and wave families”For a smooth adiabatic perfect fluid, entropy per baryon satisfies . Across a physical shock, irreversible microscopic processes occur in a layer omitted by the ideal equations, and downstream entropy must exceed upstream entropy. Equivalently, the entropy current satisfies a distributional inequality
In one dimension choose the normal covector . Baryon conservation makes the same on both sides. The entropy inequality at the discontinuity is then . For , matter flows from left to right and requires ; if the flow reverses, the upstream and downstream labels reverse too. A contact has and permits an entropy jump without entropy production.
For a genuinely nonlinear characteristic family, the Lax compressivity condition states that its characteristics enter a shock from both sides: . A rarefaction has the opposite structure: it is a continuous self-similar fan in which the relevant characteristic speed spreads monotonically. A contact discontinuity moves with the fluid; pressure and normal velocity remain continuous, while density and entropy may jump.
The entropy condition is not an extra conserved equation. It is an inequality inherited from the dissipative regularization as viscosity and heat conduction tend to zero. Different regularizations can matter for non-convex equations of state, phase boundaries, or undercompressive shocks. For a convex gamma-law gas, however, the standard relativistic Riemann solution consists of two nonlinear waves separated by a contact. The distinction between convex and non-convex wave patterns is reviewed in Martí and Müller 2015, § 3.2.3, and the rarefaction, shock, and matching branches are explicit in §§ 8.5.1–8.5.3, Eqs. (186)–(200).
Exact shock-tube benchmark
Section titled “Exact shock-tube benchmark”A demanding reference problem uses flat spacetime, domain , discontinuity at , outflow boundaries, and gamma-law equation of state
Take primitive initial data, rationalizing the source’s printed as ,
The exact self-similar solution has a left-family rarefaction, a contact, and a right-going shock. The rarefaction’s head travels left, but its tail moves right for these data; the family label does not mean that every ray has negative coordinate speed. An exact relativistic Riemann solver determines the common star-region pressure by matching the velocity behind the left and right waves, then reconstructs density and wave speeds. It is the benchmark; a high-resolution numerical solution should not be compared only with another discretization.
The exact calculation gives
The normalized residuals of are below componentwise. At , the rarefaction head, rarefaction tail, contact, and shock are at , , , and . The shell speed, shell width divided by time, shock speed, and compression agree with the rounded published anchors , , , and . The source and benchmark are Martí and Müller 2015, §§ 6.3–6.3.1, pp. 76–81, Table 3.
The spacetime diagram turns these numbers into a wave pattern. Read horizontally at : the expanding fan comes first, then the left star state, the contact, the compressed right star state, and the shock. The two star states share and but have different densities.
Quantitative spacetime wave fan for the stated gamma-law shock tube. Each boundary follows ; the dotted horizontal line samples the solution at . Positions and slopes come from the retained exact Riemann solution. Rays inside the rarefaction indicate the continuous range of similarity speeds, rather than additional discontinuities.
The numerical contact and shock locations reported below are explicitly target-assisted diagnostics, not blind feature detections. Each is the unique midpoint-level crossing inside a window centered on the corresponding exact position, with a quoted uncertainty of . Requiring exactly one crossing makes an ambiguous feature inside that window fail rather than silently selecting the nearest candidate; oscillations outside the window or below the chosen midpoint level require separate diagnostics.
Reproducible numerical verification
Section titled “Reproducible numerical verification”The retained verification source is dependency-free JavaScript executed with Node.js 24.18.0 using IEEE binary64 arithmetic. It evolves finite-volume cell averages with primitive-variable piecewise-linear reconstruction, a monotonized-central limiter, an HLLE flux, and second-order strong-stability-preserving Runge–Kutta time stepping. Primitive recovery uses a safeguarded Newton–bisection pressure solve and requires both a normalized pressure residual and a conserved-state round-trip postcondition. No atmosphere or primitive-variable floor is applied: an inadmissible reconstruction falls back locally and is counted, while an inadmissible cell, exhausted solve, or failed postcondition terminates the run.
The shock convergence calculation uses uniform cells, constant outflow boundaries, and Courant factors and . It compares numerical cell averages with exact cell averages, splitting quadrature at every wave. The conserved-density error and observed order are
| Courant factor | |||
|---|---|---|---|
| 0.4 | 200 | 0.0799949 | 0.940 |
| 0.4 | 400 | 0.0417104 | 0.779 |
| 0.4 | 800 | 0.0243073 | — |
| 0.2 | 200 | 0.0764177 | 0.939 |
| 0.2 | 400 | 0.0398695 | 0.784 |
| 0.2 | 800 | 0.0231612 | — |
The errors decrease under both refinements. Their pre-asymptotic orders lie below one because the diffused contact and shock dominate the global norm. A separate periodic entropy wave,
tests the smooth regime. For , its values are , , , and . The conserved fields and recovered density all give orders , , and to the shown precision. Pressure and velocity are exact invariants of this test; their largest deviations are respectively below and . This full-state check separates the second-order smooth discretization from the lower global order of a discontinuous solution.
Halving the Courant factor is also compared directly at fixed spatial resolution. For each , define
The retained same-cell differences and the largest ratio over the four fields are
| 200 | 0.00449562 | 0.00625759 | 0.00487721 | 0.00368755 | 0.0694 |
| 400 | 0.00219680 | 0.00351726 | 0.00284457 | 0.00180231 | 0.0830 |
| 800 | 0.00131479 | 0.00179267 | 0.00134369 | 0.00105808 | 0.0646 |
All ratios remain below the declared gate. This is a timestep-sensitivity test, not a measurement of temporal order for a discontinuous solution.
Across every shock run, density and pressure remain positive, , no reconstruction fallback occurs, and boundary-flux-corrected conservation residuals remain below . The largest normalized primitive-recovery pressure residual is and the largest conserved-state round-trip residual is , within gates of and . The exact star-pressure solve converges with a pre-alignment velocity mismatch below . The exact rarefaction preserves to , while it increases by across the right shock. The bundle deliberately rejects negative pressure, superluminal primitive velocity, a non-dominant conserved state, and an expansion state passed to the shock branch. All 143 declared checks pass in the retained machine-readable results.
The public rerun is independent of the site’s private source repository. Start in an empty directory and download the complete single-file program together with the retained reference result:
mkdir srhd-shock-tube-reruncd srhd-shock-tube-reruncurl --fail --location --output verify-srhd-shock-tube.mjs \ https://blackhole.org/computations/compact-objects/verify-srhd-shock-tube.mjscurl --fail --location --output reference-srhd-shock-tube-results.json \ https://blackhole.org/computations/compact-objects/srhd-shock-tube-results.jsonshasum -a 256 -c <<'SHA256'4c4c0e42201118db57eeff7ab384b8cedfe29fd5eca35582ee76c1af2fc210fc verify-srhd-shock-tube.mjse046d224941c675e88e2268d4aace3ad7be3961c88babd1e7e2d6cffd7d43f82 reference-srhd-shock-tube-results.jsonSHA256Use Node.js 24.18.0 to match the retained environment. The program needs only the Node.js standard library. Its portable no-argument mode recomputes the exact solution, all numerical refinements, every failure injection, and all 143 gates, then writes a fresh report to standard output:
node --versionnode verify-srhd-shock-tube.mjs > rerun-srhd-shock-tube-results.jsonnode -e 'const fs=require("node:fs");const r=JSON.parse(fs.readFileSync("rerun-srhd-shock-tube-results.json","utf8"));if(r.summary.status!=="pass"||r.summary.failed!==0||r.summary.passed!==143||r.summary.total!==143)process.exit(1);console.log(`PASS ${r.summary.passed}/${r.summary.total} scientific checks`);'The fresh report records its actual runtime and download location, so it is not expected to be byte-identical to the retained reference JSON. Its source hash, 143 named checks, physical outputs, tolerances, convergence results, and failure diagnostics are the comparison objects. No other script, data file, package, or environment file is required.
Failure modes are diagnostic. A negative reconstructed pressure signals an inadmissible state or failed primitive recovery; excessive contact smearing points to flux or limiter diffusion; oscillations behind the shock indicate inadequate limiting; a wrong wave order usually indicates a sign or relativistic-velocity error; apparent superconvergence often comes from comparing point values or shifting the exact solution to match the computed shock. Near vacuum, conservative-to-primitive inversion becomes ill-conditioned and requires an explicit admissibility or vacuum treatment. If floors are used, their mass and energy contributions must be measured; floors are not a mathematical requirement of every method.
Exercises
Section titled “Exercises”For a scalar conservation law with left and right constants, derive by integrating over a thin spacetime control volume crossed by the discontinuity.
Solution
Integrate over a rectangle whose moving internal boundary is . Flux through the two sides of that boundary must cancel. Per unit time, the boundary sweeps volume , contributing , while the net physical flux is . Equality gives
Applied componentwise to baryon number and stress–energy, this is the coordinate form of the covariant pillbox conditions.
References
Section titled “References”- Andersson, Nils, and Gregory L. Comer. “Relativistic Fluid Dynamics: Physics for Many Different Scales.” Living Reviews in Relativity 24, 3 (2021). DOI.
- Martí, José María, and Ewald Müller. “Grid-Based Methods in Relativistic Hydrodynamics and Magnetohydrodynamics.” Living Reviews in Computational Astrophysics 1, 3 (2015). DOI.