Solution (source code)

= Solution

A <shock wave> forms when a compressive flow steepens or when gas must be decelerated or turned faster than upstream <acoustic waves> can communicate the change. Astrophysical examples include a <supernova remnant> sweeping up surrounding gas, a fast <stellar wind> colliding with ambient material, and supersonic accretion onto an obstacle or onto a dense gas layer. A large <Mach number> by itself is not sufficient: a uniform supersonic stream need not contain a <shock wave>.

Choose the <shock frame>, and denote upstream and downstream normal <velocities> by $u_1,u_2$. Integrating the local <conservation laws> over a thin control volume spanning a steady <normal shock wave> gives equal fluxes on both sides. <Mass conservation> gives constant mass flux per unit area,
$$
\boxed{j=\rho_1u_1=\rho_2u_2.}
$$
<Pressure> and advected <momentum> together give the normal <momentum flux>,
$$
\boxed{p_1+\rho_1u_1^2=p_2+\rho_2u_2^2.}
$$
For a thin non-radiating layer, with negligible gravitational-potential change across it, <conservation of energy> gives equal fluxes $j(h+u^2/2)$. A perfect gas has <specific enthalpy> $h=\gamma p/[(\gamma-1)\rho]$, so
$$
\boxed{\frac\gamma{\gamma-1}\frac{p_1}{\rho_1}+\frac12u_1^2
=\frac\gamma{\gamma-1}\frac{p_2}{\rho_2}+\frac12u_2^2.}
$$
These are the <Rankine-Hugoniot conditions for a perfect gas>. Dissipation inside the thin layer produces an <entropy> increase and selects the physical compressive branch. Efficient radiative cooling would change the energy relation and may instead lead to an <isothermal shock>.