Compressible flow

A pipe cannot hold its gas at the wall's temperature

The textbook model of a long gas pipe in contact with the ground holds the gas at the ground's temperature and has it choke at 0.845 of the speed of sound. No pipe does either. A wall at the gas's temperature draws heat out of it rather than putting heat in, and with any strength of heat transfer at all the flow runs on to Mach one, within a tenth of a per cent of the length a perfectly insulated pipe would need.

Worth reading first: Two ways to choke · A duct that cannot be run backwards.

Two ways to choke drives a gas to the speed of sound along a duct by friction and by heating, and a duct that cannot be run backwards reads the friction case, Fanno flow, as a record written in entropy. Both are insulated ducts. Every textbook on compressible flow adds a third case for the duct that is not insulated: a long pipeline buried in the ground, whose gas is taken to be held at the ground’s temperature all the way along. That isothermal flow has its own choking point, not at Mach one but at M=1/γM = 1/\sqrt\gamma — 0.845 for air — and its own formula for the length of pipe that gets it there.

Fanno flow and isothermal flow are the two ends of one problem: friction together with heat exchange with a wall at a fixed temperature, with the exchange switched off at one end and made infinitely strong at the other. Solving the problem between the ends shows that a real pipe sits at the Fanno end, and that the isothermal flow is not the other end at all.

One problem, with the heat exchange turned up

For steady one-dimensional flow of a perfect gas in a pipe of constant area, the Mach number and the pressure change along the pipe in response to two things, the wall friction and any change in the stagnation temperature. Shapiro’s influence coefficients give both as closed expressions in the local Mach number, and in the friction length ζ=fx/D\zeta = fx/D the equation for the Mach number is

dM2M2=γM2(1+aM2)1−M2 dζ+(1+γM2)(1+aM2)1−M2 dT0T0,a=γ−12,\frac{dM^2}{M^2} = \frac{\gamma M^2(1 + aM^2)}{1 - M^2}\,d\zeta + \frac{(1 + \gamma M^2)(1 + aM^2)}{1 - M^2}\,\frac{dT_0}{T_0}, \qquad a = \tfrac{\gamma - 1}{2},

with a companion for the pressure. The stagnation temperature changes only by heat exchanged with the wall, and the heat exchange is tied to the friction by Reynolds’ analogy, which in a turbulent pipe says that the Stanton number is an eighth of the friction factor. The driving temperature difference is between the wall and the gas’s recovery temperature, Taw=T(1+raM2)T_{aw} = T(1 + raM^2) with recovery factor r=0.89r = 0.89, because that is the temperature the gas beside a wall reaches when the wall is insulated. So

dT0=κ2 (Tw−Taw) dζ,dT_0 = \tfrac{\kappa}{2}\,(T_w - T_{aw})\,d\zeta,

with κ\kappa a multiplier: κ=0\kappa = 0 is Fanno flow, κ=1\kappa = 1 is what Reynolds’ analogy says a pipe has, and κ\kappa large is a pipe whose heat exchange is made as strong as can be imagined. The wall is at the gas’s inlet temperature, as a pipeline’s surroundings would be.

The equations are marched in the friction length with a fourth-order Runge–Kutta step that shrinks as the choke approaches, since the Mach number’s rate of change there becomes infinite.

The gas does not stay at the wall’s temperature

A pipe at the gas's temperature does not keep the gas at it. Left, the static temperature of the gas along a pipe, as a fraction of the wall's, against the local Mach number, entered at Mach 0.1: with no heat transfer, with the heat transfer Reynolds' analogy gives, and with ten thousand times that. Right, the stagnation temperature. The isothermal model holds the static temperature at the wall's and needs the stagnation temperature to climb by 14 per cent; every real case keeps it within two per cent, cools, and runs on to Mach one.
Fig. 1 The static and the stagnation temperature of the gas along a pipe entered at Mach 0.1, against the local Mach number, with no heat transfer, with Reynolds’ analogy, and with ten thousand times that. The isothermal model holds the static temperature at the wall’s; every real case cools and runs on to Mach one.

With no heat exchange the gas cools as it accelerates, holding its stagnation temperature, and reaches Mach one at 0.835 of the wall’s temperature. That is Fanno flow and the march reproduces it. With the heat exchange of Reynolds’ analogy, the gas cools almost identically and reaches Mach one at 0.838. With a hundred times the heat exchange, 0.846; with ten thousand times, 0.849. Every case runs on to Mach one, and no amount of heat exchange keeps the gas near the wall’s temperature once its Mach number is appreciable.

The stagnation temperature tells the same story more directly. The isothermal model needs it to climb as the gas speeds up — by aM2aM^2, which is 14 per cent by the time the isothermal flow reaches 0.845 — because the kinetic energy the gas gains must come from somewhere if its static temperature is not to fall. In every heat-exchanging pipe the stagnation temperature barely moves. Even with ten thousand times Reynolds’ analogy it rises by less than two per cent.

The heat an isothermal flow needs has the wrong sign

The heat an isothermal flow needs has the wrong sign. Per unit of friction length, in units of the heat capacity times the wall temperature: the heat the isothermal model must add to hold the gas at the wall's temperature while it speeds up, against what a wall at that temperature actually exchanges with it under Reynolds' analogy. The wall takes heat out, because friction brings the gas beside it to its recovery temperature, above the static; and the demand grows without bound as the isothermal choke approaches.
Fig. 2 The heat an isothermal flow must be given to stay at the wall’s temperature as it speeds up, per unit of friction length, against what a wall at that temperature actually gives it. The wall takes heat out, and the demand grows without bound as the isothermal choke approaches.

The reason is in the recovery temperature. The layer of gas next to the wall is brought nearly to rest by friction, and in being brought to rest its kinetic energy becomes heat. A thermometer in a moving gas reads that heated layer, and so does a wall: the gas beside it is at T(1+raM2)T(1 + raM^2), above the gas’s static temperature by almost the whole of its kinetic energy. A wall held at the gas’s static temperature is therefore colder than the gas it touches, and heat flows out of the gas into the wall. The isothermal model needs heat to flow the other way.

The two curves in the figure are the two sides of that argument. The demand, aM2⋅γM2/(1−γM2)aM^2\cdot\gamma M^2/(1 - \gamma M^2) per unit friction length, is 0.0026 at Mach 0.3 and 11.5 at 0.84, and it is infinite at 1/γ1/\sqrt\gamma, because there the isothermal flow’s Mach number changes infinitely fast. The supply from a wall at the gas’s temperature is small and negative everywhere. A pipe could hold its gas at a fixed static temperature only by being hotter than its gas, by an amount that rose without limit towards the exit — which is a heated duct, the other half of two ways to choke, and not a buried pipe.

So the isothermal flow is not the strong-heat-exchange limit of a real pipe. That limit, with κ\kappa very large, holds the gas’s recovery temperature at the wall’s, and since the recovery factor is 0.89, the recovery temperature is within eleven per cent of the stagnation temperature’s excess over the static. Strong heat exchange with a wall at the inlet temperature holds the flow close to constant stagnation temperature — close to Fanno flow — which is why all the curves above lie together.

The choke is at Mach one, and the length is Fanno’s

How much pipe it takes to choke. The friction length a pipe needs to take a flow entering at a given Mach number to its choke, for Fanno flow, for the isothermal model and for a pipe with Reynolds' analogy heat transfer. The heat-transferring pipe lands on Fanno's curve; the isothermal model chokes sooner, by 1 per cent at an inlet Mach number of 0.1 and by 40 per cent at 0.6.
Fig. 3 The friction length a pipe needs to take a flow entering at a given Mach number to its choke, for Fanno flow, for the isothermal model, and for a pipe with Reynolds’ analogy heat transfer, which lands on Fanno’s curve.

The pipe’s length to the choke tells the same story in the quantity a designer uses. Entered at Mach 0.1, an insulated pipe chokes after a friction length of 66.92, the heat-exchanging pipe after 67.00, and the isothermal model after 66.16. Entered at 0.3, the numbers are 5.30, 5.39 and 4.87; at 0.6, 0.49 for Fanno and 0.30 for the isothermal model, which chokes forty per cent sooner. Wherever the models differ, a real pipe follows Fanno.

The march was checked against both closed forms before any of this was read off it. With the heat exchange switched off it must reproduce Fanno’s ζ∗=(1−M2)/γM2+γ+12γln⁡[(γ+1)M2/(2+(γ−1)M2)]\zeta^* = (1 - M^2)/\gamma M^2 + \frac{\gamma+1}{2\gamma} \ln[(\gamma+1)M^2/(2 + (\gamma-1)M^2)], and with the gas held isothermal it must reproduce ζ∗=(1−γM2)/γM2+ln⁡γM2\zeta^* = (1 - \gamma M^2)/\gamma M^2 + \ln\gamma M^2. It does both, at four inlet Mach numbers, to 2×10−52 \times 10^{-5}, and it returns Fanno’s choking pressure from an inlet at Mach 0.1 to two parts in a thousand.

The march against the two closed forms. The friction length to the choke from the step-by-step march, with the heat transfer switched off and with the gas held isothermal, against the closed-form Fanno and isothermal lengths. The march shares no algebra with either and agrees with both to 2.15·10⁻⁵.
Fig. 4 The friction length to the choke from the march, with the heat transfer off and with the gas held isothermal, against the two closed forms, which the march shares no algebra with.

Newton’s speed of sound, reached in a pipe

The isothermal choke has a meaning that the formula hides. 1/γ1/\sqrt\gamma times the speed of sound is p/ρ\sqrt{p/\rho} — the speed of sound computed at constant temperature. That is the value Newton derived for sound in 1687, taking the compressions in a wave to happen isothermally, and it came out about fifteen per cent below what was measured. Laplace’s correction of 1816 was that the compressions are too fast for heat to move and so are adiabatic, which multiplies Newton’s value by γ\sqrt\gamma. What a signal travels at tells that story as a question about which derivative of the pressure the wave obeys.

The isothermal pipe chokes when the flow reaches Newton’s speed of sound, and for the same reason Newton’s speed of sound was wrong. A choke is where the flow’s speed equals the speed at which a small disturbance can travel back against it, and in the isothermal model that disturbance is assumed to exchange heat with the wall as it goes. It cannot: a pressure disturbance crosses the pipe’s diameter in a fraction of a millisecond, and heat crosses the pipe’s gas in seconds. Disturbances travel at Laplace’s speed however isothermal the mean flow is, so the flow is not choked until it reaches that speed. The isothermal pipe’s 0.845 is Newton’s error of 1687, reproduced in a pipe.

The last seventh of the pipe

Where along a real pipe the two models part is worth putting in numbers, because it says how little of a long line the choking question concerns. Take a pipe entered at Mach 0.1 and long enough to choke it — a friction length of 66.9. For the first 86 per cent of that length the gas stays within one per cent of the wall’s temperature in every model, and the Mach number rises only to 0.24. The gas cools by more than a per cent only in the last seventh. The Mach number passes 0.5 with 1.6 per cent of the pipe left and 0.7 with 0.3 per cent left, so the whole of the rise from half the speed of sound to the speed of sound happens in the last sixtieth of the line.

That is why heat exchange cannot help. The gas crosses the last sixtieth of the pipe in a small fraction of the time it spends in the rest, while the heat exchange per unit length is fixed by the friction; so the stretch in which the isothermal model most needs heat is the stretch in which the gas has least time to receive it. The departure from the wall’s temperature is not a small correction spread along the pipe. It is the whole of the pipe’s ending.

What the isothermal model gets right

None of this makes the isothermal pipeline formula useless, and the reason is worth having exactly.

A long line carries the same gas whichever model is used. The inlet Mach number at which a pipe of a given friction length just chokes — proportional to the most mass it can carry from a given inlet state — under the isothermal model, as a fraction of the same under Fanno flow. Short pipes differ by several per cent; a pipeline of friction length a hundred, by 0.4 per cent; a thousand, by less than 0.1.
Fig. 5 The most mass a pipe of a given friction length can carry from a given inlet state under the isothermal model, as a fraction of the same under Fanno flow. Short pipes differ by several per cent; a line of friction length a hundred, by 0.4 per cent; a thousand, by less than 0.1.

A pipeline is long. Its friction length — the friction factor times the length over the diameter — is in the hundreds or thousands, and a long pipe can only carry a flow that enters at a low Mach number: 0.08 at a friction length of a hundred, 0.027 at a thousand. At those Mach numbers the kinetic energy is a fraction of a per cent of the enthalpy, the static and stagnation temperatures are the same to that fraction, and “isothermal” and “adiabatic” describe the same flow. The two models’ capacities for a pipe of friction length a hundred differ by 0.4 per cent, and for a thousand by 0.06. The isothermal formula’s familiar form — flow proportional to p12−p22\sqrt{p_1^2 - p_2^2} rather than to p1−p2p_1 - p_2 — is right, because it is a statement about the density falling with the pressure along the pipe, which both models share.

The models part company only where the kinetic energy matters, which is in the last stretch before a choke. That is also the only place the choking point is decided.

And what it gets wrong: where the flow stops responding

The same pipe, run to its choke three ways. The pressure along a pipe entered at Mach 0.3, as a fraction of the inlet pressure, against friction length. The heat-transferring pipe and the Fanno pipe are indistinguishable and choke at a friction length of 5.39 at 0.275 of the inlet pressure. The isothermal model chokes sooner, at 4.87, and at a pressure of 0.355 — a back pressure it says would stop the flow growing, which a real pipe would still respond to.
Fig. 6 The pressure along a pipe entered at Mach 0.3, against friction length. The heat-transferring and Fanno pipes are indistinguishable and choke at 5.39 at 0.275 of the inlet pressure; the isothermal model chokes sooner, at 4.87, at 0.355.

The practical cost of the isothermal choke is a wrong back pressure. A pipe is choked when lowering the pressure at its exit no longer increases the flow, and the isothermal model puts that point at a higher exit pressure than a real pipe has. For a pipe entered at Mach 0.3, it says the flow stops responding once the exit pressure falls to 0.355 of the inlet’s. A real pipe, heat-exchanging or not, goes on responding down to 0.275. In a blowdown — a pipeline vented to the atmosphere, or ruptured — the difference is the difference between a flow that has reached its maximum and one that has not, and it matters most at exactly the high Mach numbers where the isothermal model is least applicable.

Where the isothermal pipeline really comes from

Pipeline engineers do treat long gas lines as isothermal, and they are right to, for a reason that has nothing to do with the kinetic energy and is absent from a perfect gas. Natural gas at pipeline pressures is far from perfect. As its pressure falls along the line it cools by the Joule–Thomson effect, by several kelvin per megapascal, and the ground, at a fixed temperature, heats it back. Over the tens of kilometres the gas takes to exchange heat with its surroundings, those two balance, and the static temperature stays near the ground’s. That balance is real, it is what the isothermal assumption is for, and at pipeline Mach numbers of a few hundredths it has no bearing on choking, because nothing in a running pipeline is near choking.

The sizes make the point. A transmission line might take gas from seven megapascals to five over a hundred kilometres at a few metres a second, a Mach number near 0.01. The Joule–Thomson cooling over that pressure drop is of the order of ten kelvin. The cooling from the gas’s acceleration — its kinetic energy divided by its heat capacity — is a few thousandths of a kelvin. The ground’s heat exchange acts on the first and is irrelevant to the second, and it is the first that the word “isothermal” refers to when a pipeline engineer uses it. A perfect-gas model with the same word attached describes the second, which is the one that decides choking and the one no ground can touch.

The textbook’s mistake is carrying the assumption to Mach 0.845 and treating the result as a second choking condition. At the Mach numbers where choking happens, the Joule–Thomson cooling is overtaken by the cooling of expansion, which a wall at ground temperature cannot offset, and the flow becomes the Fanno flow of the insulated duct.

What the heated-pipe calculation was checked against. The numbers quoted and their checks: the march against both closed forms and the Fanno choking pressure, the choke at Mach one for heat transfer from a tenth to a thousand times Reynolds' analogy, the isothermal heat demand, and the two models' capacities.
Fig. 7 The numbers quoted and their checks: the march against the two closed forms and Fanno’s choking pressure, the choke at Mach one across a ten-thousandfold range of heat transfer, the isothermal heat demand, and the two models’ capacities.

What the picture cannot show

A perfect gas. The Joule–Thomson cooling that makes a real natural-gas pipeline nearly isothermal is absent, as is the variation of heat capacity with temperature. At high pressure the real gas departs from every number here by amounts of order its compressibility factor’s departure from one.

Reynolds’ analogy. The heat exchange is tied to the friction by the analogy, with a recovery factor of 0.89. A buried pipe’s heat exchange is limited as much by the soil’s conduction as by the gas’s film, and is weaker than the analogy says, which moves it further towards Fanno flow rather than away.

One dimension and a steady state. Everything is averaged over the cross-section and nothing changes in time. A blowdown is unsteady, and its choke moves along the pipe as the reservoir empties.

The convention the numbers depend on

The friction length is the Darcy friction factor times the length over the diameter, fL/DfL/D. Temperatures are fractions of the wall’s, which equals the gas’s static temperature at the inlet. κ\kappa multiplies the heat exchange Reynolds’ analogy gives, St=f/8\mathrm{St} = f/8, and the driving difference is between the wall and the adiabatic-wall temperature. “Capacity” is the inlet Mach number at which a pipe of given friction length just chokes, which is proportional to its maximum mass flow from a given inlet state. γ=1.4\gamma = 1.4.

Who found it, and when

Fanno’s thesis of 1904 gave the adiabatic duct with friction and Rayleigh the frictionless heated one. The isothermal pipe appears in the pipeline-flow formulas of the early twentieth century, Weymouth’s of 1912 among them, and was placed beside Fanno and Rayleigh flow as a third one-dimensional model in Shapiro’s 1953 textbook, which also gave the influence coefficients used here. Reynolds proposed the analogy between momentum and heat transfer in 1874, and the recovery factor of a turbulent boundary layer, close to the cube root of the Prandtl number, is the result of the compressible boundary-layer work of the 1930s to 1950s that the wall that heats itself draws on.

Still open: the choke that moves

Every pipe here is steady. A pipeline that ruptures, or a vessel that blows down through a long line, is not: the reservoir’s pressure falls, the choke first forms at the exit and the flow through it falls with the reservoir, and the rest of the line empties through a rarefaction running back along it. The calculation that follows marches the unsteady one-dimensional equations with the same friction and heat exchange, and asks how long a line of given friction length takes to fall to half its pressure, how much of that time the exit is choked, and whether the heat from the wall — negligible in the steady problem — becomes important once the gas has cooled by expansion below the ground’s temperature, which in a long blowdown it does. It is the throat that stops listening with a pipe’s worth of friction in front of it.

What links here

Computed from the collection rather than written here: the essays that point at this one.

Reads more easily once this is understood

Essays that name this one as worth reading first.

Shares its objects with

Essays naming at least two of the same things, that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

Adiabatic wallChokingCompressibilityFriction factorHeat transferMach numberModel limitRecovery factorReynolds analogyStagnation temperature