Main Content

flownormalshock

Normal shock relations

Description

example

[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 and downstream to be after or behind the shock.

example

[mach,T,P,rho,downstream_mach,P0,P1] = flownormalshock(___,mtype) uses any one of the normal shock relations mtype. Specify mtype types after all other input arguments.

Examples

collapse all

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. This example 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)
mach =
    1.5000    1.5000    1.5000    1.5000

T =
    1.2473    1.2697    1.3202    1.4968

P =
    2.4130    2.4270    2.4583    2.5637

rho =
    1.9346    1.9116    1.8621    1.7128

downstream_mach =
    0.6942    0.6964    0.7011    0.7158

P0 =
    0.9261    0.9272    0.9298    0.9381

P1 =
    0.3062    0.3021    0.2930    0.2628

Calculate the normal shock relations for air (gamma = 1.4) for a total pressure ratio of 0.61. This example 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')
mach =
    2.2401

T =
    1.8925

P =
    5.6875

rho =
    3.0053

downstream_mach =
    0.5418

P0 =
    0.6100

P1 =
    0.1440

Calculate the normal shock relations for a specific heat ratio of 1.4 and a range of density ratios from 2.40 to 2.70 in increments of 0.10. This example 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')
mach =
    1.8257
    1.8898
    1.9554
    2.0226

T =
    1.5509
    1.6000
    1.6516
    1.7059

P =
    3.7222
    4.0000
    4.2941
    4.6061

rho =
    2.4000
    2.5000
    2.6000
    2.7000

downstream_mach =
    0.6108
    0.5976
    0.5852
    0.5735

P0 =
    0.8012
    0.7720
    0.7417
    0.7103

P1 =
    0.2088
    0.1964
    0.1847
    0.1737

Calculate the normal shock relations for gases with a specific heat ratio and downstream Mach number combinations as shown. This 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')
mach =
   60.2773    2.7745

T =
  536.6972    2.4233

P =
   1.0e+03 *

    4.1071    0.0088

rho =
    7.6526    3.6374

downstream_mach =
    0.3400    0.4900

P0 =
    0.0000    0.3979

P1 =
    0.0002    0.0963

Input Arguments

collapse all

Specific heat ratios, specified as an array or scalar of N specific heat ratios.

Dependencies

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

  • Temperature ratio

  • Total pressure ratio

  • Rayleigh-Pitot ratio

Data Types: double

One normal shock relation, specified as an array or scalar 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 normal_shock_relations and gamma are arrays, they must be the same size.

Use normal_shock_relations 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 or array of real numbers. normal_shock_relations must be a real scalar greater than or equal to 1.

Use normal_shock_relations with mtype value 'temp'.

Pressure ratios

Pressure ratios, specified as an array or scalar. 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'.

Density ratios

Density ratios, specified as an array or scalar of real numbers that are:

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

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

Downstream Mach numbers

Mach numbers, specified as a 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 flow with mtype value 'down'.

Total pressure ratio

Total pressure ratios, specified as a scalar. 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'.

Rayleigh-Pitot ratio

Rayleigh-Pitot ratio, specified as a scalar. 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)

Data Types: double

Input mode for normal shock relations, specified as one of these values.

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

Data Types: string

Output Arguments

collapse all

Mach numbers, returned as an array.

Pressure ratios, returned as an array.

Temperature ratios, returned as an array.

Density ratios, returned as an array.

Downstream Mach numbers, returned as an array.

Total pressure ratios, returned as an array.

Rayleigh-Pitot ratios, returned as an array.

Limitations

  • This function assumes that:

    • The medium is a calorically perfect gas.

    • The flow is frictionless and adiabatic.

    • The flow variables vary in one dimension only.

    • 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. For thermally perfect gas correction factors, see [2]. If the temperature is so high that molecules dissociate and ionize (static temperature 5000 K for air), you cannot assume a perfect gas.

More About

collapse all

Pressure Ratio

Calculated as the static pressure downstream of the shock over the static pressure upstream of the shock.

Temperature Ratio

Calculated as the static temperature downstream of the shock over the static temperature upstream of the shock.

Density Ratio

Calculated as the fluid density downstream of the shock over the density upstream of the shock.

Total Pressure Ratio

Calculated as static pressure downstream of the shock over the static pressure upstream of the shock..

Rayleigh-Pitot Ratio

Static pressure upstream of the shock over the total pressure downstream of the shock

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.

Introduced in R2010a