Compressible flow

The jump the equations allow

A shock is a discontinuity in a fluid, which sounds like a breakdown of the description rather than a solution of it. It is a solution: mass, momentum and energy can all be satisfied across a jump, and every ratio across one follows from that alone.

Worth reading first: When the warning cannot arrive · Energy instead of pressure.

A shock wave is a surface across which pressure, density, temperature and velocity all change discontinuously. Written down like that it sounds like the description failing — a place where the smooth machinery of fluid mechanics gives up and something else has to be brought in.

Nothing else has to be brought in. A shock is what the conservation laws produce when they are applied to a control volume containing one.

A normal shock at Mach 2.00, and what crosses it unchanged. The state in front of the shock and the state behind it. Every ratio was computed from the standard jump relations and then substituted back into mass, momentum and energy, which is an independent route — a mistyped exponent in the total-pressure expression cannot survive a momentum balance it never appeared in. The residuals are printed below because a check nobody can see is a check nobody can audit.
Fig. 1 A normal shock at Mach 2, with the state on each side. Every ratio was computed from the standard jump relations and then substituted back into mass, momentum and energy — an independent route, because the momentum balance never appeared in the derivation of the total-pressure ratio. The residuals are printed below the drawing.

The derivation needs nothing about the interior

The trick, and it is a good one, is to refuse to look inside.

Draw a control volume with one face in the undisturbed gas ahead and one in the gas behind, with the discontinuity somewhere between them. Apply the three conservation statements this site uses everywhere:

ρ1u1=ρ2u2\rho_1 u_1 = \rho_2 u_2

p1+ρ1u12=p2+ρ2u22p_1 + \rho_1 u_1^2 = p_2 + \rho_2 u_2^2

h1+12u12=h2+12u22h_1 + \tfrac{1}{2}u_1^2 = h_2 + \tfrac{1}{2}u_2^2

Mass in equals mass out. Momentum flux plus pressure is the same on both faces. Stagnation enthalpy is the same on both faces. Add the perfect-gas relation h=γγ1pρh = \frac{\gamma}{\gamma-1}\frac{p}{\rho} and the system closes: four equations, four unknowns, and an algebraic solution.

Nothing about the interior of the shock was used. Not its thickness, not its structure, not the viscosity or heat conduction that actually accomplishes the transition. The control volume approach does not care, in exactly the way a momentum control volume round a wing does not care about the wing’s shape. What crosses the faces is all that is required.

That is why shocks are computable at all, and it is worth being astonished by. The interior of a shock is a genuinely difficult non-equilibrium problem in which the gas is not even locally Maxwellian. The jump across it is a quadratic.

A normal shock at Mach 5.00, and what crosses it unchanged. The state in front of the shock and the state behind it. Every ratio was computed from the standard jump relations and then substituted back into mass, momentum and energy, which is an independent route — a mistyped exponent in the total-pressure expression cannot survive a momentum balance it never appeared in. The residuals are printed below because a check nobody can see is a check nobody can audit.
Fig. 2 The same construction at Mach 5, where the numbers stop being modest. Every ratio is computed from the jump relations and then substituted back into mass, momentum and energy, so a mistyped exponent in the total-pressure expression cannot survive a momentum balance it never appeared in — and the check is the same check at every Mach number.

The method’s indifference to the interior is what makes it the right tool twice. Round a wing it avoids needing the surface pressure distribution; round a shock it avoids needing a theory of non-equilibrium gas kinetics. In both cases the price is the same: the answer is a statement about the boundary, and anybody wanting to know what is happening inside must look elsewhere.

The two roots, and the trivial one

Solving the system gives two solutions, and this is where the subject starts to get interesting.

One of them is p2=p1p_2 = p_1, ρ2=ρ1\rho_2 = \rho_1, u2=u1u_2 = u_1: nothing happens. That is always a solution of “mass, momentum and energy are conserved across this surface”, and it is the flow with no shock in it.

The other is the shock. In terms of the Mach number in front,

M22=1+γ12M12γM12γ12M_2^2 = \frac{1 + \frac{\gamma-1}{2}M_1^2}{\gamma M_1^2 - \frac{\gamma-1}{2}}

p2p1=1+2γγ+1(M121),ρ2ρ1=(γ+1)M12(γ1)M12+2\frac{p_2}{p_1} = 1 + \frac{2\gamma}{\gamma+1}\left(M_1^2 - 1\right), \qquad \frac{\rho_2}{\rho_1} = \frac{(\gamma+1)M_1^2}{(\gamma-1)M_1^2 + 2}

At Mach 2 those give M2=0.5774M_2 = 0.5774, a pressure ratio of 4.500 and a density ratio of 2.667. At Mach 5, M2=0.4152M_2 = 0.4152, a pressure ratio of 29.0 and a density ratio of 5.0.

Notice which solution reduces to which. At M1=1M_1 = 1 the two roots coincide — the shock has zero strength and is the no-shock solution. Above Mach one they separate, and the separation grows.

Two routes, because one route can be mistyped

The relations above are standard, and this site does not trust standard.

assertShockJump takes the numbers a shock returns and substitutes them into the three conservation statements directly, non-dimensionalised on the state in front. That is a genuinely independent route: the total-pressure expression, which is the most elaborate of them, plays no part in a momentum balance, so a mistyped exponent in it cannot survive one.

At Mach 2 the residuals are 0, 0 and 1.4×10161.4\times10^{-16} — mass and momentum exactly, energy to the last bit of double precision. At Mach 5 they are all below 2×10162\times10^{-16}. The assertion also recomputes the Mach number behind from the substituted state rather than from the formula, and requires the two to agree.

The rejection test perturbs the pressure ratio by one per cent, which is a plausible transcription error and would be invisible in any figure, and requires the check to refuse it. It does.

This is the same discipline that caught a sign error in the force on an aerofoil: compute a quantity twice by unrelated routes and compare. It has now found errors on both sides of this site.

The flow behind is always subsonic

One property of the jump relations deserves separate billing, because it is what makes shocks structurally important rather than merely dramatic.

Whatever the Mach number in front, the Mach number behind a normal shock is below one. Mach 1.2 gives 0.8422; Mach 2 gives 0.5774; Mach 5 gives 0.4152; and as M1M_1 \to \infty the value approaches (γ1)/2γ=0.378\sqrt{(\gamma-1)/2\gamma} = 0.378 and never falls below it.

Everything a normal shock does, against the Mach number in front of it. Four quantities across a normal shock, each scaled to fit one axis. Pressure and density rise without limit and without bound as the Mach number grows; the Mach number behind falls towards a floor it never passes; and the total pressure — the flow's ability to be turned back into speed — collapses. That last curve is why a supersonic intake is designed around avoiding a single strong shock.
Fig. 3 Four quantities across a normal shock, against the Mach number in front. The pressure and density ratios rise without limit; the Mach number behind falls towards a floor it never passes; and the total pressure collapses. The floor at 0.378 is why a normal shock is a device for making flow subsonic and cannot be anything else.

So a normal shock is not merely a compression. It is a transition from supersonic to subsonic, without exception, and that is why a nozzle uses one to reconcile its two branches and why a supersonic intake must have one somewhere. It is also why a wedge whose shock detaches acquires a subsonic pocket in front of it: the part of the bow shock that is locally normal to the flow leaves that flow subsonic, whatever the free stream was doing.

The assertion enforces it. assertShockJump refuses any jump claiming a supersonic downstream state, and the rejection test hands it exactly that.

The density ratio has a ceiling, and the pressure ratio does not

Reading the two ratios side by side turns up something that is not obvious and matters a great deal for hypersonic flight.

The pressure ratio grows as M12M_1^2 without limit: 4.5 at Mach 2, 29 at Mach 5, 116 at Mach 10.

The density ratio does not. It approaches (γ+1)/(γ1)=6(\gamma+1)/(\gamma-1) = 6 and stops: 2.67 at Mach 2, 5.0 at Mach 5, 5.71 at Mach 10, and never 6. A shock of any strength whatever cannot compress air by more than a factor of six.

Since temperature is pressure over density, an unbounded pressure ratio divided by a bounded density ratio gives an unbounded temperature ratio. At Mach 10 the static temperature behind a normal shock is 20.4 times the temperature in front, which for a standard atmosphere is around 4,400 K — hot enough that the gas dissociates and the γ=1.4\gamma = 1.4 assumption underneath the whole calculation stops being true.

That is the re-entry heating problem in two lines, and it is why the interesting quantity for a returning capsule is not the pressure on it but the temperature behind its bow shock.

What crosses unchanged, and what does not

The energy equation says the stagnation temperature is the same on both sides, and it holds through a discontinuity as readily as along a smooth acceleration — nothing in its derivation assumed smoothness.

The stagnation pressure does not survive. At Mach 2, 27.9 per cent of it is gone; at Mach 3, 67.2 per cent; at Mach 5, 93.8 per cent. It has not gone anywhere, in the sense that no energy has left the system; what has happened is that some of the flow’s availability — its capacity to be turned back into ordered motion — has been converted into disorder.

assertTotalsAcrossShock checks both halves of that: it recomputes the stagnation temperature independently on each side and requires them equal to 101210^{-12}, and requires the total pressure ratio to lie strictly between zero and one. The rejection test moves the temperature ratio by a tenth of a per cent, which no figure would show, and the check refuses it.

The Hugoniot curve is not an isentrope, and that is the whole story

There is a way of drawing the jump conditions that makes the coming difficulty visible before the second law is mentioned at all.

Eliminate the velocities from the three conservation statements and what is left is a relation between the pressure and density on the two sides alone — the Hugoniot curve, the locus of all states reachable from a given state by a jump:

p2p1=γ+1γ1ρ2ρ11γ+1γ1ρ2ρ1\frac{p_2}{p_1} = \frac{\frac{\gamma+1}{\gamma-1}\frac{\rho_2}{\rho_1} - 1} {\frac{\gamma+1}{\gamma-1} - \frac{\rho_2}{\rho_1}}

Compare it with the isentrope through the same starting state, p2/p1=(ρ2/ρ1)γp_2/p_1 = (\rho_2/\rho_1)^\gamma. The two curves are tangent to second order at the starting point — which is why a weak shock is nearly isentropic — and then they separate, with the Hugoniot lying above the isentrope on the compression side and below it on the expansion side.

That separation is where all of the trouble lives. A compression jump lands above the isentrope, which means a state of higher entropy; an expansion jump lands below it, which means lower. The conservation laws draw the whole curve and are entirely comfortable with both halves, and the asymmetry is visible in the geometry long before anybody invokes thermodynamics.

The second law is the only thing that forbids the other half of this curve. Entropy change across a normal shock, against the Mach number in front of it. The solid branch is the compression shock that exists. The dashed branch below Mach one is the expansion shock, and it satisfies mass, momentum and energy exactly — the residuals are zero to machine precision. It is refused by the second law alone, the one statement in the problem that no conservation residual can show.
Fig. 4 The entropy change across the jump, on both branches. The solid branch is the compression shock that exists. The dashed branch below Mach one is the other half of the Hugoniot curve, and its residuals in mass, momentum and energy are zero to machine precision — which is exactly what the previous figures were checking.

Why the discontinuity is not really one

The mathematical solution is a genuine discontinuity, and the physical shock is not. It is worth being clear about the relationship between them.

A real shock has a thickness of a few molecular mean free paths — of order 10710^{-7} metres at atmospheric density — inside which viscosity and heat conduction accomplish the transition smoothly. The Navier–Stokes equations have a smooth travelling-wave solution of exactly this kind, and it approaches the discontinuous jump as viscosity goes to zero.

So the discontinuity is a limit, not an idealisation that ignores something. It is what the smooth solution looks like from far enough away that its thickness is invisible, which for anything larger than a bacterium is everywhere. And the jump conditions are exactly right at that distance, because they were derived without looking inside.

The one thing this costs: at very low density, the mean free path is not small, the shock is not thin compared with the body, and the jump conditions stop being a useful description — the same limit where the continuum description itself fails, and the same reason the ideal-flow assumption of a smooth field has to be argued for rather than assumed.

One in a duct, where it can be pointed at

Everything above is a statement about a surface with gas on either side, which is abstract enough that it is worth seeing a shock somewhere it has a location.

A nozzle at pb/p₀ = 0.60: shock in the divergent section. The duct above, and the static pressure along it below, computed station by station from the local area. Where a shock stands inside the divergent section its position was solved for rather than placed: the shock spends total pressure, which sets the subsonic Mach number at the exit, which has to match the imposed back pressure.
Fig. 5 A nozzle at a back pressure of 0.6, with a normal shock standing inside its divergent section. The flow arrives at the shock at Mach 2.12, leaves it at Mach 0.55, and the pressure jumps by a factor of 5.1 across a line whose drawn thickness means nothing. Everything upstream of the throat is unaffected by any of it.

Two features of that figure are the jump conditions doing their work. The pressure rise across the line is exactly the ratio the Mach number in front demands — it was not drawn to look right. And the flow behind is subsonic, so the remaining duct, which is still widening, now decelerates it, which is the area relation on the other branch. The shock has moved the flow from one branch of the double-valued relation to the other, which is the only thing that can.

What makes a shock, physically

The jump conditions say what a shock does and are silent about why one forms. The mechanism is worth having, because it explains the asymmetry of the next rung.

A compression wave travels faster than the sound speed of the gas ahead of it, because the gas behind it has been compressed, is hotter, and carries sound faster. So the back of a compression wave gains on the front. Every part of the wave that is further into the compression is travelling faster than the part in front of it, and the profile steepens.

That steepening continues until the gradients are so severe that viscosity and heat conduction can resist them, which happens at a length scale of a few mean free paths — and then the profile stops steepening and travels as a stable front.

Everything a normal shock does, against the Mach number in front of it. Four quantities across a normal shock, each scaled to fit one axis. Pressure and density rise without limit and without bound as the Mach number grows; the Mach number behind falls towards a floor it never passes; and the total pressure — the flow's ability to be turned back into speed — collapses. That last curve is why a supersonic intake is designed around avoiding a single strong shock.
Fig. 6 And the same four quantities taken to Mach 20, where the two ceilings are unmistakable. Pressure rises without bound, density does not — it approaches (γ+1)/(γ1)=6(\gamma+1)/(\gamma-1) = 6 — and the Mach number behind settles onto a floor it never passes. The relations that allow the jump also bound two of its four consequences and neither of the other two.

An expansion wave does the reverse: its trailing parts are in cooler, slower-signalling gas, so it spreads. There is no such thing as an expansion shock, and the mechanical reason is right there — though as the next rung shows, the mechanical reason is not the one that appears in the equations.

The frame the numbers are quoted in

Every number above is quoted in a frame travelling with the shock, and that is not a detail. Most shocks anybody meets are moving — a blast wave, the front running down a shock tube, the wave a piston drives ahead of itself — and it is worth being clear that this is the same calculation and not a different one.

The conservation laws are indifferent to uniform motion, so a shock advancing at constant speed into still gas is handled by stepping into its frame, where the gas ahead approaches at the shock’s own speed and everything above applies unchanged. Nothing new is needed. What genuinely lies outside the derivation is a shock whose strength or speed is changing, and even there the conditions hold instantaneously, because they are a statement about a surface rather than about a history.

The transformation back is where the surprise is, and it repairs an impression the earlier sections will have left.

The gas behind a moving shock is not at rest. The shock leaves it moving, in the direction the shock is going — that motion is what a blast wave knocks a wall down with, and it is the piston speed in the driven case. For a strong shock in air the gas is set moving at five-sixths of the shock’s own speed, which is why a blast’s wind arrives with its overpressure rather than after it.

And “subsonic behind” is a statement about the shock’s frame only. Take a strong shock, transform back to the laboratory, and the gas behind it is moving at about Mach 1.9 relative to the ground while sitting at Mach 0.38 relative to the front that made it. Both numbers are correct and they describe the same gas. The Mach number is not a property of a flow; it is a property of a flow and a frame, and a shock is the place where forgetting that produces the largest error.

What the picture cannot show

The shock in every figure on this site is a line, and its width is meaningless.

It is not the shock’s thickness drawn to scale — at the scale of the drawing a real shock would be narrower than a wavelength of light. It is the minimum width at which a line can be seen.

Nor does any figure here show the interior structure: the smooth Navier–Stokes profile through which the transition really happens, the non-equilibrium region where the velocity distribution is not Maxwellian, or the fact that the translational and rotational temperatures relax at different rates and are briefly different from each other. All of that is real, and all of it is invisible to the control volume that produced these numbers.

The figures are honest about the states, which are exactly right, and silent about the transition, which they never computed.

Where the model stops

Perfect gas, constant γ\gamma. Above about Mach 5 in air the temperature behind the shock excites vibrational modes and then dissociates the gas, and the jump relations with γ=1.4\gamma = 1.4 overpredict the temperature substantially. This site does not draw above Mach 5 for that reason.

Steady and one-dimensional. A shock whose speed is changing, a shock interacting with another shock, or a shock running into a boundary layer are all different problems — a shock moving at constant speed is not, as the section above works through. The last is the practically important one: shock–boundary-layer interaction is where transonic and supersonic aircraft actually get into trouble, and none of it is computed here.

No structure means no thickness effects. Anything that depends on the shock having a size — its interaction with turbulence of comparable scale, or its behaviour in rarefied flow — is outside this description.

Who found it, and when

Rankine derived the jump conditions in 1870 and Hugoniot independently in 1887, both working on the propagation of finite disturbances rather than on aerodynamics, which did not yet exist as a subject. Their names are attached to the relations jointly.

Both of them faced an objection that took decades to settle: the conditions permit a jump in either direction, and nothing in the mechanics chooses. Rankine attempted to rule out the expansion case by an argument about heat conduction inside the shock, which does not work. Hugoniot noted the entropy consequence without pressing it. The settled answer — that the second law alone forbids it, and that nothing weaker will — belongs to Rayleigh and Taylor around 1910, and is the next rung.

Where the ladder goes next

The conservation laws permit a jump. They permit it in both directions, which is the part this essay has carefully not addressed: the same relations, evaluated with a subsonic Mach number in front, return a perfectly well-behaved discontinuity in which the gas accelerates, cools and gains total pressure.

Every residual in that solution is zero. What refuses it is the one law with no picture.

What links here

Computed from the collection rather than written here: the essays that point at this one.

Reads more easily once this is understood

Essays that name this one as worth reading first.

Shares its objects with

Essays naming at least two of the same things, that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

ConservationControl volumeDiscontinuityEntropyMach numberRankine–Hugoniot conditionsShock waveStagnation temperatureTotal pressure