MEC-370 · Lesson 8 of 12 · 22 min

Compressible flow fundamentals

Everything so far has treated density as constant. For water in pipes and for air moving slowly, that is an excellent approximation. But Jun's air-valve review on the 600 mm transmission main and a new compressed-air system for the filters' air scour both involve air moving fast through small openings, where the density changes a great deal and the incompressible equations fail. This lesson introduces the ideas needed to deal with such flows: the speed of sound, the Mach number, stagnation properties and the conditions under which compressibility matters. Lessons 9 and 10 apply them to nozzles, valves and shocks.

When is a flow compressible?

All fluids compress under pressure. What matters is whether the density changes enough, along the flow, to affect the answer. For steady flow of a gas, Bernoulli's equation shows that the pressure change from rest to a speed V is about \(\tfrac12\rho V^2\), and a gas compressed isentropically by that amount changes its density by a fraction of about \(\tfrac12 M^2\), where M is the Mach number, the ratio of flow speed to the speed of sound:

\[M = \frac{V}{c}, \qquad \frac{\Delta\rho}{\rho} \approx \tfrac12 M^2\]

At M = 0.3 the density changes by about 5 percent, which is the usual threshold below which gas flows are treated as incompressible. Air at 0.3 times the speed of sound is moving at about 100 m/s, faster than almost any flow in a ventilation duct or a low-pressure blower main. Air leaving a valve or nozzle under a large pressure difference, however, easily reaches sonic speed, and air in high-speed machinery, aircraft and gas pipelines is routinely compressible. Water's speed of sound is so high that steady flows of water are effectively incompressible, but its compressibility still matters for unsteady flows, as the water-hammer waves of MEC-270 showed.

The speed of sound

A sound wave is a weak pressure disturbance travelling through a fluid. Applying conservation of mass and momentum to a control volume that moves with a weak wave gives its speed, \(c^2 = (\partial p/\partial \rho)\), taken at constant entropy because sound waves are too fast and too weak for heat transfer or friction to matter. For a liquid, this is the square root of the bulk modulus over density. For an ideal gas undergoing an isentropic change, \(p/\rho^k\) is constant, which gives:

\[c = \sqrt{\frac{K}{\rho}} \quad\text{(liquid)}, \qquad c = \sqrt{k R T} \quad\text{(ideal gas)}\]

where k is the ratio of specific heats, 1.4 for air, R is the gas constant, 287 J/(kg·K) for air, and T is the absolute temperature. The speed of sound in a gas depends only on its temperature, not its pressure. At 20 °C, sound travels at 343 m/s in air and about 1,480 m/s in water. In a water-filled pipe, the elastic walls stretch as a pressure wave passes, which lowers the effective wave speed; the Korteweg formula used in MEC-270 for water hammer gives about 1,190 m/s for the 600 mm steel main.

Speed of sound in air at several temperatures, in water and in the steel transmission main; Mach number and stagnation properties in the air-scour blower discharge; the error of the incompressible pitot formula; and Mach angles.
# Compressible flow fundamentals: sound speed, Mach number and stagnation properties
import math
k, R = 1.4, 287.0
def c_air(T): return math.sqrt(k * R * T)
print("Speed of sound in air:")
for TC in (-30, 0, 20, 90):
    print(f"  {TC:>4} C: {c_air(TC + 273.15):5.1f} m/s")
# Liquids: c = sqrt(K/rho); in an elastic pipe the wave speed is lower (Korteweg)
K, rho_w = 2.2e9, 998.0
c_w = math.sqrt(K / rho_w)
D, t, E = 0.600, 0.012, 200e9       # steel transmission main
a_pipe = c_w / math.sqrt(1 + K * D / (E * t))
print(f"Water: {c_w:.0f} m/s in open water, {a_pipe:.0f} m/s in the 600 mm steel main (water hammer wave)")

# Aeration blower discharge: is the air flow compressible?
p_atm = 95.4e3
mdot = 1.6                           # kg/s of air
p2, T2 = p_atm + 62e3, 273.15 + 75   # discharge pressure and temperature
Dpipe = 0.30
rho2 = p2 / (R * T2)
V = mdot / (rho2 * math.pi * Dpipe**2 / 4)
M = V / c_air(T2)
print(f"\nBlower discharge: density {rho2:.3f} kg/m3, velocity {V:.1f} m/s, Mach {M:.3f}")
# Stagnation temperature and pressure from the static values
T0 = T2 * (1 + (k - 1) / 2 * M**2)
p0 = p2 * (1 + (k - 1) / 2 * M**2) ** (k / (k - 1))
print(f"  stagnation temperature {T0-273.15:.2f} C (static {T2-273.15:.1f} C); stagnation pressure {p0/1000:.2f} kPa")
# Error of the incompressible pitot formula at several Mach numbers
print("Pitot tube: error in velocity if Bernoulli's incompressible formula is used")
for M in (0.1, 0.2, 0.3, 0.5, 0.8):
    ratio = (1 + 0.2 * M**2) ** 3.5         # p0/p for k = 1.4
    cp_true = (ratio - 1) / (0.7 * M**2)    # (p0 - p)/(0.5 rho V^2), equals 1 + M^2/4 + ...
    print(f"  M = {M:.1f}: (p0 - p)/(rho V^2/2) = {cp_true:.4f}, velocity overestimated by {(math.sqrt(cp_true)-1)*100:.1f} %")
# Mach cone half-angle for supersonic motion
for M in (1.2, 2.0, 3.0):
    print(f"Mach {M}: Mach angle {math.degrees(math.asin(1/M)):.1f} deg")
Output
Speed of sound in air:
   -30 C: 312.6 m/s
     0 C: 331.3 m/s
    20 C: 343.2 m/s
    90 C: 382.0 m/s
Water: 1485 m/s in open water, 1193 m/s in the 600 mm steel main (water hammer wave)

Blower discharge: density 1.575 kg/m3, velocity 14.4 m/s, Mach 0.038
  stagnation temperature 75.10 C (static 75.0 C); stagnation pressure 157.56 kPa
Pitot tube: error in velocity if Bernoulli's incompressible formula is used
  M = 0.1: (p0 - p)/(rho V^2/2) = 1.0025, velocity overestimated by 0.1 %
  M = 0.2: (p0 - p)/(rho V^2/2) = 1.0100, velocity overestimated by 0.5 %
  M = 0.3: (p0 - p)/(rho V^2/2) = 1.0227, velocity overestimated by 1.1 %
  M = 0.5: (p0 - p)/(rho V^2/2) = 1.0641, velocity overestimated by 3.2 %
  M = 0.8: (p0 - p)/(rho V^2/2) = 1.1704, velocity overestimated by 8.2 %
Mach 1.2: Mach angle 56.4 deg
Mach 2.0: Mach angle 30.0 deg
Mach 3.0: Mach angle 19.5 deg

The Mach number and flow regimes

The Mach number divides gas flows into regimes with different behaviour. Below about 0.3, flow is effectively incompressible. From 0.3 to about 0.8, flow is subsonic but compressible: densities change and corrections are needed, but the flow pattern is similar to incompressible flow. From about 0.8 to 1.2, the transonic range, parts of the flow are supersonic while others are subsonic, and small shocks appear; airliners cruise at the edge of this range. Above M = 1 the flow is supersonic, and above about 5 it is called hypersonic.

The physical difference between subsonic and supersonic flow is about how information travels. A small disturbance sends pressure waves outward at the speed of sound. If a source of disturbance moves slower than sound, its waves run ahead of it, and the fluid upstream is warned of its approach and starts to move aside smoothly. If it moves faster than sound, its waves cannot get ahead of it. They pile up along a cone, the Mach cone, whose half-angle μ satisfies \(\sin\mu = 1/M\). The fluid ahead of the cone receives no warning at all, and outside it the flow is undisturbed. This is why the sound of a supersonic aircraft arrives only after it has passed, as a sonic boom.

Four panels showing circular sound waves emitted at equal time intervals by a moving point source. With the source stationary the circles are concentric. At Mach 0.5 they crowd ahead of the source. At Mach 1 they all touch at the source, forming a flat front. At Mach 2 they lie inside a cone of half-angle 30 degrees, labelled Mach cone.
Waves from a moving source at Mach 0, 0.5, 1 and 2.

Stagnation properties

For steady adiabatic flow of a gas without shaft work, the energy equation from thermodynamics says that the stagnation enthalpy \(h_0 = h + V^2/2\) is constant along the flow. For an ideal gas with constant specific heat \(c_p\), the corresponding stagnation temperature \(T_0 = T + V^2/(2c_p)\) is constant. Dividing through by T and using \(c_p = kR/(k-1)\) and \(c^2 = kRT\) gives the stagnation temperature ratio in terms of the Mach number:

\[\frac{T_0}{T} = 1 + \frac{k-1}{2}M^2\]

If the flow is also brought to rest isentropically, without friction, the stagnation pressure and density follow from the isentropic relations:

\[\frac{p_0}{p} = \Big(1 + \frac{k-1}{2}M^2\Big)^{k/(k-1)}, \qquad \frac{\rho_0}{\rho} = \Big(1 + \frac{k-1}{2}M^2\Big)^{1/(k-1)}\]

The stagnation temperature is what a thermometer measures when it brings the flow to rest on its surface; in fast flows it reads higher than the static temperature. Stagnation pressure is what a pitot tube measures. In an isentropic flow both are constant; friction and shocks reduce the stagnation pressure, while heat transfer changes the stagnation temperature. These quantities act as reference values: once \(T_0\) and \(p_0\) are known, the static temperature and pressure anywhere in the flow follow from the local Mach number.

Worked problem

Stagnation temperature on a fast probe

Air at a static temperature of 20 °C flows at 250 m/s. What temperature would a probe that brings the flow to rest read?

Show solution
  1. \(c = \sqrt{1.4 \times 287 \times 293.15} = 343.2\) m/s, so M = 0.728.
  2. \(T_0 = 293.15\,(1 + 0.2 \times 0.728^2) = 293.15 \times 1.106 = 324.2\) K, or about 51 °C.

Answer: The probe reads about 31 °C above the static temperature. In the air-scour blower discharge, where the air moves at only 14 m/s, the difference is 0.1 °C and is lost in the instrument's uncertainty.

The air-scour blower

The filters at the treatment plant are cleaned by air scour followed by a water backwash. A positive-displacement blower draws air from the gallery and delivers it to the filter underdrains at about 62 kPa above atmospheric pressure. The blower's discharge pipe is 300 mm in diameter and carries 1.6 kg/s of air at about 75 °C, hot because compression raises the temperature. The program shows that the air moves at about 14 m/s, a Mach number of only 0.04. The flow in the pipe is effectively incompressible, and the static and stagnation temperatures differ by only 0.1 °C. But compressibility is still present in two ways. Across the blower itself, the pressure rises by about 65 percent and the density by about 40 percent, so the blower's volume flow at the inlet is much larger than at the outlet. And when the air leaves through the nozzles in the filter underdrain, the pressure falls sharply and the flow through each small orifice may approach sonic speed, a case Lesson 9 analyses.

Compressibility and the pitot tube

MEC-270 used the pitot tube with Bernoulli's equation, \(p_0 - p = \tfrac12\rho V^2\). For a gas, expanding the isentropic stagnation pressure ratio for small M shows that the true pressure difference is larger:

\[\frac{p_0 - p}{\tfrac12\rho V^2} = 1 + \frac{M^2}{4} + \frac{2-k}{24}M^4 + \cdots\]

The program shows that the incompressible formula overestimates the velocity by only 0.5 percent at Mach 0.2 and 1.1 percent at Mach 0.3, but by more than 3 percent at Mach 0.5 and 8 percent at Mach 0.8. Air-data instruments on aircraft therefore use the compressible relation, and above Mach 1 the probe is preceded by a shock wave and another relation, the Rayleigh pitot formula, applies.

Energy and the Mach number in a pipe

Compressible flow can be described by the same conservation laws as incompressible flow, with density allowed to vary and the energy equation coupled to momentum. One simple consequence follows from combining continuity and momentum for a steady one-dimensional isentropic flow in a passage of slowly varying area A:

\[\frac{dA}{A} = (M^2 - 1)\,\frac{dV}{V}\]

For M below 1, the bracket is negative, so a decreasing area speeds the flow up, as in every nozzle met so far. For M above 1 the bracket is positive, and a decreasing area slows the flow down; to accelerate a supersonic flow, the passage must widen. At M = 1 the area must be at a minimum. This single relation explains why rocket and steam-turbine nozzles converge and then diverge, why a simple converging nozzle can never produce supersonic flow at its exit, and why the flow through a valve or orifice chokes at sonic speed. Lesson 9 develops these results.

Real gases, steam and other fluids

The relations in this lesson assume an ideal gas with constant specific heats. That is accurate for air and nitrogen at ordinary temperatures and moderate pressures. Steam, refrigerants and natural gas at high pressure deviate from ideal behaviour and need property tables or equations of state, as in MEC-330. For natural gas in transmission pipelines, the compressibility factor Z corrects the ideal gas law, and pipeline engineers apply compressible-flow equations with friction. Air with water droplets, or a pipe with air pockets and water slugs, as in a main being filled, behaves very differently from either pure fluid; even a small fraction of air by volume lowers the wave speed in water dramatically, which is one reason air is removed from water mains.

In Canada, compressed-air receivers and piping above specified pressure and volume limits are pressure equipment regulated by the provinces, generally under the CSA B51 code for boilers, pressure vessels and pressure piping. In Saskatchewan, the provincial boiler and pressure vessel safety program registers and inspects the plant's air receiver.

Common mistakes

  • MistakeTreating any gas flow as compressible.

    InsteadBelow about M = 0.3 the density changes by less than 5 percent and incompressible methods are fine.

  • MistakeThinking the speed of sound in air depends on pressure.

    InsteadFor an ideal gas, c = √(kRT) depends only on temperature.

  • MistakeUsing Celsius in c = √(kRT).

    InsteadUse absolute temperature in kelvins.

  • MistakeUsing the incompressible pitot formula at high Mach number.

    InsteadAbove about M = 0.3 use the compressible stagnation pressure relation.

  • MistakeAssuming a converging nozzle can produce supersonic flow.

    InsteadIn a converging passage the Mach number can reach 1 only at the exit; supersonic flow needs a diverging section.

Summary and key terms

  • Compressibility matters when the Mach number exceeds about 0.3, where density changes by about 5 percent.
  • The speed of sound is √(K/ρ) in liquids and √(kRT) in ideal gases; it is 343 m/s in air at 20 °C and about 1,480 m/s in water.
  • Supersonic sources produce a Mach cone with half-angle μ = arcsin(1/M).
  • Stagnation temperature T₀/T = 1 + (k − 1)M²/2 is constant in adiabatic flow; stagnation pressure is constant only if the flow is also frictionless.
  • The air-scour blower discharge runs at only M ≈ 0.04, but compressibility matters across the blower and at the underdrain orifices.
  • dA/A = (M² − 1)dV/V: subsonic flow speeds up in converging passages, supersonic flow in diverging ones.
Compressible flow
Flow in which density changes significantly along the flow.
Speed of sound
The speed at which weak pressure waves travel through a fluid.
Mach number
The ratio of flow speed to the local speed of sound.
Mach cone
The cone that bounds the region disturbed by a supersonic source.
Stagnation temperature
The temperature reached when a flow is brought to rest adiabatically.
Stagnation pressure
The pressure reached when a flow is brought to rest isentropically.
Isentropic flow
Flow that is adiabatic and frictionless, so entropy is constant.
Ratio of specific heats
The ratio k = c_p/c_v, 1.4 for air.
Transonic flow
Flow with both subsonic and supersonic regions, near M = 1.
Sonic boom
The pressure jump heard when the shock waves of a supersonic body pass an observer.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Find the speed of sound in air at −20 °C.

    Show answer

    √(1.4 × 287 × 253.15) ≈ 319 m/s.

  2. A car at 120 km/h moves through air at 20 °C. What is its Mach number?

    Show answer

    33.3/343 ≈ 0.097.

  3. Air at 100 kPa and 300 K moves at Mach 0.6. Find the stagnation pressure and temperature.

    Show answer

    p₀ = 127.6 kPa; T₀ = 321.6 K.

  4. An aircraft at Mach 1.5 flies overhead. What is the Mach angle?

    Show answer

    41.8°.

  5. In the program, raise the blower's air flow to 3.2 kg/s. Is the discharge pipe flow still incompressible?

    Show answer

    Yes; the velocity doubles to about 29 m/s, M ≈ 0.08.

  6. By what fraction does the density of air change when it is brought to rest from Mach 0.3?

    Show answer

    About 4.5 percent.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz