Compressible Pipe Flow (Fanno and Rayleigh) Calculator
Find the Fanno (friction) and Rayleigh (heat addition) constant-area duct flow ratios relative to the sonic reference state, from Mach number and gamma.
🔧 What is the Compressible Pipe Flow (Fanno and Rayleigh) Calculator?
This compressible pipe flow calculator finds the classical Fanno and Rayleigh flow ratios for a constant-area duct, both measured relative to the sonic (M=1) reference state marked with an asterisk. Fanno mode covers adiabatic flow with wall friction and returns T/T*, p/p*, p0/p0*, V/V*, and the dimensionless maximum duct length 4f̄L*/D. Rayleigh mode covers frictionless flow with heat addition or rejection and returns T0/T0*, T/T*, p/p*, p0/p0*, and ρ/ρ*. Enter a Mach number and the ratio of specific heats γ, switch between the two modes with the tabs, and the calculator returns every ratio instantly along with a chart.
Engineers use Fanno flow analysis to size long, straight duct runs (natural gas pipelines, compressed air lines, exhaust ducting) where friction alone matters and to check whether a proposed duct length would choke the flow before it reaches the desired downstream condition. Rayleigh flow analysis is the standard tool for combustor and afterburner design, where heat release changes the Mach number along the duct and can trigger thermal choking if too much heat is added at too high an inlet Mach number.
A common point of confusion is that Fanno and Rayleigh flow are not alternatives to the isentropic flow relations or the normal shock, they describe entirely different physical mechanisms. Isentropic flow relations apply to a frictionless, adiabatic duct where only the cross-sectional area changes (no friction, no heat transfer). The normal shock is an abrupt, irreversible jump. Fanno flow isolates friction alone in a duct of constant area, and Rayleigh flow isolates heat transfer alone in a duct of constant area. Many real duct problems, such as a long pipe followed by a shock, or a combustor with both wall friction and heat release, combine two or more of these four building blocks in sequence.
Both Fanno and Rayleigh relations are valid for subsonic and supersonic upstream Mach numbers alike, since M=1 is approached from either direction depending on the flow regime and, for Rayleigh flow, whether heat is added or removed. At M=1 exactly, every ratio in both modes equals 1 by definition (with 4f̄L*/D equal to 0), a useful sanity check built into both formula sets.
📐 Formula
📖 How to Use This Calculator
Steps
💡 Example Calculations
Example 1 - Fanno flow, subsonic duct
Example 2 - Fanno flow, supersonic duct
Example 3 - Rayleigh flow, subsonic heat addition
Example 4 - Rayleigh flow, supersonic duct
Example 5 - Sonic reference state (sanity check, both modes)
Fanno Flow Reference Table (γ = 1.4)
| M | 4f̄L*/D | T/T* | p/p* | p0/p0* | V/V* |
|---|---|---|---|---|---|
| 0.2 | 14.5333 | 1.1905 | 5.4554 | 2.9635 | 0.2182 |
| 0.5 | 1.0691 | 1.1429 | 2.1381 | 1.3398 | 0.5345 |
| 1.0 | 0.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 |
| 1.5 | 0.1361 | 0.8276 | 0.6065 | 1.1762 | 1.3646 |
| 2.0 | 0.3050 | 0.6667 | 0.4082 | 1.6875 | 1.6330 |
| 3.0 | 0.5222 | 0.4286 | 0.2182 | 4.2346 | 1.9640 |
Rayleigh Flow Reference Table (γ = 1.4)
| M | T0/T0* | T/T* | p/p* | p0/p0* | ρ/ρ* |
|---|---|---|---|---|---|
| 0.2 | 0.1736 | 0.2066 | 2.2727 | 1.2346 | 11.0000 |
| 0.5 | 0.6914 | 0.7901 | 1.7778 | 1.1141 | 2.2500 |
| 1.0 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 |
| 1.5 | 0.9093 | 0.7525 | 0.5783 | 1.1215 | 0.7685 |
| 2.0 | 0.7934 | 0.5289 | 0.3636 | 1.5031 | 0.6875 |
| 3.0 | 0.6540 | 0.2803 | 0.1765 | 3.4245 | 0.6296 |
❓ Frequently Asked Questions
🔗 Related Calculators
What is Fanno flow?
Fanno flow describes adiabatic flow with wall friction in a constant-area duct. No heat is added or removed, only friction acts on the flow, driving the Mach number toward 1 (the sonic reference state) regardless of whether the flow starts subsonic or supersonic. The friction ratios T/T*, p/p*, p0/p0*, and V/V*, plus the dimensionless friction length 4f-bar L*/D, describe how far along the duct the flow travels before reaching M=1.
What is Rayleigh flow?
Rayleigh flow describes frictionless flow with heat addition or rejection in a constant-area duct. Wall friction is neglected, only heat transfer changes the flow properties, driving the Mach number toward 1 (the sonic reference state) for heat addition regardless of whether the flow starts subsonic or supersonic. The ratios T0/T0*, T/T*, p/p*, p0/p0*, and rho/rho* describe how the flow properties change relative to that sonic reference state.
What is the difference between Fanno flow and Rayleigh flow?
Fanno flow has friction but no heat transfer (adiabatic), while Rayleigh flow has heat transfer but no friction (frictionless). Both apply to a constant-area duct and both use M=1 as their reference state, but the physical mechanism driving the flow toward that state is different: mechanical friction in Fanno flow, thermal energy addition or rejection in Rayleigh flow.
Why do all the ratios equal 1 at M = 1?
M=1 is chosen as the reference (starred) state for both flows by definition, so every ratio X/X* equals 1 when M=1, since X and X* are the same value at that point. The dimensionless friction length 4f-bar L*/D is the one exception in Fanno flow, it equals 0 at M=1 because no further duct length is needed once the flow has already reached the sonic state.
What is 4f-bar L*/D in Fanno flow?
4f-bar L*/D is the dimensionless maximum duct length (measured in diameters) that a Fanno flow at Mach number M could travel before friction brings it exactly to M=1. f-bar is the mean Darcy friction factor over that length, L* is the physical duct length to reach the sonic state, and D is the duct diameter. A duct longer than this value cannot pass the same mass flow rate at the same upstream Mach number, the flow chokes.
Can Fanno and Rayleigh flow apply to supersonic Mach numbers too?
Yes. Both sets of relations are valid for any Mach number greater than 0, subsonic or supersonic. In Fanno flow, friction drives a subsonic flow up toward M=1 and drives a supersonic flow down toward M=1, approaching the sonic state from opposite directions. Rayleigh flow behaves the same way with heat addition, while heat rejection drives the Mach number away from 1 in both regimes.
How is this different from the isentropic flow relations and normal shock calculators on this site?
Isentropic flow, normal shock, Fanno flow, and Rayleigh flow are the four classical building blocks of one-dimensional compressible-flow analysis. Isentropic flow relations describe area change with no friction, heat transfer, or shocks. The normal shock describes an abrupt, irreversible jump. Fanno flow adds friction alone in a constant-area duct, and Rayleigh flow adds heat transfer alone in a constant-area duct. Real duct problems often combine more than one of these effects in sequence.
Why does the flow choke in Fanno flow?
As friction acts along a constant-area duct, the Mach number is driven monotonically toward 1, regardless of starting subsonic or supersonic. Once M reaches 1, no further increase in duct length can push the flow past the sonic point for a fixed upstream mass flow rate and stagnation conditions, the flow is choked, and adding more duct length instead forces the upstream conditions (such as mass flow rate) to adjust.
Does heat addition always drive Rayleigh flow toward M = 1?
Yes. Heat addition always drives the Mach number toward 1 in Rayleigh flow, whether the flow starts subsonic (M increases toward 1) or supersonic (M decreases toward 1). Heat rejection does the opposite, driving the Mach number away from 1 in both regimes. This is why Rayleigh flow is used to model combustor thermal choking.
What gases can I use this calculator for besides air?
Any calorically perfect gas works if you set the correct gamma (ratio of specific heats): air and diatomic gases use gamma of about 1.4, combustion products typically use gamma of about 1.30 to 1.33, and monatomic gases like helium or argon use gamma of about 1.67. The formulas are identical, only the exponents and coefficients change.
What happens to stagnation pressure in Fanno and Rayleigh flow?
In Fanno flow, stagnation pressure always decreases toward the sonic state (p0/p0* falls as M moves away from 1 in either direction, meaning p0/p0* is greater than 1 for both subsonic and supersonic M), reflecting the irreversible loss caused by friction. In Rayleigh flow, stagnation pressure decreases with heat addition (moving M toward 1) and increases with heat rejection, since heat addition to a flow is also an irreversible, entropy-generating process even without friction.