Fluid_Expansion_and_Compression - nasa/gunns GitHub Wiki

{{>toc}}

Fluid Expansion and Compression

Any time a fluid undergoes a pressure drop, it expands, and any time its pressure increases, it is compressed. This is the basic definition of fluid compressibility. All real fluids exhibit this behavior, even in liquids that are normally thought of as incompressible (in GUNNS, liquids are never completely incompressible). Examples of expansions & compressions:

  • When fluid flows through any restrictive flow path (any Conductance effect), its pressure drops. Thus it expands through the conductor.
  • When fluid flows out of a tank and the remaining fluid inside the tank undergoes a pressure drop, that fluid expands.
  • When fluid flows into a tank and the existing fluid already inside the tank undergoes a pressure increase, that fluid is compressed.
  • When fluid undergoes a pressure increase through a pump or fan, it is compressed.

All real fluids undergo a change in temperature whenever they expand or compress. The amount and direction of the temperature change depends on the fluid properties — phase, temperature, entropy, and pressures. In general, expansion usually cools a fluid and compression usually heats it, but this is not always the case. In general, gasses undergo more temperature change than liquids because they are more compressible.

The effect is a rather complicated aspect of fluid mechanics, and GUNNS does not simulate it perfectly – there are limitations at play. This article explains the effect, how and what GUNNS models, its limitations, and how you use it in practice.

There are 3 idealized types of expansion, discussed here. We discuss each of these in more detail below:

  • Isenthalpic
  • Free
  • Isentropic

Isenthalpic Expansion

Also called Joule-Thomson effect or “throttling”, this occurs when there is no work done on or by the fluid, and no heat exchange with the surrounding walls. This applies to any flow through an insulated pipe or valve. The enthalpy of the fluid remains constant, thus it is called “isenthalpic”. If you have a Temperature-Entropy (T-s) diagram of the fluid properties, you can follow the constant-enthalpy line from the initial pressure and temperature over to the final pressure, and this gives you what the final temperature will be. See for instance points a to b in the above-linked diagram.

Real-world vs. GUNNS

We can’t accurately model this effect because of a limitation in our fluid properties. In real fluids, enthalpy is a function of both temperature and pressure (or temperature and entropy). But in GUNNS, we don’t track entropy as a fluid property, and our enthalpy is independent of pressure, and simplified to a quadratic with temperature. Thus we don’t have anything resembling the T-s diagram to look up what the final temperature would be in an isenthalpic expansion. And since our enthalpy is only a function of temperature, if we hold our enthalpy constant through a conductive flow, we must always end up with the same temperature. Thus in GUNNS, we can’t directly model the change in temperature in isenthalpic expansions.

This is a big limitation because the throttling effect is very important in many real-world applications. This affect occurs in almost any kind of real fluid flow. Even in cases where the flow is not insulated and there is heat flux with the wall, such as in a heat exchanger, this effect still occurs in addition to the wall heat flux.

However, we can approximate this affect in GUNNS by abusing the ideal gas isentropic expansion effect (see below). For most gases at low temperatures & pressures (i.e. not supercritical), isenthalpic expansion cools the gas and compression heats it, the same trend as isentropic expansion in an ideal gas. We can tune the link’s mExpansionScaleFactor configuration parameter (see below) to turn on the isentropic effect and tune it to give the right amount of isenthalpic temperature change for a specific flow temperature and pressure point. Depending on your model, this is sometimes more desirable than having no effect at all. This tuning is discussed in more detail below.

Free Expansion

Free expansion is basically an isenthalpic expansion/compression for fluid allowed to freely leave or enter an insulated tank, as opposed to passing through a pipe or valve. The distinction is mostly academic. In GUNNS it is treated the same as isenthalpic expansion, with the same limitations and workaround described above.

Isentropic Expansion

In isentropic expansion, the fluid’s entropy remains constant. It is thermodynamically reversible and adiabatic. This comes into play when there is work being done on or by the fluid. For instance, when gas drives a turbine, it is doing work on the turbine. As it expands through the turbine more energy is being extracted from the fluid than if it were just blowing through a locked turbine without doing any work. Because energy is being extracted from the fluid, it gets colder. The isentropic expansion is the theoretical limit on how much work (energy) can be extracted from the fluid as it expands from the high-pressure inlet to the low-pressure exit. Thus it also is the limit on how much the temperature can change. The same limit applies to the compression case: a piston compressing a gas can only do so much work on the gas as it compresses from the low initial pressure to the high final pressure, and this also limits the temperature rise.

The isentropic expansion/compression can be seen on a T-s diagram by following a vertical line from the beginning to final pressure & temperature along the line of constant entropy.

Real-world vs. GUNNS

Even though we don’t model fluid entropy, we can very easily model isentropic expansion of an ideal gas. There are simple relation formulas between the fluid properties in an ideal gas undergoing an isentropic process. In particular, we use this one to compute the final temperature of an ideal gas in isentropic expansion/compression:

T 1 = T 0 · (p 1 / p 0 ) ^ (γ-1)/γ

where subscripts 0 and 1 denote the initial and final temperatures T and pressures p, and γ is the ratio of specific heats of the gas. The amount of temperature change from T 0 to T 1 can be scaled and tuned by the link’s mExpansionScaleFactor term, discussed below.

It is most appropriate to use this effect in GUNNS in links that do work on or by the fluid, such as pumps & fans. GUNNS only applies it to gasses, as this effect in liquids is so small that it is usually ignored.

Expansion Scale Factor

Most fluid conductors, capacitors and their derived objects (valves, tanks, etc) have a configuration data parameter called mExpansionScaleFactor. This scales the amount of automatic temperature change in a fluid when it undergoes expansion or compression. We call this the “Expansion” scale factor but it applies equally to compression as well. The expansion/compression is always assumed to be isentropic, regardless of how applicable that assumption is to the actual flow process (see isenthalpic above).

For example, an expansion from p 0 = 200 kPa to p 1 = 100 kPa in ideal nitrogen with γ = 1.4 and T 0 = 300 K gives: T 1 = 300 · (100/200) ^ (0.4/1.4) = 246 K, a reduction of 54 K. The expansion scale factor scales this reduction, so using an expansion scale factor of 0.5 would result in a final temperature of 273 K instead. The expansion scale factor is usually limited by the links to between (0-1).

No real process is entirely isentropic — even the most efficient turbine cannot extract the theoretical maximum amount of energy out of the working fluid. Thus you’d realistically never use a scale factor value above 0.9 – 0.95 or so.

The default value in most links is zero — assuming you don’t want to see any expansion/compression temperature change in most links. Leaving the value zero turns off the temperature change effect; thus lacking any other source of heat flux into or out of the fluid, an expansion/compression will not change the temperature.

Approximating Isenthalpic Effect

We can tune the isentropic expansion amount to give the same final temperature as an isenthalpic expansion, for specific cases. For instance in the T-s diagram for N2 given below, the isenthalpic process from a to b should result in a final temperature T b = 270 K. Our isentropic expansion from p a = 200 bar to p b = 1 bar would give T b = 300 * (1/200) ^ (0.4/1.4) = 66 K. But we really want T b = 270 K, so we’d set our expansion scale factor to (300 – 270) / (300 – 66) = 0.128.

source: http://upload.wikimedia.org/wikipedia/en/9/9d/Throttling_in_Ts_diagram_01.jpg

However, if we then try to apply our scale factor = 0.128 to another case, it won’t match. For instance, consider initial conditions p a = 200 bar, T a 210 K expanding to p b = 1 bar. Same pressure drop as above but different initial temperature. Here the T-s diagram shows a final T b = 146 K. Here our isentropic equation gives T b = 210 * (1/200) ^ (0.4/1.4) = 46.2 K, then with the scale factor, T b = 210 – 0.128 * (210 – 46.2) = 189 K, quite a ways off from our desired 146 K. So, each tuning of the expansion scale factor only applies to a specific condition.

Also note that because our limited ethalpy fluid property is only a function of temperature, then by changing temperature we end up also changing enthalpy, which is no longer “isenthalpic”. So it’s an imperfect workaround.

⚠️ **GitHub.com Fallback** ⚠️