Rayleigh Flow Simulator Back
Compressible Flow Simulator

Rayleigh Flow Simulator — Compressible Duct Flow with Heating

Explore frictionless compressible flow in a constant-area duct with heat addition or removal. Sweep inlet Mach, gamma, heat input and inlet total temperature to watch the Rayleigh-line state evolve in real time.

Parameters
Inlet Mach M_1
Specific-heat ratio γ
Heat input q
kJ/kg
Inlet total temperature T_0_1
K

Perfect gas, frictionless, 1-D, steady flow is assumed. c_p (air) = 1.005 kJ/(kg·K) is used in T_0_2 = T_0_1 + q/c_p. When q exceeds q_max the flow is thermally choked and the exit Mach is locked at M=1.

Results
Exit Mach M_2
Exit total temperature T_0_2
Pressure ratio P_2/P_1
Choking heat limit q_max
Duct Schematic

Left = state 1 (inlet) / right = state 2 (exit) / red arrows = heat in / arrow length = local velocity / color gradient indicates relative temperature

Rayleigh Line (T-s Diagram)

y = T/T* / x = (s − s*)/c_p / upper branch = subsonic, lower branch = supersonic / blue dot = state 1, red dot = state 2 / orange line = path 1 → 2

Theory & Key Formulas

Rayleigh flow is the idealized model of frictionless compressible flow in a constant-area duct with heat addition (or removal). Heating always drives the flow toward M=1 — the subsonic branch accelerates and the supersonic branch decelerates.

Total temperature ratio at Mach M (referenced to the sonic state):

$$\frac{T_0}{T_0^*} = \frac{(\gamma+1)M^2 \,\bigl(2 + (\gamma-1)M^2\bigr)}{(1 + \gamma M^2)^2}$$

Static temperature and pressure ratios are referenced the same way:

$$\frac{T}{T^*} = \left(\frac{(\gamma+1)M}{1+\gamma M^2}\right)^2, \qquad \frac{P}{P^*} = \frac{\gamma+1}{1+\gamma M^2}$$

The downstream total temperature follows from the heat input q:

$$T_{0,2} = T_{0,1} + \frac{q}{c_p}, \qquad \frac{T_{0,2}}{T_0^*} = \frac{T_{0,2}}{T_{0,1}} \cdot \frac{T_{0,1}}{T_0^*}$$

M_2 is obtained by solving T_0_2/T_0* numerically with Newton's method. When q ≥ q_max = c_p (T_0* − T_0_1) the flow is thermally choked and the exit is locked at M=1.

What is the Rayleigh Flow Simulator

🙋
I keep hearing that "if you push more fuel into a ramjet combustor the flow eventually chokes." What is the actual physics behind that?
🎓
That is exactly Rayleigh flow. In a frictionless, constant-area duct with heat addition, heating always pushes the flow toward M=1. A subsonic inlet keeps accelerating downstream, and with enough heat the exit reaches M=1 — the flow is thermally choked. With the defaults (M_1 = 0.30, γ = 1.4, q = 500 kJ/kg, T_0_1 = 300 K) the simulator returns M_2 ≈ 0.72 and exit total temperature T_0_2 ≈ 797 K.
🙋
So we accelerated from M_1 = 0.30 all the way to M_2 = 0.72. What if I keep raising q?
🎓
Look at the "Choking heat limit q_max" stat — it shows about 568 kJ/kg. That means there is only 68 kJ/kg of additional heating left before the exit chokes at M=1. Push the q slider above 568 and the red CHOKED badge appears with M_2 latched at 1.000. In real engines designers compute this limit first and run the fuel flow with a 1.3 to 2 safety margin below it.
🙋
In the right-hand T-s diagram the curve has two branches. Where exactly is the M=1 point?
🎓
That curve is the Rayleigh line. The y-axis is T/T*, x-axis is dimensionless entropy. The upper branch is subsonic, the lower branch is supersonic, and they meet near the rightmost peak at M=1. Heat addition always raises entropy, so the state can only travel rightward along the curve. You should see the orange path running from the blue inlet dot toward the red exit dot on the subsonic branch.
🙋
What if I set a supersonic inlet, say M_1 = 2.0?
🎓
Try it. Now heating decelerates the flow from M_1 = 2.0 toward M=1, and on the T-s diagram the state slides down-left along the supersonic branch from the upper-right starting point toward sonic conditions. The direction looks opposite to the subsonic case but the physics — entropy rising while the state heads to M=1 — is identical. That symmetry is the most beautiful part of Rayleigh flow.

Frequently Asked Questions

This simulator assumes air with c_p = 1.005 kJ/(kg·K) and computes the downstream total temperature as T_0_2 = T_0_1 + q/c_p. In a real combustor the burned-gas c_p rises to about 1.15 - 1.25 kJ/(kg·K), so a strict design would account for the temperature dependence and the mixture composition. For introductory sensitivity studies and for understanding the qualitative behavior, the constant-c_p model used here is sufficient.
Once the exit reaches M=1 you cannot add any more heat with the same upstream conditions — that is thermal choking. The limit is q_max = c_p (T_0* − T_0_1). Trying to add more heat physically pushes the flow into a different solution branch — the upstream pressure rises, or a normal shock forms, etc. The phenomenon resembles frictional choking in Fanno flow but the driving mechanism is heat instead of friction.
The Rayleigh static pressure ratio is P/P* = (γ+1)/(1+γM²), so larger M means smaller P. In subsonic heating M_2 > M_1, which gives P_2/P_1 = (1+γM_1²)/(1+γM_2²) < 1. With the defaults the static pressure drops by about 35% (P_2/P_1 ≈ 0.652). This drop matters in combustor design because it sets the relationship between fuel-injection pressure and combustor inlet pressure.
Fanno flow is the "adiabatic + friction" idealization, while Rayleigh flow is the "frictionless + heat addition" idealization. Both apply to constant-area compressible duct flow and both push the flow toward M=1, but their entropy histories and T-s shapes differ. In Rayleigh flow the total temperature changes (rises with heating); in Fanno flow it stays constant. Real combustors and heat exchangers contain both effects.

Real-World Applications

Ramjet and scramjet combustor design: Ramjets and scramjets burn fuel in a roughly constant-area combustor and Rayleigh flow is the dominant theory. Adding more fuel than q_max chokes the flow thermally and triggers combustion instability or flame-out, so the upper limit on fuel flow is set directly by Rayleigh-flow analysis. Scramjets operate with supersonic combustion and so use the deceleration side of the same picture.

Afterburner-equipped jet engines: Fighter engines such as the F-15 or F-22 inject extra fuel into the post-turbine exhaust to burn it. A large heat addition into a subsonic stream is the textbook Rayleigh-flow situation, and the thermal-choking limit always sets the maximum afterburner fuel flow. Designers run near the limit only for short-duration peak thrust and switch off heating during cruise to save fuel.

Gas-turbine combustor pressure-loss evaluation: A real gas-turbine combustor mixes large amounts of cooling air, but Rayleigh flow is a useful first-cut model for the pressure loss across it. The static-pressure drop associated with heating is typically P_2/P_1 ≈ 0.95 - 0.97 in the Mach 0.2 - 0.3 range, and that loss feeds straight into the cycle efficiency, so it is examined early in conceptual design.

Solar-thermal receivers and nuclear-cooling pipes: Solar-thermal collector tubes and the primary-loop heat-exchanger tubes of a nuclear plant add heat to the working fluid. At low Mach numbers an incompressible model is enough, but the helium loops of a high-temperature gas-cooled reactor (HTGR) can run above Mach 0.3 — in that case Rayleigh-flow corrections are required, particularly when assessing the thermal-choking risk in accident-mode high-load operation.

Common Misconceptions and Cautions

The most common misconception is to assume that "heating always accelerates a flow". In subsonic Rayleigh flow heating does accelerate the gas, but on the supersonic side it actually decelerates it. The result follows from the simultaneous energy and momentum balance and the simulator demonstrates it immediately — set M_1 = 2.0, raise q and watch M_2 fall toward 1. Both branches push the flow toward M=1, so the physics is unified even though the direction looks opposite.

The next pitfall is to think you can keep adding heat without limit. Rayleigh flow has a hard upper bound q_max = c_p (T_0* − T_0_1) — beyond it the flow chokes thermally and the exit is locked at M=1. Push the q slider in the simulator and the CHOKED badge appears. In practice engineers compute this limit first and design with a safety factor of 1.3 to 2.

A third caution is that this model assumes "no friction". Real ducts always carry some wall friction and a pure Rayleigh-flow analysis can lose accuracy for long combustors. A more rigorous design uses the generalized Rayleigh-Fanno flow equations or a CFD simulation. Use this tool as an introductory teaching aid for cases where heat addition is the dominant effect.