Main Content

flowrayleigh

Rayleigh line flow relations

Description

example

[mach,T,P,rho,velocity,T0,P0] = flowrayleigh(gamma,rayleigh_flow) returns an array for each Rayleigh line flow relation. This function calculates these arrays for a given set of specific heat ratios (gamma) for the Mach input mode.

example

[mach,T,P,rho,velocity,T0,P0] = flowrayleigh(gamma,rayleigh_flow,mtype) uses any one of the Rayleigh flow types mtype. Specify mtype types after all other input arguments.

Examples

collapse all

Calculate the Rayleigh line flow relations for gases with specific heat ratios given in this 1 x 4 row array for the Mach number 0.5.

gamma = [1.3,1.33,1.4,1.67];
[mach,T,P,rho,velocity,T0,P0] = flowrayleigh(gamma,0.5)
mach =
    0.5000    0.5000    0.5000    0.5000

T =
    0.7533    0.7644    0.7901    0.8870

P =
    1.7358    1.7486    1.7778    1.8836

rho =
    2.3043    2.2876    2.2500    2.1236

velocity =
    0.4340    0.4371    0.4444    0.4709

T0 =
    0.6796    0.6832    0.6914    0.7201

P0 =
    1.1111    1.1121    1.1141    1.1202

This example returns a 1 x 4 row array for mach, T, P, rho, velocity, T0, and P0.

Calculate the Rayleigh line flow relations for air (gamma = 1.4) for supersonic total pressure ratio 1.2.

[mach,T,P,rho,velocity,T0,P0] = flowrayleigh(1.4,1.2,'totalpsup')
mach =
    1.6397

T =
    0.6823

P =
    0.5038

rho =
    0.7383

velocity =
    1.3545

T0 =
    0.8744

P0 =
    1.2000

Calculate the Rayleigh line flow relations for a specific heat ratio of 1.4 and high-speed temperature ratio 0.70.

[mach,T,P,rho,velocity,T0,P0] = flowrayleigh(1.4,0.70,'temphi')
mach =
    1.6035

T =
    0.7000

P =
    0.5218

rho =
    0.7454

velocity =
    1.3416

T0 =
    0.8833

P0 =
    1.1777

Calculate the Rayleigh line flow relations for gases with specific heat ratio and static pressure ratio combinations as shown.

gamma = [1.3,1.4];
P = [0.13,1.7778];
[mach,T,P,rho,velocity,T0,P0] = flowrayleigh(gamma,P,'pres')
mach =
    3.5833    0.5000

T =
    0.2170    0.7901

P =
    0.1300    1.7778

rho =
    0.5991    2.2501

velocity =
    1.6692    0.4444

T0 =
    0.5521    0.6913

P0 =
    7.4381    1.1141

This example returns a 1 x 2 array for mach, T, P, rho, velocity, T0, and P0 each. The elements of each array correspond to the inputs element-wise.

Input Arguments

collapse all

Specific heat ratios, specified an array or scalar of N real numbers greater than 1.

Dependencies

gamma must be a real, finite scalar greater than 1 for these input modes:

  • Low-speed temperature ratio

  • High-speed temperature ratio

  • Subsonic total temperature

  • Supersonic total temperature

  • Subsonic total pressure

  • Supersonic total pressure

Data Types: double

One Rayleigh line flow, specified as an array of real numerical values. This argument can be one of these types.

Normal Shock Relation TypesDescription
Mach numbers

Mach numbers, specified as a scalar or array of N real numbers greater than or equal to 1. If rayleigh_flow and gamma are arrays, they must be the same size.

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

Temperature ratio

Temperature ratios, specified as a scalar of real numbers:

  • Greater than or equal to 0 (at the Mach number equal 0 for low speeds or as Mach number approaches infinity for high speeds)

  • Less than or equal to 1/4*(gamma+1/gamma)+1/2 (at mach = 1/sqrt(gamma))

Use rayleigh_flow with mtype values 'templo' and 'temphi'.

Pressure ratios

Pressure ratios, specified as an array or scalar. normal_shock_relations must be a scalar or array of real numbers less than or equal to gamma+1 (at the Mach number equal 0). If rayleigh_flow and gamma are arrays, they must be the same size. If rayleigh_flow and gamma are arrays, they must be the same size.

Use rayleigh_flow with mtype value 'pres'.

Density ratios

Density ratios, specified as an array or scalar of real numbers that are greater than or equal to gamma/(gamma+1) (as Mach number approaches infinity).

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

Use rayleigh_flow with mtype value 'dens'.

Velocity ratios

Velocity ratios, specified as an array or scalar of N real numbers:

  • Greater than or equal to 0

  • Less than or equal to (gamma+1)/gamma (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'.

Total temperature ratio

Total temperature ratios, specified as a real scalar:

  • In subsonic mode, rayleigh_flow must be a real scalar:

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

    • Less than or equal to 1 (at the Mach number equal 1)

  • In supersonic mode, rayleigh_flow must be a real scalar:

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

    • Less than or equal to 1 (at the Mach number equal 1)

Use rayleigh_flow with the mtype values 'totaltsub' and 'totaltsup'.

Total pressure ratio

Total pressure ratios, specified as a scalar:

  • In subsonic mode, rayleigh_flow must be a real scalar:

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

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

  • In supersonic mode, rayleigh_flow must be a real scalar greater than or equal to 1.

Use rayleigh_flow with mtype values 'totalpsub' and 'totalpsup'.

Data Types: double

Input mode for the Rayleigh flow in rayleigh_flow, specified as one of these types.

TypeDescription
'mach'Default. Mach number.
'templo'Low-speed static temperature ratio. The low-speed temperature ratio is the local static temperature over the reference sonic temperature. This ratio for when the Mach number of the upstream flow is less than the critical Mach number of 1/sqrt(gamma).
'temphi'High-speed static temperature ratio. The high-speed temperature ratio is the local static temperature over the reference sonic temperature. This ratio is for when the Mach number of the upstream flow is greater than the critical Mach number of 1/sqrt(gamma).
'pres' Pressure ratio.
'dens'Density ratio.
'velo'Velocity ratio.
'totaltsub'Subsonic total temperature ratio.
'totaltsup'Supersonic total temperature ratio.
'totalpsub'Subsonic total pressure ratio.
'totalpsup'Supersonic total pressure ratio.

Data Types: string

Output Arguments

collapse all

All output ratios are static conditions over the sonic conditions. All outputs are the same size as the array inputs. If there are no array inputs, all outputs are scalars.

Mach numbers, returned as an array.

Temperature ratios, returned as an array.

Pressure ratios, returned as an array.

Density ratios, returned as an array.

Velocity ratios, returned as an array.

Total temperature ratios, returned as an array.

Total pressure ratios, returned as an array.

Limitations

  • This function assumes that:

    • The medium is a calorically perfect gas in a constant area duct.

    • The flow is steady, frictionless, and one dimensional.

    • The main mechanism for the change of flow variables is heat transfer.

  • This function assumes that the environment is a perfect gas. In the following instances, it cannot assume a perfect gas environment.

    • If there is a large change in either temperature or pressure without a proportionally large change in the other.

    • 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; you must then consider it a thermally perfect gas. For thermally perfect gas correction factors, see [2]. The local static temperature might be so high that molecules dissociate and ionize (static temperature 5000 K for air). In this case, you cannot assume a calorically or thermally perfect gas.

More About

collapse all

Temperature Ratio

Calculated as the local static temperature over the static temperature at the choking location.

Pressure Ratio

Calculated as the local static pressure over the static pressure at the choking location.

Density Ratio

Calculated as the local density over the density at the choking location.

Velocity Ratio

Calculated as the local velocity over the velocity at the choking location.

Total Temperature Ratio

Calculated as the local total temperature over the total temperature at the choking location.

Total Pressure Ratio

Calculated as the local total pressure over the total pressure at the choking location.

References

[1] James, John E. A. Gas Dynamics. 2nd ed. Boston: Allyn and Bacon 1984.

[2] Ames Research Staff. NACA Technical Report 1135. Moffett Field, CA: National Advisory Committee on Aeronautics, 1953. 667–671.

Version History

Introduced in R2010a