Compressible Flow Calculator

Solve isentropic flow and normal shock relations for a gas: Mach number, pressure, temperature and density ratios, static and stagnation values, speed of sound, area ratio and post-shock properties.

Flow Properties

Compressible flow calculator: what it does

A compressible flow calculator computes how a gas’s pressure, temperature and density change with speed when compressibility matters (roughly above Mach 0.3). This tool solves the two most common cases — isentropic (reversible, adiabatic) flow and the normal shock — returning Mach number, the pressure/temperature/density ratios, static and stagnation values, speed of sound, velocity, the area ratio A/A*, and post-shock conditions, for air, nitrogen, helium, CO₂ or a custom gas.

Key definitions

Compressible flow is gas flow in which density changes appreciably along the flow. Mach number M is the ratio of flow velocity to the local speed of sound, M = V / a, where the speed of sound is a = √(γRT). Stagnation (total) properties are the values the gas would have if brought to rest isentropically; static properties are the local values in the moving gas. The specific heat ratio γ = cp/cv (1.4 for air) and the specific gas constant R (287 J/kg·K for air) set the gas behaviour.

Flow regimes by Mach number: subsonic (M < 1), sonic (M = 1), supersonic (1 < M < 5) and hypersonic (M ≥ 5). Compressibility is usually negligible below M = 0.3.

The isentropic flow equations

For steady, reversible, adiabatic (isentropic) flow of a perfect gas, the ratios of stagnation to static properties depend only on M and γ. Let f = 1 + ½(γ−1)M².

Stagnation-to-static temperature ratio T₀/T = 1 + γ−12
Stagnation-to-static pressure ratio p₀/p = (1 + γ−12 M²)γ/(γ−1)
Stagnation-to-static density ratio ρ₀/ρ = (1 + γ−12 M²)1/(γ−1)
Area–Mach relation (A* is the sonic throat area) A/A* = 1M [2γ+1(1 + γ−12M²)](γ+1)/2(γ−1)

At the throat the flow is sonic (M = 1), giving the critical ratios. For air (γ = 1.4): p*/p₀ = 0.528, T*/T₀ = 0.833, ρ*/ρ₀ = 0.634. The speed of sound follows a = √(γRT) and velocity is V = M·a. For M > 1 the Mach angle is μ = sin⁻¹(1/M).

The normal shock relations

A normal shock is a thin, abrupt, irreversible compression that appears in supersonic flow (upstream M₁ > 1). Downstream flow is always subsonic. The Rankine–Hugoniot relations give:

Downstream Mach number M₂² = 1 + ½(γ−1)M₁²γM₁² − ½(γ−1)
Static pressure ratio p₂/p₁ = 1 + γ+1(M₁² − 1)
Density ratio ρ₂/ρ₁ = (γ+1)M₁²(γ−1)M₁² + 2
Temperature ratio T₂/T₁ = (p₂/p₁) ÷ (ρ₂/ρ₁)

Stagnation temperature is unchanged across a shock (T₀ constant), but stagnation pressure drops: p₀₂/p₀₁ < 1, reflecting the entropy rise. For air at M₁ = 2: M₂ = 0.577, p₂/p₁ = 4.5, T₂/T₁ = 1.688, ρ₂/ρ₁ = 2.667 and p₀₂/p₀₁ = 0.721.

How to use the calculator

  1. Choose the flow type — Isentropic Flow or Normal Shock.
  2. Select the gas to auto-fill γ and R (or pick Custom gas to enter your own).
  3. Enter the Mach number (M for isentropic; upstream M₁ > 1 for a shock).
  4. Enter the reference pressure and temperature (stagnation P₀, T₀ for isentropic; upstream P₁, T₁ for a shock) and choose the pressure unit.
  5. Click Calculate to read the ratios, static/stagnation values, speed of sound, velocity, and critical or post-shock properties. Export to PDF, Excel or text.

Worked examples

Example 1 — Isentropic nozzle flow at Mach 2

Given: air (γ = 1.4, R = 287), M = 2, stagnation P₀ = 500 kPa, T₀ = 300 K.

Solution: f = 1 + 0.2×2² = 1.8. Then p/p₀ = 1.8−3.5 = 0.1278 → static pressure = 500 × 0.1278 = 63.9 kPa. T/T₀ = 1/1.8 = 0.5556 → static temperature = 166.7 K. ρ/ρ₀ = 1.8−2.5 = 0.2300. Speed of sound a = √(1.4×287×166.7) = 258.8 m/s, so velocity V = 2 × 258.8 = 517.6 m/s. Area ratio A/A* = 1.6875; Mach angle μ = sin⁻¹(0.5) = 30°.

Example 2 — Normal shock at Mach 2.5

Given: air, upstream M₁ = 2.5, P₁ = 100 kPa, T₁ = 300 K.

Solution: M₂ = 0.513. p₂/p₁ = 1 + (2.8/2.4)(6.25−1) = 7.125 → P₂ = 712.5 kPa. ρ₂/ρ₁ = 3.333. T₂/T₁ = 7.125/3.333 = 2.1375 → T₂ = 641.3 K. Stagnation-pressure ratio p₀₂/p₀₁ = 0.499 — about half the stagnation pressure is lost across the shock.

Isentropic flow table (γ = 1.4)

Mp/p₀T/T₀ρ/ρ₀A/A*
0.10.99300.99800.99505.8218
0.20.97250.99210.98032.9635
0.30.93950.98230.95642.0351
0.50.84300.95240.88521.3398
0.80.65600.88650.74001.0382
1.00.52830.83330.63391.0000
1.50.27240.68970.39501.1762
2.00.12780.55560.23001.6875
2.50.05850.44440.13172.6367
3.00.02720.35710.07624.2346
4.00.00660.23810.027710.7188
5.00.00190.16670.011325.0000

Normal shock table (γ = 1.4)

M₁M₂p₂/p₁T₂/T₁ρ₂/ρ₁p₀₂/p₀₁
1.50.70112.45831.32021.86210.9298
2.00.57744.50001.68752.66670.7209
2.50.51307.12502.13753.33330.4990
3.00.475210.33332.67903.85710.3283
4.00.435018.50004.04694.57140.1388
5.00.415229.00005.80005.00000.0617

Gas properties reference

Gasγ = cp/cvR (J/kg·K)cp (J/kg·K)
Air1.40287.01005
Nitrogen (N₂)1.40296.81040
Oxygen (O₂)1.395259.8918
Helium (He)1.6620775193
Carbon dioxide (CO₂)1.289188.9846
Argon (Ar)1.667208.1520

Assumptions and limitations

These relations assume a calorically perfect ideal gas (constant γ and R), steady one-dimensional flow, and — for the isentropic case — no friction or heat transfer. They are accurate for air and similar gases at moderate temperatures and pressures. They lose accuracy when: temperatures are high enough to change cp or cause dissociation (hypersonic/high-enthalpy flow); pressure is very high or the gas is near condensation (real-gas effects); or when friction (Fanno flow), heat addition (Rayleigh flow) or oblique/2-D shock structure dominate. For those cases use dedicated Fanno, Rayleigh or oblique-shock methods.

Applications

Compressible-flow analysis is essential to rocket and jet-engine nozzles (converging–diverging / de Laval nozzles), gas-turbine and compressor design, supersonic wind tunnels, high-pressure pipe and valve flow, pitot-tube airspeed measurement, and CFD validation. The isentropic relations size nozzles and predict choking; the shock relations predict the losses and heating behind supersonic shocks.

Frequently asked questions

What is the difference between compressible and incompressible flow?

Flow is treated as compressible when density changes significantly as the gas moves — typically above about Mach 0.3, where density variation exceeds ~5%. Below that, density is nearly constant and the incompressible assumption is accurate.

At what Mach number does flow become compressible?

A common engineering rule of thumb is Mach 0.3. Below M = 0.3 the density change is under about 5% and incompressible relations are adequate; above it, use compressible relations.

How do I calculate stagnation pressure from static pressure?

For isentropic flow, p₀/p = (1 + ½(γ−1)M²)γ/(γ−1). For air at Mach 2, p₀/p = 7.824, so stagnation pressure is 7.824× the static pressure.

What is the critical pressure ratio and when does choking occur?

At the throat the Mach number reaches 1. For air the critical ratios are p*/p₀ = 0.528, T*/T₀ = 0.833, ρ*/ρ₀ = 0.634. When the back-pressure ratio drops to or below 0.528 the nozzle chokes and mass flow no longer increases.

How do you find properties behind a normal shock?

Use the normal-shock relations from the upstream Mach number M₁. For air at M₁ = 2: M₂ = 0.577, p₂/p₁ = 4.5, T₂/T₁ = 1.688, ρ₂/ρ₁ = 2.667, and p₀₂/p₀₁ = 0.721.

What is the specific heat ratio for air, helium and nitrogen?

Air: γ = 1.4 (R = 287). Nitrogen: γ = 1.4 (R = 296.8). Helium: γ = 1.66 (R = 2077). Carbon dioxide: γ = 1.289 (R = 188.9).

Can I use this calculator for real gases or only ideal gases?

It assumes a calorically perfect ideal gas with constant specific heats — accurate for air and similar gases at moderate conditions, but less so at very high temperature, near condensation, or at very high pressure where real-gas effects matter.

What is choked flow?

Choked flow occurs when the flow reaches Mach 1 at a nozzle throat. Once choked, lowering downstream pressure further does not increase mass flow; it is fixed by the stagnation conditions and throat area.

References

  • NASA Glenn Research Center — Isentropic Flow Relations and Normal Shock Relations.
  • J. D. Anderson, Modern Compressible Flow: With Historical Perspective, 3rd ed., McGraw-Hill.
  • NACA Report 1135, Equations, Tables, and Charts for Compressible Flow.

Reviewed for technical accuracy. Formulas follow the standard isentropic and Rankine–Hugoniot relations for a calorically perfect gas and are cross-checked against NASA Glenn and NACA 1135 reference values.

Last updated: July 1, 2026

Creator

shakeel-Muzaffar
Founder & Editor-in-Chief at  ~ Web ~  More Posts

Shakeel Muzaffar is the Founder and Editor-in-Chief of MultiCalculators.com, bringing over 15 years of experience in digital publishing, product strategy, and online tool development. He leads the platform's editorial vision, ensuring every calculator meets strict standards for accuracy, usability, and real-world value. Shakeel personally oversees content quality, formula verification workflows, and the platform's commitment to publishing tools that are genuinely useful for students, professionals, and everyday users worldwide.

Areas of Expertise: Editorial Leadership, Digital Publishing, Product Strategy, Online Calculators, Web Standards

Leave a Comment