flownormalshock

Normal shock relations

Syntax

[mach, T, P, rho, downstream_mach, P0, P1] = flownormalshock(gamma, normal_shock_relations, mtype)

Description

[mach, T, P, rho, downstream_mach, P0, P1] = flownormalshock(gamma, normal_shock_relations, mtype) produces an array for each normal shock relation (normal_shock_relations). This function calculates these arrays for a given set of specific heat ratios (gamma) and any one of the normal shock relations (normal_shock_relations). mtype selects the normal shock relations that normal_shock_relations represents. All ratios are downstream value over upstream value. Consider upstream to be before or ahead of the shock; downstream is after or behind the shock.

This function assumes that the medium is a calorically perfect gas. It assumes that the flow is frictionless and adiabatic. It assumes that the flow variables vary in one dimension only. It 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. You must then 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. For temperature ratio, total pressure ratio, and Rayleigh-Pitot ratio input modes, gamma must be a real, finite scalar greater than 1.

normal_shock_relations

Array of real numerical values for one of the normal shock relations. This argument can be one of the following:

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

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

  • Scalar value of temperature ratio. The temperature ratio is the static temperature downstream of the shock over the static temperature upstream of the shock. normal_shock_relations must be a real scalar greater than or equal to 1.

    Use normal_shock_relations with mtype value 'temp'.

  • Array of pressure ratios. The pressure ratio is the static pressure downstream of the shock over the static pressure upstream of the shock. normal_shock_relations must be a scalar or array of real numbers greater than or equal to 1. If normal_shock_relations and gamma are arrays, they must be the same size.

    Use normal_shock_relations with mtype value 'pres'.

  • Array of density ratios. The density ratio is the density of the fluid downstream of the shock over the density upstream of the shock. normal_shock_relations must a scalar or array of real numbers be:

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

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

    If normal_shock_relations and gamma are arrays, they must be the same size. Use normal_shock_relations with mtype value 'dens'.

  • Array of downstream Mach numbers. normal_shock_relations must be scalar or array of real numbers:

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

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

    If normal_shock_relations and gamma are arrays, they must be the same size. Use normal_shock_relations with mtype value 'down'.

  • Scalar value of total pressure ratio. The total pressure ratio is the total pressure downstream of the shock over the total pressure upstream of the shock. normal_shock_relations must be:

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

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

    If normal_shock_relations and gamma are both arrays, they must be the same size. Use normal_shock_relations with mtype value 'totalp'.

  • Scalar value of Rayleigh-Pitot ratio. The Rayleigh-Pitot ratio is the static pressure upstream of the shock over the total pressure downstream of the shock. normal_shock_relations must be:

    • Real scalar greater than or equal to 0 (as the Mach number approaches infinity)

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

    If normal_shock_relations and gamma are both arrays, they must be the same size. Use normal_shock_relations with mtype value 'pito'.

mtype

A string that defines the input mode for the normal shock relations in normal_shock_relations.

TypeDescription
'mach'Default. Mach number.
'temp'Temperature ratio.
'pres' Pressure ratio.
'dens'Density ratio.
'velo'Velocity ratio.
'totalp'Total pressure ratio.
'pito'Rayleigh-Pitot ratio.

Output Arguments

mach

Array of upstream Mach numbers.

P

Array of pressure ratios. The pressure ratio is the static pressure downstream of the shock over the static pressure upstream of the shock.

T

Array of temperature ratios. The temperature ratio is the static temperature downstream of the shock over the static temperature upstream of the shock.

rho

Array of density ratios. The density ratio is the density of the fluid downstream of the shock over the density upstream of the shock.

downstream_mach

Array of downstream Mach numbers.

P0

Array of total pressure ratios. The total pressure ratio is the total pressure downstream of the shock over the total pressure upstream of the shock.

P1

Array of Rayleigh-Pitot ratios. The Rayleigh-Pitot ratio is the static pressure upstream of the shock over the total pressure downstream of the shock.

Examples

Calculate the normal shock relations for air (gamma = 1.4) for total pressure ratio of 0.61. The following returns scalar values for mach, T, P, rho, downstream_mach, P0, and P1.

[mach, T, P, rho, downstream_mach, P0, P1] = flownormalshock(1.4, 0.61, 'totalp')

Calculate the normal shock relations for gases with specific heat ratios given in the following 1 x 4 row array for upstream Mach number 1.5. The follow yields a 1 x 4 array for mach, T, P, rho, downstream_mach, P0, and P1.

gamma = [1.3, 1.33, 1.4, 1.67];
[mach, T, P, rho, downstream_mach, P0, P1] = flownormalshock(gamma, 1.5)

Calculate the normal shock relations for a specific heat ratio of 1.4 and range of density ratios from 2.40 to 2.70 in increments of 0.10. The following returns a 4 x 1 column array for mach, T, P, rho, downstream_mach, P0, and P1.

[mach, T, P, rho, downstream_mach, P0, P1] = flownormalshock(1.4,...
 (2.4:.1:2.7)', 'dens')

Calculate the normal shock relations for gases with specific heat ratio and downstream Mach number combinations as shown. The following example returns a 1 x 2 array for mach, T, P, rho, downstream_mach, P0, and P1 each, where the elements of each vector corresponds to the inputs element-wise.

gamma = [1.3, 1.4];
downstream_mach = [.34, .49];
[mach, T, P, rho, downstream_mach, P0, P1] = flownormalshock(gamma,...
 downstream_mach, 'down')

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.

Was this topic helpful?