Compressible Flow Subroutine Library
Programming Reference Manual
Version 1.0 DD-00008-010E

3.15.3 arsptp - (Rayleigh-)Pitot relations given p0/p or p02/p1
double arsptp(double g, double p0, bool is_sub, int *ierr);

Compute the Rayleigh-Pitot properties given a one of the pressure ratios p0/p or p02/p1   .

Performance

Arguments

G - REAL

ENTRY: Specific heat constant γ .

P0 - REAL

ENTRY: The pressure ratio p0/p≥ 1  or p02/p1≥ ((1+ γ)/2)(γ/(γ-1))   depending upon is_sub.

IS_SUB - BOOLEAN

ENTRY: Whether p0 refers to a Pitot pressure fraction (true) or to a Rayleigh-Pitot pressure fraction (false).

RESULT - ARRAY OF REAL

EXIT: Array with result properties as described in  13.

IERR - INTEGER

EXIT: (optional) Return status code.

Status codes

-1

Specific heat ratio γ≤ 1  .

-2

Given pressure ratio out of range.

-3

Iterative solver failed.

Return Values
The Mach number M or NAN on error.