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.

Exit Mach number2.940pe 29.79 kPa · Te 109.9 K
Mass flow2.932 kg/sthrust 1452.5 N · Ve 618 m/s

Overexpanded: supersonic at the exit but below the back pressure; oblique shocks outside adjust it.

Mach number and p/p0 along the worked-example nozzle: supersonic at the exit, overexpandedthroat13010Mach Mp / p₀
  • 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.

Mach number and p/p0 along the worked-example nozzle: supersonic at the exit, overexpandedthroat13010Mach Mp / p₀
The worked example below: air from 10 bar, 300 K through a 4:1 nozzle into 1 atm. Mach number (green) rises through 1 at the throat; pressure (blue) falls to 0.030 p0 at the exit. Nozzle outline to scale in radius (√A); the axial shape is illustrative, only the area ratios matter in 1D flow.

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 pressureFlow in the nozzleNotes
pb > pb1Subsonic everywhere, not chokedMass flow depends on pb
pb = pb1Mach 1 at the throat, subsonic after itChoked: mass flow fixed from here down
pb2 < pb < pb1Normal shock in the diverging partShock moves to the exit as pb falls
pb = pb2Normal shock at the exit plane
pb3 < pb < pb2Overexpanded: oblique shocks outsideSupersonic all through the diverging part
pb = pb3Design (ideally expanded)pe = pb, the most thrust
pb < pb3Underexpanded: 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:

NozzleAe/Atpb1/p0 (chokes)pb2/p0 (shock at exit)pb3/p0 (design)Design exit Mach
Worked example40.98510.29540.02982.940
Anderson's nozzle5.950.99330.20850.01603.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.

The same nozzle with back pressure 0.6 p0: a normal shock in the diverging partthroat12.5010Mach Mp / p₀shock
Back pressure 0.6 p0 on the 4:1 nozzle: supersonic to the shock (red), subsonic after it. The pressure jumps across the shock and recovers towards the exit.

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)ρ/ρ0T/T0p/p0MρAV
Exact0.63390.83330.52831.00000.5787
Non-conservative, 31 nodes, 1,400 steps0.63870.83650.53420.99940.5838
Conservative, 31 nodes, 1,400 steps0.65020.83990.54620.98200.5852
Mach number along Anderson's nozzle: exact (line) and a 31-node non-conservative MacCormack run after 1,400 steps (dots)012300.511.522.53
Mach number against x along Anderson's nozzle (inlet x = 0, throat 1.5, exit 3): exact solution (line) and our 31-node non-conservative MacCormack result after 1,400 steps (dots). Exit Mach 3.353 against the exact 3.359.

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)
NodexA/Atρ/ρ0T/T0p/p0MM, our 31-node run
10.05.9500.99520.99810.99330.09780.0988
20.15.3120.99400.99760.99160.10970.1121
30.24.7180.99240.99690.98930.12380.1253
40.34.1680.99020.99610.98630.14050.1428
50.43.6620.98720.99490.98220.16050.1625
60.53.2000.98320.99320.97650.18460.1870
70.62.7820.97750.99090.96870.21380.2162
80.72.4080.96960.98770.95760.24940.2521
90.82.0780.95830.98310.94210.29310.2958
100.91.7920.94230.97650.92020.34680.3496
111.01.5500.91960.96700.88930.41290.4155
121.11.3520.88780.95350.84650.49370.4962
131.21.1980.84430.93450.78900.59190.5938
141.31.0880.78700.90870.71510.70900.7102
151.41.0220.71600.87490.62640.84550.8459
161.51.0000.63390.83330.52831.00000.9994
171.61.0220.54660.78530.42921.16901.1674
181.71.0880.46080.73350.33801.34791.3451
191.81.1980.38230.68070.26031.53141.5276
201.91.3520.31450.62960.19801.71511.7103
212.01.5500.25820.58180.15021.89581.8901
222.11.7920.21250.53820.11442.07122.0646
232.22.0780.17600.49910.08782.24012.2330
242.32.4080.14680.46420.06822.40222.3942
252.42.7820.12360.43330.05352.55732.5490
262.53.2000.10490.40580.04262.70562.6963
272.63.6620.08990.38140.03432.84752.8386
282.74.1680.07760.35970.02792.98342.9725
292.84.7180.06750.34030.02303.11363.1052
302.95.3120.05920.32280.01913.23873.2249
313.05.9500.05230.30710.01603.35903.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.
Write your own CFD solver

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

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.
Free counselling

From a nozzle code to a CFD career.

Writing a solver from scratch is how CFD engineers learn why meshes, time steps and boundary conditions matter. A Skill-Lync counsellor can map the course that fits the role you want.

Talk to a CFD course counsellor

Free. We call you back, usually the same day.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.