Standard_Flow_Equation - nasa/gunns GitHub Wiki

{{>toc}}

Standard Flow Equation

The flow equation built into most fluid conductors is Bernoulli’s Equation with a simple correction for compressibility. We inherited this from the legacy PFN software that GUNNS replaced. Below is an attempt to derive it.

Start with Bernoulli:

v 2/2 + gz + p/ρ = constant

We assume g = 0 since our applications are usually in a micro-gravity environment. In applications where we need it, we have a way to include it back in to fluid networks using potential source links, described in Fluid_Aspect_Course_2_3_6.

From conservation of mass:

v = ṁ / ρa

Then our Bernoulli’s is:

(ṁ / ρa) 2/2 + p/ρ = constant

Multiply by 2·ρ 2 to group ρ in one term:

(ṁ / a) 2 + 2·p·ρ = constant

Incompressible Flow

Let’s apply this to incompressible flow through a duct. We have a duct of some constant cross-sectional area a with some mass flow through it . Feeding the inlet of the duct we assume is a pressurized flow of pressure p0 and cross-sectional area a0. At the exit of the duct we have pressure p1. We assune a0 to be large compared to a. We assume the mass flow is the same at points 0 and 1, by conservation of mass. Since the flow is incompressible, density ρ is constant and the same at both points.

(ṁ / a0) 2 + 2·p0·ρ = (ṁ / a) 2 + 2·p1·ρ

Being a0 is large, 1 / a0 2 goes to zero and we can drop that term:

2·p0·ρ = (ṁ / a) 2 + 2·p1·ρ

Grouping the pressure and density terms together:

(ṁ / a) 2 = 2·ρ·(p0 – p1)

Define the delta-pressure dp between the inlet & exit:

dp = p0 – p1

Substituting and re-arranging, we get a relationship for mass flow as a function of the delta-pressure:

(ṁ / a) 2 = 2·dp·ρ

ṁ / a = (2·dp·ρ) 1/2

ṁ = a·(2·dp·ρ) 1/2

From the Momentum Equation

We can also derive our flow equation from the Momentum Equation. The integral form of the momentum equation for fluid in a control volume is:

d/dt( ∭V ρ u dV ) = -∬S (ρ u dS)u -∬S p dS + ∭V ρ fbody dV + Fsurf

This is really just Newton’s Second Law, F = ma, or force is equal to the change in momentum.

We neglect the 1st, 3rd, and 4th terms on the right hand side: these are the convection of momentum into the volume, body forces, and external (surface shear) forces. This leaves us with:

d/dt( ρ·u·V ) = -p·a

From continuity, ṁ/a = ρ·u. Substituting:

d/dt( ṁ·V / a ) = -p·a

Substituting volume V = mass m over density ρ,

2 / (rho·a) = -p·a

Rearranging and using delta-pressure dp as the inlet minus exit pressure:

2 = dp·ρ·a2

ṁ = a · (dp·ρ)1/2

Compressible Flow

Now let’s consider compressible flow through the duct, by allowing that the fluid densities at the inlet & exit can be different. The inlet density is ρ0 and the exit is ρ1. Bernoulli’s is usually only applied to incompressible flow, and this is the basis for our correction for compressibility.

(ṁ / a0) 2 + 2·p0·ρ0 = (ṁ / a) 2 + 2·p1·ρ1

As before, we can drop the term with the large a0 in the demoninator:

2·p0·ρ0 = (ṁ / a) 2 + 2·p1·ρ1

Grouping the pressure and density terms together:

(ṁ / a) 2 = 2(p0·ρ0 – p1·ρ1)

Now we assume that for our fluid, density is proportional to pressure. This is true for ideal gasses at constant temperature (which we also assume):

p0/ρ0 = p1/ρ1

p0·ρ1 – p1·ρ0 = 0

Since this relationship equals zero we can add it into the flow equation above:

(ṁ / a) 2 = 2(p0·ρ0 – p1·ρ1 + p0·ρ1 – p1·ρ0)

This reduces to:

(ṁ / a) 2 = 2(p0 – p1)(ρ0 + ρ1)

Define the delta-pressure dp between the inlet & exit, and the average of the inlet & exit densities, ρ_avg:

dp = p0 – p1
ρ_avg = (ρ0 + ρ1) / 2

Substituting:

(ṁ / a) 2 = 4·dp·ρ_avg

ṁ / a = (4·dp·ρ_avg) 1/2

ṁ = 2·a·(dp·ρ_avg) 1/2

We then define the duct conductance G and the final flow equation is:

ṁ = G·(dp·ρ_avg) 1/2, G = 2·a

Tuning

The above is our standard flow equation used in all conductive fluid flows in GunnsFluidConductor and derived links. This has many simplifying assumptions, including adiabatic and inviscid flow, ideal gas (in the compressible case) and constant cross-sectional area with no obstructions or bends. All of these simplifications amount to significant inaccuracies when compared to real-world cases. We correct for this by tuning the conductance G term to match the desired vs. dP point. Usually the ideal G = 2a value is a good starting point, and the actual tuned G value will be less, because most of the effects we ignore in our equation are effects that retard the flow, such as friction. In practice we find that the tuned G is usually within an order of magnitude of the ideal 2a value.

Comparison to Theory

Orifice Flows

We can compare the GUNNS flow equation to orifice flow theory. For the theory, we use these compressible choked & non-choked orifice flow equations derived from the continuity equation and isentropic relationships for an ideal gas. These are commonly used in industry:

Compressible critical (choked flow) orifice:

ṁ = C d ·a·[ γ·ρ0·p0·(2/(γ1)) ^γ1 / γ-1^ ] 1/2,

Compressible subcritical (non-choked flow) orifice:

ṁ = C d ·a·[ 2·ρ0·p0·γ/(γ-1)·( (p1/p0) 2/γ – (p1/p0) γ+1 / γ ) ] 1/2,

Critical pressure:

p* = p0·(2/(γ+1)) γ/(γ-1),

where C d is the coefficient of discharge of the orifice, and γ is the ratio of specific heats (gamma) of the fluid.

In this case, the orifice effective throat area is 6.5e-5 m 2 which is the product of true throat area a = 1e-4 m 2 and C d = 0.65. The fluid is dry air with γ = 1.4, exit pressure p1 of 725 kPa and exit density ρ1 = 3.1233 kg/m 3. The tuned inlet pressure point p0 is 2000 kPa and inlet density ρ0 = 8.616 kg/m 3. The tuned GUNNS conductance G is 6.75e-5 m 2. Holding G constant for the GUNNS result and C d ·a constant for the theoretical result, we sweep the inlet pressure and density through a range and compare the resulting flow rates in the plot below. The theoretical orifice flow is choked at the tuned point and is non-choked below (Inlet Pressure / Tuned Point) < 0.5 or so.

The new Hi-Fi Orifice & derived linkes in release v14.3 implement and match the above theory exactly. More information on their performance here.

Pipe Flows

We can compare the GUNNS flow equation to pipe flow theory. We use the Darcy-Weisbach equation for the theoretical pressure drop across a straight pipe with circular cross-section and constant area for fully-developed incompressible flow due to friction. We use Serghides’s solution to calculate the Darcy friction factor for turbulent flow. For Laminar flow, the Darcy friction factor is 64 / Re (Reynold’s number). For the transition regime we linearly interpolate between the laminar (Re = 2300) and turbulent (Re = 4000) limits.

For the comparison plot below, we simulate a 20 ft long pipe with 1 inch inner diameter and inner surface roughness of 1e-6 m. The fluid is liquid water with inlet kinematic viscosity of 1.35e-6 m 2/s and density of 999.3 kg/m 3. The tuned point has = 3000 lbm/hr, and we sweep the through a range and show the resulting pressure drop of the theory and GUNNS flow equations in the plot below. The GUNNS conductance G is 2.85e-4 m 2, compared to the real cross-sectional area of 5.07e-4 m 2. The tuned point is in the turbulent flow regime with Re = 14100. The transition to laminar flow can be seen in the theory as the rapid dip in dp for (Flow Rate / Tuned Point) < 0.25 or so. The GUNNS flow equation doesn’t distinguish between turbulent vs. laminar flow. Laminar flow rate trends linearly with delta-pressure, whereas GUNNS continues the trend of ṁ = f(dp 1/2) in the laminar regime. For this reason, the GUNNS flow equation is particularly poor at modelling laminar pipe flow.

Note in this chart we have swapped the axis from the orifice flow plot above. The general trend of ṁ = f(dp 1/2) is seen in both both orifice and pipe flows.

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