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².
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:
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
- Choose the flow type — Isentropic Flow or Normal Shock.
- Select the gas to auto-fill γ and R (or pick Custom gas to enter your own).
- Enter the Mach number (M for isentropic; upstream M₁ > 1 for a shock).
- Enter the reference pressure and temperature (stagnation P₀, T₀ for isentropic; upstream P₁, T₁ for a shock) and choose the pressure unit.
- 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)
| M | p/p₀ | T/T₀ | ρ/ρ₀ | A/A* |
|---|---|---|---|---|
| 0.1 | 0.9930 | 0.9980 | 0.9950 | 5.8218 |
| 0.2 | 0.9725 | 0.9921 | 0.9803 | 2.9635 |
| 0.3 | 0.9395 | 0.9823 | 0.9564 | 2.0351 |
| 0.5 | 0.8430 | 0.9524 | 0.8852 | 1.3398 |
| 0.8 | 0.6560 | 0.8865 | 0.7400 | 1.0382 |
| 1.0 | 0.5283 | 0.8333 | 0.6339 | 1.0000 |
| 1.5 | 0.2724 | 0.6897 | 0.3950 | 1.1762 |
| 2.0 | 0.1278 | 0.5556 | 0.2300 | 1.6875 |
| 2.5 | 0.0585 | 0.4444 | 0.1317 | 2.6367 |
| 3.0 | 0.0272 | 0.3571 | 0.0762 | 4.2346 |
| 4.0 | 0.0066 | 0.2381 | 0.0277 | 10.7188 |
| 5.0 | 0.0019 | 0.1667 | 0.0113 | 25.0000 |
Normal shock table (γ = 1.4)
| M₁ | M₂ | p₂/p₁ | T₂/T₁ | ρ₂/ρ₁ | p₀₂/p₀₁ |
|---|---|---|---|---|---|
| 1.5 | 0.7011 | 2.4583 | 1.3202 | 1.8621 | 0.9298 |
| 2.0 | 0.5774 | 4.5000 | 1.6875 | 2.6667 | 0.7209 |
| 2.5 | 0.5130 | 7.1250 | 2.1375 | 3.3333 | 0.4990 |
| 3.0 | 0.4752 | 10.3333 | 2.6790 | 3.8571 | 0.3283 |
| 4.0 | 0.4350 | 18.5000 | 4.0469 | 4.5714 | 0.1388 |
| 5.0 | 0.4152 | 29.0000 | 5.8000 | 5.0000 | 0.0617 |
Gas properties reference
| Gas | γ = cp/cv | R (J/kg·K) | cp (J/kg·K) |
|---|---|---|---|
| Air | 1.40 | 287.0 | 1005 |
| Nitrogen (N₂) | 1.40 | 296.8 | 1040 |
| Oxygen (O₂) | 1.395 | 259.8 | 918 |
| Helium (He) | 1.66 | 2077 | 5193 |
| Carbon dioxide (CO₂) | 1.289 | 188.9 | 846 |
| Argon (Ar) | 1.667 | 208.1 | 520 |
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 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
- Shakeel Muzaffar
- Shakeel Muzaffar
- Shakeel Muzaffar




