This is the 2D field counterpart of the 3D aerospike-vs-bell simulator. Instead of rendering the nozzles as flattened 3D geometry, it solves and paints the actual quasi-1D compressible-flow field: the local Mach number M(x) at every axial station x along each duct, from the isentropic area–Mach relation
A(x)/A* = (1/M) [ (2/(γ+1))(1 + (γ−1)/2 M²) ]^((γ+1)/(2(γ−1)))
solved by bisection at ~50 stations per nozzle (γ ≈ 1.2), then colour-mapped blue→orange→white as Mach rises from 1 at the throat to Me at the exit. A translucent red band marks any station whose local static pressure has fallen below 40% of ambient — the Summerfield separation criterion — so you can see over-expansion risk creep up the duct wall, not just read a single exit number.
Below the ducts, a second panel is a genuine 2D field simulation over parameter space: a heatmap of CF(aerospike) − CF(bell) computed on a full (altitude × expansion-ratio) grid, with your current slider position marked by a crosshair. It shows at a glance where a fixed bell is a bad bet (bright band = aerospike wins big) versus where the two designs are essentially tied (dark band, near the bell's one true design altitude).
The nozzle contour itself uses A(x)/A* = 1 + (ε−1)·(x/L)^0.72 for the bell (a smooth converging-to-design-ε divergent contour) and the same relation up to the aerospike's self-limited effective ratio εeff = min(εideal(Pa), 1.6ε) for the spike, exactly mirroring the exit-condition solver used for the readouts and the heatmap.
- Altitude — moves the ambient pressure exponentially down; watch the separation band and the heatmap crosshair move together.
- Bell expansion ratio ε — redesigns the bell's contour and its one perfectly-expanded altitude.
- Chamber pressure Pc — scales how much the ambient mismatch matters relative to the momentum term.