Mach Architect: Learn Compressible Flow by Designing Nozzles
An interactive simulator for experiencing isentropic flow, choking, and normal shocks by directly tuning the geometry and back pressure of a converging-diverging nozzle.
Mach Architect#
Studying converging-diverging (C-D) nozzle flow from textbooks alone makes it hard to develop intuition about how the area ratio and back-pressure ratio change the flow regime.
Design the nozzle yourself, then turn the back-pressure dial. Clear four levels and you'll absorb the essentials of 1D compressible nozzle flow.
Controls#
- Nozzle geometry: drag the blue control points on the SVG up and down to adjust cross-section
- Back pressure: the right-side slider sets
- Level select: switch with the LV1–LV4 buttons at the top
Level Walkthrough#
Level 1: Subsonic Acceleration#
The most basic case. In a converging nozzle, subsonic flow accelerates as the area shrinks. The isentropic relation:
Since , decreasing increases . The goal is exit Mach 0.45–0.55.
Level 2: Choking#
When the flow chokes, at the throat. Lowering back pressure further leaves the upstream mass flow unchanged.
Critical pressure ratio ():
Drop back pressure below this value, or make the throat narrow enough.
Level 3: Supersonic Nozzle Design#
In a C-D nozzle, the flow accelerates supersonically once the area opens up beyond the throat. To reach :
And the back pressure must drop to the design pressure (Pb_design) for fully supersonic flow without shocks.
Level 4: Shock Positioning#
When the back pressure is above design but below critical, a normal shock forms inside the nozzle.
Pre/post-shock relations:
Adjusting back pressure moves the shock. Higher back pressure pushes the shock toward the throat, lower toward the exit. The target is to land it within .
The Simulator's Physics Model#
This simulator rests on these assumptions:
- 1D quasi-1D flow: only area variation; viscosity/heat transfer ignored
- Isentropic flow (except across shocks): , conserved
- Calorically perfect gas: (air)
- Normal shocks: Rankine–Hugoniot relations
- Nozzle geometry: smooth area distribution via Hermite interpolation
The shock position is found by discretely searching for the location that satisfies the exit pressure condition. Upstream of the shock is isentropic supersonic; downstream is isentropic subsonic with stagnation pressure loss applied.
Going Further#
- Compressible Multiphase Flow CFD: Introduction — what gets harder when this physics extends to multiphase flow
- From the Riemann Problem to Godunov-Type Schemes — the Riemann solver that captures normal shocks numerically
- FDM vs FEM vs FVM — three discretization approaches for this 1D problem
Share if you found it helpful.