Compressible Flow & Shock Wave Calculator
Solve isentropic, normal-shock, oblique-shock and Prandtl-Meyer compressible-flow relations by Mach number. Perfect-gas results matching NACA 1135 tables, free.
Flow visualization (oblique shock)
State 1 (Upstream Condition)
State 2 (Downstream Condition)
A clear path from inputs to results.
Solve one-dimensional compressible-flow relations for a perfect gas from a single Mach number: isentropic stagnation ratios, normal-shock jumps, oblique-shock angles, and Prandtl-Meyer expansion. It is built for aerospace and mechanical-engineering students and anyone sizing nozzles, intakes, or supersonic wind-tunnel runs who needs textbook-accurate numbers without opening a gas-dynamics table.
How to use
- Choose a flow regime: Isentropic (nozzle/area change), Normal Shock, Oblique Shock (compression over a wedge), or Expansion Fan (Prandtl-Meyer turning).
- Set the gas properties: ratio of specific heats gamma (default 1.4 for air, adjustable 1.1-1.67), gas constant R (default 287.05 J/kg-K), and Prandtl number (default 0.72).
- Enter the upstream Mach number M1 (0.1-5), the static temperature T1 in kelvin (default 300 K), and the static pressure p1 in pascals (default 101325 Pa).
- For an isentropic case, enter the area ratio A/A*; for oblique or expansion cases, enter the flow deflection (wedge) angle in degrees.
- For an oblique shock, pick the weak or strong solution branch — the tool solves the theta-beta-M relation and warns if the requested deflection exceeds the maximum attached-shock angle.
- Read the downstream state and stagnation ratios in the Results panels; use the preset buttons (Mach 2 isentropic, Mach 3 normal shock, Mach 1.5 oblique, Mach 2.5 expansion) to load standard textbook cases.
The formula
Reference: NACA Report 1135, "Equations, Tables, and Charts for Compressible Flow" (Ames Research Staff, 1953); Anderson, Modern Compressible Flow, 3rd ed., chs. 3-4.
Worked example
Mach 3 normal shock in air (sea-level static conditions)
- Regime Normal Shock; M1 = 3.0; gamma = 1.4; R = 287.05 J/kg-K; T1 = 300 K; p1 = 101325 Pa (101.325 kPa).
- 1
Downstream Mach follows M2^2 = (1 + 0.2 M1^2) / (1.4 M1^2 - 0.2) = (1 + 1.8) / (12.6 - 0.2) = 2.8 / 12.4, so M2 = 0.4752. The static pressure ratio is p2/p1 = 1 + (2.8/2.4)(9 - 1) = 10.3333, the density ratio rho2/rho1 = 3.8571, and the temperature ratio T2/T1 = 10.3333 / 3.8571 = 2.6790, giving T2 = 803.70 K and p2 = 1047.03 kPa. The upstream sound speed is a1 = sqrt(1.4 x 287.05 x 300) = 347.22 m/s, so V1 = 1041.66 m/s and V2 = 270.06 m/s. The stagnation-pressure ratio across the shock is pt2/pt1 = 0.32834 (a 67% loss), and the entropy rise is ds = 319.69 J/kg-K.
M2 = 0.4752, p2 = 1047.03 kPa, T2 = 803.70 K, V2 = 270.06 m/s; stagnation-pressure recovery pt2/pt1 = 0.3283 and total-pressure-to-upstream-static pt2/p1 = 12.06.
Interpreting the result
A normal shock always slows supersonic flow to subsonic (M2 < 1), raises static pressure, temperature, and density, and destroys stagnation pressure through the entropy rise — the pt2/pt1 ratio is the single most important number for intake and diffuser efficiency. For isentropic cases, the stagnation ratios tell you reservoir-to-throat conditions; for oblique shocks, the weak branch is the one that occurs in almost all practical attached-flow problems, while the strong branch leads to a detached (subsonic) condition.
Assumptions & limitations
- The gas is calorically perfect: gamma and R are constant and independent of temperature, so results drift from reality at high temperatures where vibrational excitation and dissociation matter (roughly above 1000-1500 K for air).
- Flow is steady, adiabatic, and one-dimensional for the isentropic and normal-shock relations; real nozzles have boundary layers and multi-dimensional effects not captured here.
- Shocks are treated as infinitesimally thin discontinuities with no internal structure; viscosity and heat conduction set the real (very small) shock thickness.
- The oblique-shock solver returns attached-shock angles only; if the requested deflection exceeds the maximum turning angle for that Mach number, no attached solution exists and the real shock detaches.
- The Prandtl number is carried for reference and secondary estimates; it does not enter the inviscid isentropic or shock jump relations.
Frequently asked questions
Why does a normal shock lose so much stagnation pressure?
A shock is an irreversible, entropy-generating process. In the Mach 3 example the stagnation-pressure ratio pt2/pt1 is 0.3283, meaning about 67% of the usable total pressure is lost across a single normal shock. This is why supersonic intakes use a series of weaker oblique shocks instead of one strong normal shock — each oblique shock recovers far more total pressure.
What value of gamma should I use?
Use 1.4 for air and other diatomic gases at ordinary temperatures (the default). Use about 1.667 for monatomic gases like helium and argon, and roughly 1.3 for combustion products or triatomic gases such as CO2. The tool lets you set gamma from 1.1 to 1.67 to cover these cases, but remember the perfect-gas assumption breaks down at very high temperatures.
Why is the downstream temperature after the shock so high?
The kinetic energy of the supersonic flow is converted into thermal energy as the flow decelerates abruptly. In the Mach 3 example the static temperature jumps from 300 K to 803.70 K across the shock. The stagnation temperature, by contrast, is conserved across an adiabatic shock, so Tt is the same on both sides even though static T rises sharply.
What is the difference between the weak and strong oblique-shock branches?
For a given Mach number and deflection angle below the maximum, the theta-beta-M relation has two solutions: a weak shock (smaller wave angle beta, flow usually stays supersonic) and a strong shock (larger beta, flow becomes subsonic). Nature almost always selects the weak solution for attached external flows; the strong branch appears mainly behind detached bow shocks and in specific back-pressure-controlled internal flows.
Does this calculator handle choked nozzle flow?
Yes, through the isentropic area-Mach relation A/A* = (1/M)[(2/(gamma+1))(1 + ((gamma-1)/2)M^2)]^((gamma+1)/(2(gamma-1))). A given area ratio above 1 has both a subsonic and a supersonic solution; the solver returns the branch you select, which lets you analyze converging-diverging nozzles upstream and downstream of the sonic throat (M = 1 at A/A* = 1).
How accurate are the numbers compared with published tables?
The relations are the exact closed-form perfect-gas equations from NACA Report 1135, evaluated with 40-significant-digit decimal arithmetic, so the outputs match standard gas-dynamics tables to all printed digits. The limits on accuracy come from the perfect-gas model itself, not from the arithmetic.
Methodology last reviewed 2026-10-06. Results are informational and not financial or engineering advice — see our disclaimer.