1. Nozzle Theory¶
This section derives the compressible flow relations used throughout machwave for
nozzle flow modelling. Every result is traced back to two fundamental laws: the
First Law of Thermodynamics and the ideal gas law.
Assumptions
- Quasi-one-dimensional flow (flow properties uniform across every cross-section).
- Adiabatic, inviscid — no heat exchange or friction inside the nozzle.
- Calorically perfect gas: specific heats \(c_p\), \(c_v\) and their ratio \(k = c_p/c_v\) are constant.
- No shaft work.
1.1 Steady-Flow Energy Equation¶
For a steady, adiabatic, work-free flow the First Law requires the specific stagnation enthalpy to be conserved along every streamline:
Applying this between any two stations \(x\) and \(y\):
which rearranges to
For a calorically perfect gas \(h = c_p T\), so this becomes
Choosing station \(x\) as the stagnation state (\(v = 0\), subscript \(0\)) and \(y\) as any point in the flow:
\(T_0\) is the stagnation temperature, a conserved quantity along the flow.
The ideal gas relation \(c_p - c_v = R\) and \(k = c_p/c_v\) give
where \(\bar{R} = 8.314\ \text{J mol}^{-1}\text{K}^{-1}\) and \(M_w\) is the molar mass of the combustion products.
1.2 Mach Number and Stagnation Temperature Ratio¶
The local speed of sound in a perfect gas is \(a = \sqrt{kRT}\). Defining the Mach number \(M = v/a\) and substituting \(v = Ma\) into the energy equation:
since \(\frac{kR}{2c_p} = \frac{k-1}{2}\). Therefore
1.3 Isentropic Stagnation Relations¶
For an isentropic process the entropy is constant, which for a perfect gas means
Combined with the ideal gas law \(P = \rho R T\):
Substituting the temperature ratio from §1.2:
These are the isentropic stagnation relations, implemented in
get_exit_pressure.
1.4 Critical (Sonic) Conditions and Choked Flow¶
At the throat \(M = 1\). Evaluating the stagnation relations at this condition (denoting the sonic state with \(^*\)):
The nozzle is choked — the throat is sonic and the mass flow rate has reached its maximum — whenever the back pressure satisfies
Implemented in
get_critical_pressure_ratio
and
is_flow_choked.
1.5 Area–Mach Relation¶
Applying continuity between the throat and an arbitrary cross-section of area \(A\):
Expressing each factor using §1.2 and §1.3:
Combining:
For a given expansion ratio \(\varepsilon = A_e/A_t\) there are two solutions:
\(M < 1\) (subsonic) and \(M > 1\) (supersonic). machwave always selects the
supersonic root using Brent's method; see
get_exit_mach_from_expansion_ratio.
1.6 Exit Velocity¶
Applying the energy equation (§1.1) between the chamber (\(v \approx 0\)) and the nozzle exit:
where the last step uses the isentropic temperature ratio from §1.3 with \(T_e/T_0 = (P_e/P_0)^{(k-1)/k}\).
1.7 Choked Mass Flow Rate¶
At the throat \(M = 1\), so \(v^* = a^* = \sqrt{kRT^*}\). Using the continuity equation and the critical relations from §1.4:
Substituting \(\rho_0 = P_0/(RT_0)\), \(T^* = 2T_0/(k+1)\):
This is the key expression linking chamber pressure to propellant mass flow — used in all mass-balance ODEs throughout machwave.
1.8 Thrust Coefficient¶
The thrust on a rocket nozzle equals the momentum flux leaving the exit plus the pressure difference acting on the exit area:
Dividing by \(P_0 A_t\) defines the dimensionless thrust coefficient \(C_f = F / (P_0 A_t)\). Substituting \(\dot{m}\) from §1.7 and \(v_e\) from §1.6:
Therefore:
with \(\varepsilon = A_e/A_t\). Thrust follows immediately from the definition:
Implemented in
get_ideal_thrust_coefficient
and
get_thrust_from_thrust_coefficient.
1.9 Optimal Expansion Ratio¶
The pressure-thrust term \(\varepsilon(P_e - P_\text{ext})/P_0\) vanishes when \(P_e = P_\text{ext}\) (perfectly expanded nozzle). Inserting \(P_e = P_\text{ext}\) into the area–Mach relation (§1.5), with the exit Mach determined from the isentropic pressure ratio (§1.3):
where \(M_e\) satisfies \(P_0/P_\text{ext} = (1 + (k-1)M_e^2/2)^{k/(k-1)}\), or equivalently in closed form:
Implemented in
get_optimal_expansion_ratio.
References¶
- Anderson, J. D. (2003). Modern Compressible Flow: With Historical Perspective (3rd ed.). McGraw-Hill.
- Sutton, G. P., & Biblarz, O. (2017). Rocket Propulsion Elements (9th ed.). Wiley. Ch. 3.