Watch a compressible gas accelerate toward Mach 1 inside an adiabatic, constant-area duct under wall friction alone. Vary the inlet Mach number, pipe diameter, length and friction factor to see the exit Mach number, pressure ratio and the margin to friction choking update in real time.
Parameters
Inlet Mach number M₁
Subsonic flow only (0.05 to 0.90)
Pipe diameter D
mm
Pipe length L
m
Darcy friction factor f
From the Moody chart. Approx. 0.015 to 0.030 for commercial steel pipe
Specific heat ratio γ
Air = 1.40, natural gas ≈ 1.31, CO₂ ≈ 1.30
Results
—
Inlet fL*/D
—
Available fL/D
—
Exit fL*/D
—
Exit Mach M₂
—
Pressure ratio P₂/P₁
—
Choke status
—
Friction-driven duct flow — animation
Subsonic gas enters the pipe and accelerates along it from wall friction, with Mach number rising toward 1. If choking occurs, an M=1 wall appears partway along the pipe.
The Fanno function fL*/D is the dimensionless friction length needed to choke the flow from a Mach number M to M=1. In subsonic flow, friction drives M up toward 1; in supersonic flow, friction drives M down toward 1.
The actual friction length between inlet and outlet equals the difference between the inlet and exit Fanno function values. If the exit value goes to zero, friction choking has occurred.
Static pressure ratio P/P* on the Fanno line. The outlet/inlet pressure ratio is P₂/P₁ = (P/P*)|_{M₂} / (P/P*)|_{M₁}. In subsonic flow, the static pressure falls along the duct.
What is Fanno Flow (Friction-Driven Duct Flow)?
🙋
"Fanno flow" is for calculating gas in long pipes, right? Why not just use Bernoulli's equation?
🎓
Good question. Bernoulli assumes "incompressible and friction-free", which works for a short water line. But if you push air or natural gas through a narrow pipe tens of meters long, both compressibility (density varies along the pipe) and wall-friction losses become important. Fanno flow takes "adiabatic + constant area + wall friction" — those three together — and solves them properly.
🙋
The fun thing is, with M₁ at 0.3 or 0.5 on the left and the pipe slider getting longer, the exit Mach number keeps climbing. Friction making things faster sounds backwards.
🎓
That is the headline feature of Fanno flow. Incompressible intuition says "friction = drag = slower", but gases are different. Friction dissipates energy, the static temperature T drops, the equation of state drops the density ρ, and in a constant-area duct ρuA=const forces u to rise — like a chain of dominoes. On top of that M=u/√(γRT) has u going up and √T going down, so the Mach number gets a double boost. That is why subsonic flow always heads to M=1.
🙋
If you stretch the pipe further, "Choke" turns red on the screen. What is actually happening?
🎓
That is "friction choking", and it is Fanno flow's most famous result. The inlet Fanno value fL*/D is the "dimensionless friction length needed to reach M=1 from here". The moment the real friction length fL/D matches that value, M=1 happens somewhere inside the pipe, and any longer pipe simply cannot exist physically — upstream mass flow is throttled back automatically. So when designing a long pipeline, the first check is always "is f·L/D below the inlet fL*/D?".
🙋
On the Fanno function chart on the right, the curve dives to zero near M=1. Does that mean "the closer M is to 1, the closer the choke"?
🎓
Exactly. The curve diverges at M=0 and reaches zero at M=1, monotonically decreasing. So the higher the inlet Mach number, the smaller fL*/D and the less choke margin you have. For M₁=0.3, fL*/D ≈ 5.3; for M₁=0.5 it is about 1.07; for M₁=0.7 it crashes to about 0.21. So if you need to push a lot of flow without choking, the trick is to fatten the pipe or raise upstream pressure with a booster compressor so that the inlet Mach number stays low.
🙋
The outlet pressure ratio P₂/P₁ matters in practice too, right? The tool shows around 0.84.
🎓
Yes — the goal of pipeline design is "how much pressure is left at the outlet", so P₂/P₁ is the bottom-line number. In subsonic Fanno flow, the static pressure P always falls along the duct — about a 16% drop in this case. By contrast, in Rayleigh flow (heat addition) the pressure can rise or fall depending on how much heat goes in. A long natural-gas pipeline is a classic Fanno problem and uses compressor stations every so often to restore P.
Frequently Asked Questions
In incompressible intuition friction slows the flow down, but in an adiabatic constant-area compressible duct the story reverses. Friction dissipates energy, so the static temperature, static pressure and density all drop, and by mass conservation (ρuA=const) in a constant area the velocity u must rise. The Mach number M=u/√(γRT) increases on both counts — higher u and lower T — so subsonic flow always heads toward M=1. Supersonic Fanno flow does the opposite and decelerates toward M=1. Either way, the end point is M=1, which is the essence of friction choking.
Friction choking is the phenomenon where a duct reaches M=1 partway along its length due to wall friction alone, with no area change and no heat exchange. The check uses the dimensionless friction length fL/D, compared with the Fanno function fL*/D at the inlet Mach number M1 (the friction length needed to go from M1 to M=1). When fL/D meets fL*/D, M=1 is reached and no more pipe is physically possible. In practice, design to fL/D ≤ 0.7·(fL*/D) to leave a margin against variations in inlet conditions.
Both are one-dimensional compressible flow in a constant-area duct, but the driving mechanism differs. Fanno flow is adiabatic with wall friction: entropy rises and M moves toward 1. Rayleigh flow is frictionless with heat exchange: subsonic heating raises M, subsonic cooling lowers M. Subsonic acceleration toward M=1 looks similar, but in Fanno the temperature falls while M rises, whereas in Rayleigh (with heating) the temperature rises along with M. Use Fanno when friction dominates (long pipelines) and Rayleigh when heat addition dominates (combustors).
Use the Moody chart or Colebrook equation. For commercial steel pipe with relative roughness ε/D ≈ 5×10⁻⁵ to 5×10⁻⁴ in the fully turbulent regime (Re=10⁵ to 10⁷), f ≈ 0.015 to 0.030. Typical starting values are f≈0.012 for long natural-gas trunk lines (D≈500 mm), f≈0.020 for HVAC steel ducts (D≈300 mm), and f≈0.030 for rubber/plastic hoses. The Fanning factor f_F is related by f = 4·f_F, so check which definition your source uses. This tool uses the Darcy-Weisbach factor.
Real-World Applications
Long-distance natural-gas pipelines: Trans-continental pipelines running across Siberia or North America rely on Fanno-flow analysis at their core, both for pressure-loss accounting and for choke-margin sizing. Compressor stations sit every few hundred kilometers to restore pressure — operationally, "send the gas back upstream before the exit Fanno value drops to zero". Operators run 600–1200 mm diameter pipes with friction factors around f≈0.012 and keep the inlet Mach number low (0.05–0.10) to maximise the inter-station distance.
Building HVAC duct design: Air-handling ducts in large office buildings and factories run for over 100 m, with many bends and branches, so friction losses dominate. Operation is well subsonic (M≈0.1–0.2), but for certain duct diameter and length combinations friction choking is reachable. Fanno analysis is used to size the fan static pressure required and the resulting air-supply flow rate. Large data-center cooling ducts use the same idea to balance airflow across server racks.
Gas-turbine blade internal cooling passages: In modern aero engines with turbine-inlet temperatures over 1500 °C, narrow cooling passages — 1 to 3 mm in diameter — are drilled through each blade and bled compressor air is pushed through them for convective cooling. The friction is large for such fine passages, so the flow is essentially Fanno. Designers match passage diameter and length so that the exit does not choke, securing the required coolant flow. Choking here means the blade overheats and creeps — a critical analysis.
Pneumatic (powder) conveying: Cement plants and food factories that transport powders by air flow are classic long-pipe high-speed-gas systems. The added solids raise the effective friction factor above that of pure gas, putting these systems in an even tighter Fanno regime. Without enough inlet pressure, the powder jams partway along the line — a "blocking" failure. Designers back-calculate "at what length does the line reach M=1" and locate booster blowers accordingly.
Common Misconceptions and Pitfalls
The most common mistake is carrying the incompressible intuition that "friction always slows the flow" straight into compressible flow. In subsonic Fanno flow, friction speeds the flow up and drives the Mach number toward 1. The right intuition is "the gas shrinks under cooling, so in a constant-area duct the same mass flow has to move faster". Supersonic Fanno flow, on the other hand, has friction decelerating the flow toward M=1; this also follows from the universal "M=1 is the endpoint of friction" principle. "Subsonic and supersonic both push M toward 1" is the key; answering just "faster" or just "slower" is only half right.
Second, mixing up the definition of the friction factor f. Fanno-flow references use both the "Darcy friction factor f" and the "Fanning friction factor f_F", related by f = 4·f_F. The f in fL*/D is the Darcy factor (this tool also uses Darcy), but textbooks built on Fanning will write 4fL*/D instead. Mixing the two leads to a critical error: you would predict choking at a pipe 4× shorter than reality. The Moody chart uses Darcy; many chemical-engineering handbooks abroad use Fanning. Always verify the source.
Finally, forgetting that Fanno flow strictly assumes adiabatic walls. Real pipes exchange heat with the environment; a long pipeline buried in the ground, for instance, is cooled (or warmed) toward the soil temperature. The output of this tool is for the idealisation "adiabatic, constant-area, 1D, ideal gas". When you need better than 10% accuracy, you need a generalised compressible-pipe-flow solution that combines Fanno (friction) and Rayleigh (heat) — by piecewise integration or full CFD. That said, the Fanno analysis remains an excellent screening tool for "is this friction-dominated?" and "how much choking margin do I have?", and it stays essential as a sanity check ahead of any serious CFD.