FINITE VOLUME · SHOCK TUBE

Conservation,
in motion.

Build a discontinuity, let mass, momentum and energy evolve, and inspect the density, velocity and pressure solution. Adapted directly from the supplied Python solver.

01 · RIEMANN PROBLEM EXPLORER

Two states. One evolving solution.

02 · CONSERVATION FORM

Three quantities cross every cell face.

Mass

U₁ = ρ

Density is conserved mass per unit volume. Its flux is ρu.

Momentum

U₂ = ρu

Momentum flux combines advection and pressure: ρu² + p.

Total energy

E = p/(γ−1) + ½ρu²

Energy flux is u(E+p): internal and kinetic energy plus pressure work.

03 · RUSANOV METHOD

Robust shock capturing through controlled diffusion.

At every interface, average the physical flux from both sides, then subtract a dissipative term proportional to the state jump and maximum local wave speed.

F̂ = ½(FL + FR) − ½λmax(UR − UL)

The CFL condition chooses Δt = CFL Δx / max(|u|+a). Each cell is updated from its outgoing and incoming interface fluxes.