Documentation

flowfanno

Fanno line flow relations

Syntax

[mach, T, P, rho, velocity, P0, fanno] = flowfanno(gamma, fanno_flow, mtype)

Description

[mach, T, P, rho, velocity, P0, fanno] = flowfanno(gamma, fanno_flow, mtype) returns an array for each Fanno line flow relation. This function calculates the arrays for a given set of specific heat ratios (gamma), and any one of the Fanno flow types. You select the Fanno flow type with mtype.

This function uses Fanno variables given by the following. F is the Fanno parameter given by F = f*L/D. f is the friction coefficient. L is the length of constant area duct required to achieve sonic flow. D is the hydraulic diameter of the duct.

This function assumes that variables vary in one dimension only. It also assumes that the main mechanism for the change of flow variables is the change of cross-sectional area of the flow stream tubes.

If the temperature experiences large fluctuations, the perfect gas assumption might be invalid. If the stagnation temperature is above 1500 K, do not assume constant specific heats. In this case, the medium ceases to be a calorically perfect gas. Consider it a thermally perfect gas. See 2 for thermally perfect gas correction factors. If the temperature is so high that molecules dissociate and ionize (static temperature 5000 K for air), you cannot assume a perfect gas.

Input Arguments

gamma

Array of N specific heat ratios. gamma must be either a scalar or an array of N real numbers greater than 1. gamma must be a real, finite scalar greater than 1 for the following input modes: subsonic total pressure ratio, supersonic total pressure ratio, subsonic Fanno parameter, and supersonic Fanno parameter.

fanno_flow

Array of real numerical values for one Fanno flow. This argument can be one of the following:

• Array of Mach numbers. flow_fanno must be a scalar or an array of N real numbers greater than or equal to 0. If flow_fanno and gamma are arrays, they must be the same size.

Use flow_fanno with the mtype value 'mach'. Because 'mach' is the default of mtype, mtype is optional when this array is the input mode.

• Array of temperature ratios. The temperature ratio is the local static temperature over the reference static temperature for sonic flow. This array must be a scalar or array of N real numbers:

• Greater than or equal to 0 (as the Mach number approaches infinity)

• Less than or equal to (gamma+1)/2 (at Mach number equal 0)

Use flow_fanno with mtype value 'temp'.

• Array of pressure ratios. The pressure ratio is the local static pressure over the reference static pressure for sonic flow. flow_fanno must be a scalar or array of real numbers greater than or equal to 0. If flow_fanno and gamma are arrays, they must be the same size.

Use flow_fanno with mtype value 'pres'.

• Array of density ratios. The density ratio is the local density over the reference density for sonic flow. flow_fanno must be a scalar or array of real numbers. These numbers must be greater than or equal to:

sqrt((gamma-1)/(gamma+1)) (as the Mach number approaches infinity).

If flow_fanno and gamma are arrays, they must be the same size.

Use flow_fanno with mtype value 'dens'.

• Array of velocity ratios. The velocity ratio is the local velocity over the reference velocity for sonic flow. flow_fanno must be a scalar or an array of N of real numbers:

• Greater than or equal to 0

• Less than or equal to sqrt((gamma+1)/(gamma-1)) (as the Mach number approaches infinity)

If flow_fanno and gamma are both arrays, they must be the same size.

Use flow_fanno with mtype value 'velo'.

• Scalar value of total pressure ratio. The total pressure ratio is the local total pressure over the reference total pressure for sonic flow. flow_fanno must be greater than or equal to 1.

Use flow_fanno with mtype values 'totalp' and 'totalpsup'.

• Scalar value for Fanno parameter. The Fanno parameter is flow_fanno= f*L/D. f is the friction coefficient. L is the length of constant area duct required to achieve sonic flow. D is the hydraulic diameter of the duct. In subsonic mode, flow_fanno must be greater than or equal to 0. In supersonic mode, flow_fanno must be:

• Greater than or equal to 0 (at Mach number equal 1)

• Less than or equal to (gamma+1)/(2*gamma)*log((gamma+1)/(gamma-1))-1/gamma (as Mach number approaches infinity)

Use flow_fanno with mtype values 'fannosub' and 'fannosup'.

mtype

Input mode for the type of Fanno flow in fanno_flow.

TypeDescription
'mach'Default Mach number
'temp'Temperature ratio
'pres' Pressure ratio
'dens'Density ratio
'velo'Velocity ratio
'totalpsub'Subsonic total pressure ratio
'totalpsup'Supersonic total pressure ratio
'fannosub'Subsonic Fanno parameter
'fannosup'Supersonic Fanno parameter

Output Arguments

All outputs are the same size as the array inputs. If there are no array inputs, all outputs are scalars.

 mach Array of Mach numbers. T Array of temperature ratios. The temperature ratio is the local static temperature over the reference static temperature for sonic flow. P Array of pressure ratios. The pressure ratio is the local static pressure over the reference static pressure for sonic flow. rho Array of density ratio. The density ratio is the local density over the reference density for sonic flow. velocity Array of velocity ratios. The velocity ratio is the local velocity over the reference velocity for sonic flow. P0 Array of stagnation (total) pressure ratio. The total pressure ratio is the local total pressure over the reference total pressure for sonic flow. fanno Array of Fanno parameters. The Fanno parameter is F = f*L/D. f is the friction coefficient. L is the length of constant area duct required to achieve sonic flow. D is the hydraulic diameter of the duct.

Examples

Calculate the Fanno line flow relations for air (gamma = 1.4) for subsonic Fanno parameter 1.2. The following returns scalar values for mach, T, P, rho, velocity, P0, and fanno.

[mach, T, P, rho, velocity, P0, fanno] = flowfanno(1.4, 1.2, 'fannosub')

Calculate the Fanno line flow relations for gases with specific heat ratios given in the following 1 x 4 row array for the Mach number 0.5. The following yields a 1 x 4 row array for mach, T, P, rho, velocity, P0, and fanno.

gamma = [1.3, 1.33, 1.4, 1.67];
[mach, T, P, rho, velocity, P0, fanno] = flowfanno(gamma, 0.5)

Calculate the Fanno line flow relations for a specific heat ratio of 1.4 and range of temperature ratios from 0.40 to 0.70 in increments of 0.10. The following returns a 4 x 1 column array for mach, T, P, rho, velocity, P0, and fanno.

[mach, T, P, rho, velocity, P0, fanno] = flowfanno(1.4, [1.1 1.2], 'temp')

Calculate the Fanno line flow relations for gases with specific heat ratio and velocity ratio combinations as shown. The following returns a 1 x 2 array for mach, T, P, rho, velocity, P0, and fanno each. The elements of each array correspond to the inputs element-wise.

gamma = [1.3, 1.4];
V = [0.53, 0.49];
[MACH, T, P, RHO, V, P0, F] = flowfanno(gamma, V, 'velo')

References

1. James, J. E. A., Gas Dynamics, Second Edition, Allyn and Bacon, Inc, Boston, 1984.

2. NACA Technical Report 1135, 1953, National Advisory Committee on Aeronautics, Ames Research Staff, Moffett Field, Calif. Pages 667–671. 