Lesson 16 of 16

Mach Number and Compressible Flow

Mach Number and Compressible Flow

At high speeds, compressibility effects become important. The Mach number characterises how fast a flow moves relative to the local speed of sound.

Speed of Sound

In an ideal gas, the speed of sound depends only on temperature:

c=γRTc = \sqrt{\gamma R T}

where:

  • γ=1.4\gamma = 1.4 — ratio of specific heats for air (diatomic ideal gas)
  • R=287J/(kg\cdotpK)R = 287\,\text{J/(kg·K)} — specific gas constant for air
  • TT — absolute temperature in kelvin (K)

At 20 °C (293.15 K), c343c \approx 343 m/s. Sound travels faster in warmer air because higher temperature means faster molecular motion.

Mach Number

The Mach number MM is the ratio of flow speed vv to the local speed of sound cc:

M=vcM = \frac{v}{c}

RegimeMach Range
SubsonicM<1M < 1
TransonicM1M \approx 1
SupersonicM>1M > 1
HypersonicM>5M > 5

Mach Cone

When an object moves at supersonic speed (M>1M > 1), it outruns the pressure waves it creates. These waves pile up into a Mach cone (shock wave). The half-angle α\alpha of the cone satisfies:

sinα=1M(M>1)\sin \alpha = \frac{1}{M} \quad (M > 1)

α=arcsin ⁣(1M)\alpha = \arcsin\!\left(\frac{1}{M}\right)

At M=2M = 2, α=30°\alpha = 30°. Higher Mach numbers produce narrower cones.

Your Task

Implement:

  • speed_of_sound(T) — speed of sound in m/s for air at temperature TT (K). Use γ=1.4\gamma = 1.4, R=287R = 287 J/(kg·K).
  • mach_number(v, T) — Mach number for flow speed vv (m/s) at temperature TT (K).
  • mach_angle_deg(M) — Mach cone half-angle in degrees for M>1M > 1; return None if M1M \leq 1.
Python runtime loading...
Loading...
Click "Run" to execute your code.