Fluid Dynamics

Shock Wave

A thin discontinuity in pressure, density, and velocity propagating supersonically through a gas

A shock wave is a thin discontinuity where pressure, density, and velocity jump abruptly. Rankine-Hugoniot conditions relate upstream and downstream states. Sonic booms, supernova shells, and hypersonic flight.

  • Forms whenSource moves faster than local sound speed (M > 1)
  • Mach cone anglesin μ = 1/M
  • Density jump (M=2, air)ρ₂/ρ₁ = 2.67; max 6 as M→∞
  • Pressure jump (M=2)P₂/P₁ = 4.5
  • WidthA few mean free paths (~100 nm in air at STP)
  • ConservationMass, momentum, energy across the front (Rankine-Hugoniot, 1880s)

Interactive visualization

Press play, or step through manually.

Open visualization fullscreen ↑

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

Why shocks form

A small pressure disturbance in a gas travels at the speed of sound, c = sqrt(γ R T / M_w). For air at 20°C, c ≈ 343 m/s. If a piston pushes the gas slower than c, every infinitesimal pressure pulse outruns the piston and the gas ahead has time to smoothly adjust. If the piston pushes faster than c, pulses cannot escape upstream — they pile up at the leading edge until the gradient becomes so steep that viscosity and thermal conduction balance it in a thin layer. That thin layer is the shock.

Inside the shock front, kinetic theory shows the width is just a few mean free paths — for air at STP, about 100 nm. From outside the shock looks like a mathematical discontinuity.

Rankine-Hugoniot jump conditions

In the rest frame of the shock, conservation of mass, momentum and energy across the front gives:

rho_1 v_1                =  rho_2 v_2                    (mass)
P_1 + rho_1 v_1^2        =  P_2 + rho_2 v_2^2            (momentum)
h_1 + v_1^2 / 2           =  h_2 + v_2^2 / 2              (energy)

Three equations, plus the ideal gas equation of state P = ρ R T / M_w and the enthalpy h = c_p T. Solving for the downstream state in terms of upstream Mach M₁ = v₁/c₁ and γ gives the canonical ratios.

Jump ratios across a normal shock in air (γ = 7/5)

M₁P₂/P₁ρ₂/ρ₁T₂/T₁M₂
1.01.001.001.001.000
1.52.461.861.320.701
2.04.502.671.690.577
3.010.333.862.680.475
5.029.05.005.800.415
10.0116.55.7120.40.388
→∞6.00 (limit)→∞0.378

Note: the density ratio is bounded by 6 even as M₁ goes to infinity. Temperature and pressure are not bounded. M₂ (downstream Mach) is always < 1 — downstream is subsonic in the shock frame.

Worked example: Mach 2 normal shock

Upstream: air at sea level, P₁ = 101325 Pa, T₁ = 288 K, ρ₁ = 1.225 kg/m³, v₁ = 2 c₁ = 686 m/s. Shock heading into still air.

gamma = 1.4
M1 = 2.0

rho2/rho1 = (gamma + 1) M1^2 / ((gamma - 1) M1^2 + 2)
          = 2.4 * 4 / (0.4 * 4 + 2)
          = 9.6 / 3.6 = 2.667

P2/P1     = 1 + (2 gamma / (gamma + 1)) (M1^2 - 1)
          = 1 + (2.8/2.4) * 3 = 1 + 3.5 = 4.50

T2/T1     = (P2/P1) / (rho2/rho1) = 4.50 / 2.667 = 1.687

M2 = sqrt( ((gamma-1) M1^2 + 2) / (2 gamma M1^2 - (gamma-1)) )
   = sqrt(3.6 / 11.2) = 0.577

Downstream conditions: P₂ = 4.50 × 101325 = 456 kPa. T₂ = 1.687 × 288 = 486 K (213°C). ρ₂ = 2.667 × 1.225 = 3.27 kg/m³. Downstream gas is hot, dense, and moving subsonically.

Shock-wave types — comparison

TypeDriverGeometryExample
Normal shockBody or piston moving along axisPlane perpendicular to flowShock-tube experiments; bow ahead of blunt body
Oblique shockWedge or compression turnPlane at angle β > μ to flowWedge airfoil at supersonic speed
Mach conePoint source moving supersonicallyCone, half-angle μ = arcsin(1/M)Sonic boom from bullet or aircraft
Bow shockBlunt body in supersonic flowDetached, curved upstreamRe-entry capsule, planetary magnetosphere
Blast waveSudden energy releaseExpanding sphereExplosion; supernova ejecta
Astrophysical (collisionless)Magnetic field, not particle collisionsSharp jump in low-density plasmaEarth's bow shock; SNR shells

JavaScript — normal shock calculator

// Normal shock jump relations for ideal gas with adiabatic index gamma
function normalShock(M1, gamma = 1.4) {
  const M1sq = M1 * M1;
  const p2_p1   = 1 + (2 * gamma / (gamma + 1)) * (M1sq - 1);
  const rho2_rho1 = (gamma + 1) * M1sq / ((gamma - 1) * M1sq + 2);
  const T2_T1   = p2_p1 / rho2_rho1;
  const M2sq    = ((gamma - 1) * M1sq + 2) / (2 * gamma * M1sq - (gamma - 1));
  return {
    P_ratio:   p2_p1,
    rho_ratio: rho2_rho1,
    T_ratio:   T2_T1,
    M2:        Math.sqrt(M2sq)
  };
}

console.log('Mach 2 shock in air:');
console.log(normalShock(2.0));
// { P_ratio: 4.5, rho_ratio: 2.667, T_ratio: 1.687, M2: 0.577 }

// Mach cone half-angle
function machAngle(M) {
  if (M < 1) return null;
  return Math.asin(1 / M) * 180 / Math.PI;
}
console.log('Mach 2 cone:',  machAngle(2.0).toFixed(1) + ' deg');  // 30.0
console.log('Mach 5 cone:',  machAngle(5.0).toFixed(1) + ' deg');  // 11.5
console.log('Mach 35 cone:', machAngle(35).toFixed(2) + ' deg');   // 1.64 -- Apollo re-entry

// Sedov-Taylor blast: R(t) = ksi * (E/rho)^(1/5) * t^(2/5)
function sedovRadius(E_joules, rho_kgm3, t_s, ksi = 1.033) {
  return ksi * Math.pow(E_joules / rho_kgm3, 1/5) * Math.pow(t_s, 2/5);
}
// Trinity test, 21 kt = 8.8e13 J, ambient air rho = 1.225 kg/m^3, 0.1 s after
console.log('Trinity radius @ 0.1s:', sedovRadius(8.8e13, 1.225, 0.1).toFixed(0) + ' m');
// ~108 m -- matches G.I. Taylor's classic estimate from declassified photos

Where shock waves matter

  • Aviation. Supersonic and hypersonic vehicle design hinges on shock-wave drag and heating.
  • Re-entry. Apollo, Space Shuttle, SpaceX Dragon — survive shock-heated air via heat shields.
  • Sonic booms. Constrains civilian supersonic flight (Concorde retired largely due to overland boom restrictions).
  • Astrophysics. Supernova remnants, AGN jets, gamma-ray-burst afterglows, all driven by shocks.
  • Lithotripsy. Focused acoustic shocks shatter kidney stones in vivo.
  • Detonations. Self-sustained shock + reaction wave in explosives; basis of explosive engineering.
  • Inertial fusion. Shock-driven compression of a fuel capsule to ignition (NIF, ICF).

Common mistakes

  • Treating shocks as zero-thickness everywhere. They have finite width ~ a few mean free paths. In rarefied flows (high altitude, plasmas) this matters.
  • Assuming infinite density compression. Density ratio asymptotes to (γ+1)/(γ-1) — max 6 for air, regardless of how strong.
  • Forgetting downstream is subsonic. M₂ < 1 in the shock's rest frame. This is why the shock structure exists.
  • Conflating shocks with sound waves. Sound is linear, reversible; shocks are nonlinear and irreversible (entropy generation).
  • Using ideal-gas Rankine-Hugoniot at extreme conditions. Real gas effects (dissociation, ionization, radiation) matter for hypersonic and astrophysical shocks.
  • Missing the difference between a shock and an expansion fan. Compression turns make shocks; expansion turns make smooth fans (Prandtl-Meyer), not jumps.

Frequently asked questions

Why do shock waves form?

A disturbance propagates at local sound speed. If a piston moves slower than sound, pulses outrun it and the gas adjusts smoothly. If the piston moves faster than sound, pulses cannot escape upstream and pressure piles up at the leading edge — forming a thin shock front whose width is set by viscosity and thermal conduction.

What is the Rankine-Hugoniot condition?

Conservation of mass, momentum and energy across the shock, in the shock's rest frame. Combined with an equation of state, these give the jump ratios for P, ρ, T and v as functions of upstream Mach number M₁ and γ.

What's the maximum density jump?

For an ideal gas with adiabatic index γ, the density ratio asymptotes to (γ+1)/(γ-1) as M₁ → ∞. For air (γ=7/5) max is 6; for monatomic gas (γ=5/3) max is 4. Pressure and temperature are not bounded.

What's the Mach cone?

When an object moves supersonically each point on its body emits a spherical disturbance at local sound speed. The envelope is a cone with half-angle sin(μ) = 1/M. M=1 → 90° (flat front), M=2 → 30°, M=5 → 11.5°. The cone surface is the shock; pressure and density jump across it.

What makes the sonic boom?

Pressure inside the Mach cone is higher than ambient. As the aircraft passes overhead, the cone (and trailing expansion) sweeps the observer. Pressure jumps up (leading shock), drops below ambient (trailing shock), then recovers — an N-wave. A listener perceives two cracks about 100 ms apart. Concorde overpressure was about 100 Pa = 1 mbar.

How does shock heating work?

The shock irreversibly converts upstream kinetic energy into downstream thermal energy. For a strong shock T₂/T₁ ~ 2γ(γ-1)M₁²/(γ+1)². Apollo hit at M=35; shock-heated gas reached 3000 K. Hypersonic vehicles use ablative/radiative cooling because shock-heated air is the dominant heat source.

What's a supernova shock?

A supernova explosion sends a blast wave into the surrounding medium at ~10⁴ km/s, M~1000. The blast follows the Sedov-Taylor self-similar solution R(t) ~ (E/ρ)^(1/5) t^(2/5). Shock-accelerated electrons radiate synchrotron emission; shock-accelerated protons may dominate galactic cosmic rays up to 10^15 eV.