Converging-diverging nozzle calculator
Enter the supply pressure and temperature, the throat size, the area ratio and the back pressure. The calculator tells you whether the nozzle is choked, where the normal shock sits, the exit Mach number, pressure and velocity, the mass flow and the thrust. It also has isentropic and normal-shock tables for any γ, and a check of your MacCormack code against the exact solution of Anderson's nozzle. Free, no sign-up, runs in your browser.
1D isentropic flow + normal shock · any ideal gas · checked against NACA Report 1135 and Skill-Lync's own MacCormack runs · Updated 19 Nov 2026
One-dimensional, steady, adiabatic, frictionless ideal gas with constant γ; supply at rest. Back pressure is the pressure the nozzle exhausts into. The shock is a normal shock; outside the exit the calculator only says whether oblique shocks or expansion fans follow.
Static-to-stagnation ratios, the area ratio to the sonic throat A*, Mach angle μ and Prandtl-Meyer angle ν; for M > 1 the normal-shock jump too.
Anderson's nozzle, A/At = 1 + 2.2(x − 1.5)², 0 ≤ x ≤ 3, γ = 1.4, nondimensional (ρ/ρ0, T/T0, V/a0). The throat is at x = 1.5 (node 16 of 31). Leave a box empty to skip it.
Overexpanded: supersonic at the exit but below the back pressure; oblique shocks outside adjust it.
- Critical back pressures: chokes below 9.851 bar, shock at the exit at 2.954 bar, design 29.79 kPa (exit Mach 2.940).
- Ideal area ratio for 10.000 bar into 1.013 bar: Ae/At = 1.916 (exit Mach 2.149).
- Thrust coefficient Cf = F/(p0 At) = 1.156; throat area 1256.6 mm², exit diameter 80.0 mm.
How a converging-diverging nozzle works
Squeeze a subsonic flow through a narrowing duct and it speeds up, like water from a hose when you pinch the end. A supersonic flow does the opposite: to go faster it needs a widening duct, because its density falls faster than its speed rises. A converging-diverging (C-D, or de Laval) nozzle uses both. The gas accelerates to exactly Mach 1 at the narrowest point, the throat, and keeps accelerating in the diverging part, provided the pressure downstream is low enough.
For steady, frictionless, adiabatic flow of an ideal gas, everything follows from the Mach number and the stagnation (supply) state:
A* is the area where the flow would be sonic. Each area ratio A/A* has two answers, a subsonic and a supersonic Mach number, and which one the flow takes depends on the back pressure.
The three critical back pressures
Start with the back pressure equal to the supply pressure (no flow) and lower it. Three values of pb/p0, set only by Ae/At and γ, divide what happens:
| Back pressure | Flow in the nozzle | Notes |
|---|---|---|
| pb > pb1 | Subsonic everywhere, not choked | Mass flow depends on pb |
| pb = pb1 | Mach 1 at the throat, subsonic after it | Choked: mass flow fixed from here down |
| pb2 < pb < pb1 | Normal shock in the diverging part | Shock moves to the exit as pb falls |
| pb = pb2 | Normal shock at the exit plane | |
| pb3 < pb < pb2 | Overexpanded: oblique shocks outside | Supersonic all through the diverging part |
| pb = pb3 | Design (ideally expanded) | pe = pb, the most thrust |
| pb < pb3 | Underexpanded: expansion fans outside |
pb1 is the subsonic isentropic exit pressure for Ae/At, pb3 the supersonic one, and pb2 is pb3 multiplied by the normal-shock pressure ratio at the exit Mach number. For air:
| Nozzle | Ae/At | pb1/p0 (chokes) | pb2/p0 (shock at exit) | pb3/p0 (design) | Design exit Mach |
|---|---|---|---|---|---|
| Worked example | 4 | 0.9851 | 0.2954 | 0.0298 | 2.940 |
| Anderson's nozzle | 5.95 | 0.9933 | 0.2085 | 0.0160 | 3.359 |
Notice how little it takes to choke a nozzle with a big area ratio: Anderson's nozzle chokes at 0.67% below the supply pressure, because the subsonic flow at its 5.95:1 exit is barely moving. Once choked, the mass flow is fixed by the throat and the supply:
For γ = 1.4 the constant is 0.6847, so 1 bar of supply pressure through 1 cm² of throat at 300 K passes 23.3 g/s of air. The mass flow does not depend on the back pressure or the exit area at all once the throat is sonic.
Worked example: a 10 bar air nozzle into the atmosphere
Air from a tank at 10 bar and 300 K, a 40 mm throat (12.57 cm²) and an exit four times the throat area, exhausting to 1.01325 bar. pb/p0 = 0.1013 lies between pb3 and pb2, so the nozzle runs supersonic all the way and is overexpanded:
The exit pressure, 29.8 kPa, is well below the atmosphere, so the pressure term in the thrust is negative: the 4:1 nozzle over-expands the gas and loses thrust. The ideal area ratio for 10 bar into 1 atm is 1.916 (exit Mach 2.149), which gives 1577 N, 8.6% more from the same throat and the same mass flow. Thrust is the highest when pe = pb, which is why rocket nozzles for the upper stages, working near vacuum, have much larger area ratios than first-stage ones.
The exit temperature is 110 K (-163 °C). Expanding cold air to Mach 3 freezes the moisture out of it; supersonic wind tunnels dry their air for that reason.
A normal shock inside the nozzle
Raise the back pressure of the same nozzle to 0.6 p0. That is above pb2 = 0.295 p0, so the supersonic flow cannot reach the exit: a normal shock stands in the diverging part, the flow behind it is subsonic and slows down to the exit. Across a normal shock:
The shock wastes stagnation pressure, so after it the flow needs a bigger sonic area A*₂ to carry the same mass. That gives a way to find the shock without trial and error: the exit pressure, exit area and supply are known, so
fixes the subsonic exit Mach number directly, then p02/p01, then the Mach number before the shock and its area. Here the shock sits at A/At = 2.019, where M = 2.208 jumps to 0.546, and 37.6% of the stagnation pressure is lost; the exit Mach number is 0.240.
Anderson's shock-capturing exercise uses his nozzle with pe = 0.6784 p0. The exact shock is at A/At = 1.790, x = 2.099, with M1 = 2.070. Our conservative MacCormack run with artificial viscosity (Cx = 0.2, 61 nodes, 5,000 steps) puts the steepest pressure rise at x ≈ 2.075, within one grid spacing.
The quasi-1D nozzle assignment: MacCormack's method
More than 500 Skill-Lync students have published their solver for this nozzle. The assignment comes from chapter 7 of John Anderson's Computational Fluid Dynamics: The Basics with Applications: a subsonic-supersonic isentropic nozzle of shape
with the reservoir at x = 0 and supersonic outflow at x = 3. You write the continuity, momentum and energy equations in nondimensional form, march them in time with MacCormack's predictor-corrector scheme (forward differences in the predictor, rearward in the corrector, then average) until they stop changing, and compare the conservative and non-conservative forms with the exact solution. Anderson's version, which the assignment follows, uses 31 grid points, a Courant number of 0.5 and 1,400 time steps.
Skill-Lync wrote both solvers independently and ran them. These are the numbers a correct code should give:
| At the throat (x = 1.5) | ρ/ρ0 | T/T0 | p/p0 | M | ρAV |
|---|---|---|---|---|---|
| Exact | 0.6339 | 0.8333 | 0.5283 | 1.0000 | 0.5787 |
| Non-conservative, 31 nodes, 1,400 steps | 0.6387 | 0.8365 | 0.5342 | 0.9994 | 0.5838 |
| Conservative, 31 nodes, 1,400 steps | 0.6502 | 0.8399 | 0.5462 | 0.9820 | 0.5852 |
Three things students usually ask about:
- The mass flow is not 0.579. The inflow boundary holds ρ = T = 1 at x = 0, but the exact flow there is already moving at M = 0.098, so the code is really solving a nozzle whose stagnation pressure is about 0.67% higher. The converged mass flow tends to 0.5820 as the grid is refined (non-conservative: 0.5838 on 31, 0.5825 on 61, 0.5821 on 121 nodes), and the gap to that value shrinks about four times for every halving of the grid spacing, as a second-order scheme should.
- Conservative vs non-conservative. The non-conservative form is slightly closer at the throat on 31 nodes, but its mass flow varies by 2.0% along the nozzle against 0.13% for the conservative form. Both errors fall with the grid: the largest error anywhere in ρ, T, p or M is 3.7% / 1.5% / 0.9% on 31 / 61 / 121 nodes (non-conservative) and 3.3% / 1.2% / 0.8% (conservative).
- How many steps. The non-conservative run is steady to plotting accuracy by 1,400 steps (its largest dρ/dt falls below 10⁻⁹ at 1,695); the conservative one creeps for much longer (14,590 steps to the same tolerance) but its throat values move only in the third decimal after 1,400. A finer grid needs proportionally more steps, because the time step shrinks with Δx.
Exact solution at all 31 nodes (for your comparison plots)
| Node | x | A/At | ρ/ρ0 | T/T0 | p/p0 | M | M, our 31-node run |
|---|---|---|---|---|---|---|---|
| 1 | 0.0 | 5.950 | 0.9952 | 0.9981 | 0.9933 | 0.0978 | 0.0988 |
| 2 | 0.1 | 5.312 | 0.9940 | 0.9976 | 0.9916 | 0.1097 | 0.1121 |
| 3 | 0.2 | 4.718 | 0.9924 | 0.9969 | 0.9893 | 0.1238 | 0.1253 |
| 4 | 0.3 | 4.168 | 0.9902 | 0.9961 | 0.9863 | 0.1405 | 0.1428 |
| 5 | 0.4 | 3.662 | 0.9872 | 0.9949 | 0.9822 | 0.1605 | 0.1625 |
| 6 | 0.5 | 3.200 | 0.9832 | 0.9932 | 0.9765 | 0.1846 | 0.1870 |
| 7 | 0.6 | 2.782 | 0.9775 | 0.9909 | 0.9687 | 0.2138 | 0.2162 |
| 8 | 0.7 | 2.408 | 0.9696 | 0.9877 | 0.9576 | 0.2494 | 0.2521 |
| 9 | 0.8 | 2.078 | 0.9583 | 0.9831 | 0.9421 | 0.2931 | 0.2958 |
| 10 | 0.9 | 1.792 | 0.9423 | 0.9765 | 0.9202 | 0.3468 | 0.3496 |
| 11 | 1.0 | 1.550 | 0.9196 | 0.9670 | 0.8893 | 0.4129 | 0.4155 |
| 12 | 1.1 | 1.352 | 0.8878 | 0.9535 | 0.8465 | 0.4937 | 0.4962 |
| 13 | 1.2 | 1.198 | 0.8443 | 0.9345 | 0.7890 | 0.5919 | 0.5938 |
| 14 | 1.3 | 1.088 | 0.7870 | 0.9087 | 0.7151 | 0.7090 | 0.7102 |
| 15 | 1.4 | 1.022 | 0.7160 | 0.8749 | 0.6264 | 0.8455 | 0.8459 |
| 16 | 1.5 | 1.000 | 0.6339 | 0.8333 | 0.5283 | 1.0000 | 0.9994 |
| 17 | 1.6 | 1.022 | 0.5466 | 0.7853 | 0.4292 | 1.1690 | 1.1674 |
| 18 | 1.7 | 1.088 | 0.4608 | 0.7335 | 0.3380 | 1.3479 | 1.3451 |
| 19 | 1.8 | 1.198 | 0.3823 | 0.6807 | 0.2603 | 1.5314 | 1.5276 |
| 20 | 1.9 | 1.352 | 0.3145 | 0.6296 | 0.1980 | 1.7151 | 1.7103 |
| 21 | 2.0 | 1.550 | 0.2582 | 0.5818 | 0.1502 | 1.8958 | 1.8901 |
| 22 | 2.1 | 1.792 | 0.2125 | 0.5382 | 0.1144 | 2.0712 | 2.0646 |
| 23 | 2.2 | 2.078 | 0.1760 | 0.4991 | 0.0878 | 2.2401 | 2.2330 |
| 24 | 2.3 | 2.408 | 0.1468 | 0.4642 | 0.0682 | 2.4022 | 2.3942 |
| 25 | 2.4 | 2.782 | 0.1236 | 0.4333 | 0.0535 | 2.5573 | 2.5490 |
| 26 | 2.5 | 3.200 | 0.1049 | 0.4058 | 0.0426 | 2.7056 | 2.6963 |
| 27 | 2.6 | 3.662 | 0.0899 | 0.3814 | 0.0343 | 2.8475 | 2.8386 |
| 28 | 2.7 | 4.168 | 0.0776 | 0.3597 | 0.0279 | 2.9834 | 2.9725 |
| 29 | 2.8 | 4.718 | 0.0675 | 0.3403 | 0.0230 | 3.1136 | 3.1052 |
| 30 | 2.9 | 5.312 | 0.0592 | 0.3228 | 0.0191 | 3.2387 | 3.2249 |
| 31 | 3.0 | 5.950 | 0.0523 | 0.3071 | 0.0160 | 3.3590 | 3.3532 |
What this calculator does not cover
- Friction and heat transfer (Fanno and Rayleigh flow), boundary layers and the discharge coefficient of a real nozzle, a little below 1 for a well-made one.
- Flow outside the exit. Over- and under-expanded jets form oblique shocks and expansion fans; real nozzles also separate inside before the shock reaches the throat when strongly overexpanded.
- Variable γ, real gases and condensation. Steam with γ = 1.3 is an ideal-gas approximation for superheated steam; wet steam needs steam tables. Rocket exhaust changes composition along the nozzle.
- 2D and 3D effects such as nozzle contour design (method of characteristics) and divergence losses of a conical nozzle.
The MacCormack nozzle is one of four projects in Skill-Lync's Introduction to CFD using MATLAB and OpenFOAM, with 2D heat conduction, a backward-facing step and automated blockMesh generation. CFD teams hire engineers who understand what the solver does, not only which buttons to press.
Frequently asked questions
When is a converging-diverging nozzle choked?
When the back pressure falls to the first critical value, the flow reaches Mach 1 at the throat and the mass flow stops rising. For air in a nozzle with exit-to-throat area ratio 4, that happens at pb = 0.985 p0. Lowering the back pressure further changes what happens downstream of the throat (a shock, then over- or under-expansion) but not the mass flow, which is fixed at ṁ = 0.6847 p0 At / √(R T0) for γ = 1.4.
Where does the normal shock sit in a C-D nozzle?
Between the first and second critical back pressures a normal shock stands in the diverging part. Its position comes from the exit: the flow behind the shock is subsonic and must leave at the back pressure, and the stagnation pressure lost across the shock fixes how big the second sonic area A*₂ is (p01 A*₁ = p02 A*₂). In Anderson's textbook nozzle (Ae/At = 5.95) an exit pressure of 0.6784 p0 puts the shock at A/At = 1.790, x = 2.099, where the Mach number before it is 2.070.
What are over-expanded and under-expanded nozzles?
Over-expanded: the nozzle expands the gas to a pressure below the back pressure, so the jet is squeezed back up by oblique shocks outside the exit (rocket engines at sea level, with their characteristic diamond pattern). Under-expanded: the gas leaves above the back pressure and keeps expanding through Prandtl-Meyer fans outside (the same engine high in the atmosphere). At the design pressure ratio the exit pressure equals the back pressure and the thrust is the highest for that chamber pressure.
What exact solution should my MacCormack code match?
For Anderson's nozzle, A = 1 + 2.2(x − 1.5)² on 0 ≤ x ≤ 3, the exact isentropic solution at the throat is ρ/ρ0 = 0.6339, T/T0 = 0.8333, p/p0 = 0.5283, M = 1 and mass flow ρAV = 0.5787; at the exit M = 1.0000 and p/p0 = 0.0160. A correct 31-node non-conservative MacCormack code after 1,400 steps gives ρ 0.6387, T 0.8365, p 0.5342, M 0.9994 at the throat.
Why is my mass flow 0.584 and not 0.579?
Mostly the inflow boundary, not your scheme. Anderson's set-up holds ρ = T = 1 at x = 0, but the gas there already moves at about M = 0.098. Fixing the static values at 1 makes the real stagnation pressure about 0.67% higher than 1, so the converged mass flow tends to 0.5820, not 0.5787. On 31 nodes the rest is truncation error: our runs give 0.5838 (non-conservative) and 0.5852 (conservative) at the throat, falling to 0.5821 on 121 nodes.
Conservative or non-conservative form: which is better?
Both are correct and converge to the same answer as the grid is refined. In our 31-node runs the non-conservative form is closer at the throat (M 0.999 against 0.982), but its mass flow wanders by 2.0% along the nozzle, while the conservative form holds it within 0.13%, because it conserves the fluxes exactly between cells. Only the conservative form can capture a shock in the right place.
What is the critical pressure ratio of air?
p*/p0 = (2/(γ+1))^(γ/(γ−1)) = 0.5283 for γ = 1.4, and T*/T0 = 0.8333. Superheated steam treated as an ideal gas with γ = 1.3 gives 0.5457. A converging-only nozzle chokes once the back pressure is below this.
Related on Skill-Lync
- Conservation vs non-conservation forms of the governing equations
- Discretization methods in CFD
- All about convergence criteria
- Student project: quasi-1D subsonic-supersonic nozzle flow with MacCormack's technique
- Flow over a cylinder calculator (Strouhal number, shedding frequency and Cd for the Fluent challenge)
- 2D heat conduction solver (the mid-term project of the same course)
- Rankine cycle calculator
- Adiabatic flame temperature calculator
- CFD courses compared
- All free engineering tools
Sources
- Ames Research Staff, Equations, Tables, and Charts for Compressible Flow, NACA Report 1135, 1953 (isentropic, normal-shock and Prandtl-Meyer tables used to check this page).
- J. D. Anderson, Computational Fluid Dynamics: The Basics with Applications, McGraw-Hill 1995, chapter 7 (quasi-one-dimensional nozzle, MacCormack's technique, conservative and non-conservative forms, shock capturing).
- J. D. Anderson, Modern Compressible Flow, McGraw-Hill (nozzle flow regimes, normal shock in a nozzle).
- R. W. MacCormack, "The effect of viscosity in hypervelocity impact cratering", AIAA Paper 69-354, 1969 (the predictor-corrector scheme).
- Skill-Lync, scripts/verify/nozzle.mjs: an independent script that re-derives every relation (bisection instead of Newton, a shock-position march instead of the closed form, numerical integration for Prandtl-Meyer), checks them against NACA 1135, and runs its own non-conservative and conservative MacCormack solvers on 31, 61 and 121 nodes. This page checks its numbers against that script at build time.