The reference Sod shock tube (rotated into 2D): rarefaction, contact and shock.
ρ0.125 to 1
5 mesh levels29,230 cells41 frames
The Sod problem is the reference test for compressible solvers: a membrane
separating a high-pressure gas from a low-pressure gas is removed, and the
solution develops the three characteristic waves - a rarefaction fan, a contact
discontinuity, and a shock. Here it is set up along the diagonal of a 2D domain.
Compressible Euler for an ideal gas (γ=1.4), with the classic Sod
initial states (ρ,u,p)=(1,0,1) on one side and (0.125,0,0.1) on
the other.
Numerical method
Flux: HLLC. Time: explicit Euler.
Adaptation: multiresolution.
The image shows the density ρ.
What to look for
Three well-separated waves. The mesh refines on the shock and the contact
discontinuity (both sharp) while the smooth rarefaction fan needs fewer cells.
Source
scenario.hpp · 67 lines
This case runs on the samurai-euler solver. The code below is its scenario: initial and
boundary conditions. Fluxes, time integration and mesh adaptation come from the shared solver.