Subsonic (M<1) Supersonic (M>1) Mach-angle characteristics beyond exit

Rocket Nozzle Flow: Quasi-1D Euler PDE Solver

Real computational fluid dynamics doesn't solve for a nozzle's Mach number by inverting an algebraic formula — it marches the governing partial differential equations forward in (pseudo-)time until the flow settles into a steady state. This simulator does exactly that: a 181-point finite-difference grid integrates the unsteady quasi-1D Euler equations for continuity, momentum and energy through a converging-diverging nozzle using MacCormack's predictor-corrector method, the same explicit time-marching scheme taught in introductory CFD courses. Watch the crude initial guess relax, frame by frame, into the true subsonic-to-supersonic flow profile — then check the result two independent ways: against the closed-form isentropic area-Mach relation, and against mass-flow conservation along the grid. Tune expansion ratio, chamber pressure, throat size and altitude to see the same engine's thrust, Isp and exit-pressure regime respond exactly as gas dynamics predicts, arrived at by a completely different numerical route than a root-finder.