public final class ShockMethods
extends java.lang.Object
Written by: Joseph A. Huwaldt
Modifier and Type | Field and Description |
---|---|
static boolean |
STRONG
Constant indicating that a strong shock solution should
be returned from os_beta().
|
static boolean |
WEAK
Constant indicating that a weak shock solution should
be returned from os_beta();
|
Modifier and Type | Method and Description |
---|---|
static double |
machAngle(double M)
Calculates the angle of a Mach wave with respect
to the direction of motion (Mach angle).
|
static void |
main(java.lang.String[] args)
A simple method to test the shock methods in this
class.
|
static double |
ns_CpMax(double M1,
double gam)
Calculates the maximum pressure coefficient behind a
normal shock.
|
static double |
ns_M2(double M1,
double gam)
Calculates the Mach number downstream of a normal shock.
|
static double |
ns_P2P1(double M1,
double gam)
Calculates the pressure ratio across a normal shock.
|
static double |
ns_PT2P1(double M1,
double gam)
Calculates the ratio of the total or stagnation pressure
behind a normal shock divided by the static pressure
before the shock.
|
static double |
ns_PT2PT1(double M1,
double gam)
Calculates the total or stagnation pressure ratio across
a normal shock.
|
static double |
ns_PT2PT1(double M1,
double M2,
double gam)
Calculates the total or stagnation pressure ratio across
a normal shock.
|
static double |
ns_rho2rho1(double M1,
double gam)
Calculates the density ratio across a normal shock.
|
static double |
ns_T2T1(double M1,
double gam)
Calculates the temperature ratio across a normal shock.
|
static double |
os_beta(double M1,
double theta,
double gam,
double tol,
boolean type)
Calculate the oblique shock angle (beta) given the incline
angle and Mach number upstream of the oblique shock.
|
static double |
os_beta(double M1,
double theta,
double gam,
double tol,
boolean type,
ShockBetaEvaluator betafn)
Calculate the oblique shock angle (beta) given the incline
angle and Mach number upstream of the oblique shock.
|
static double |
os_betaCrit(double M1,
double gam)
Calculates the critical oblique shock angle which divides
strong shocks from weak shocks.
|
static double |
os_M2(double Mn2,
double beta,
double theta)
Calculates the Mach number downstream of an
oblique shock given the normal component of
Mach number downstream of the shock.
|
static double |
os_Mach(double theta,
double beta,
double gam,
double tol)
Calculate the Mach number upstream of an oblique shock
given the incline and oblique shock angles.
|
static double |
os_Mach(double theta,
double beta,
double gam,
double tol,
ShockMachEvaluator machfn)
Calculate the Mach number upstream of an oblique shock
given the incline and oblique shock angles.
|
static double |
os_maxTheta(double M1,
double gam)
Calculates the maximum incline angle for an attached
oblique shock.
|
static double |
os_Mn1(double M1,
double beta)
Calculates the component of upstream Mach number
normal to an oblique shock.
|
static double |
os_theta(double M1,
double beta,
double gam)
Calculate the incline angle (theta) given the oblique shock
angle and Mach number upstream of the oblique shock.
|
static double |
pm_func(double M,
double gam)
Calculates the Prandtl-Meyer function (nu) for a
calorically perfect gas.
|
static double |
pm_Mach(double nu,
double gam,
double tol)
Back solves the Prandtl-Meyer function (nu) for Mach
number.
|
static double |
pm_Mach(double nu,
double gam,
double tol,
ShockMachNuEvaluator machNufn)
Back solves the Prandtl-Meyer function (nu) for Mach
number.
|
public static final boolean STRONG
public static final boolean WEAK
public static double ns_M2(double M1, double gam)
M1
- The Mach number upstream of a normal shock.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.public static double ns_rho2rho1(double M1, double gam)
M1
- The Mach number upstream of a normal shock.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.public static double ns_P2P1(double M1, double gam)
M1
- The Mach number upstream of a normal shock.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.public static double ns_T2T1(double M1, double gam)
M1
- The Mach number upstream of a normal shock.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.public static double ns_PT2PT1(double M1, double gam)
M1
- The Mach number upstream of a normal shock.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.public static double ns_PT2PT1(double M1, double M2, double gam)
M1
- The Mach number upstream of a normal shock.M2
- The Mach number downstream of a normal shock.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.public static double ns_PT2P1(double M1, double gam)
M1
- The Mach number upstream of a normal shock.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.public static double ns_CpMax(double M1, double gam)
M1
- The Mach number upstream of a normal shock.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.public static double machAngle(double M)
M
- The Mach number.public static double os_Mn1(double M1, double beta)
M1
- The Mach number upstream of an oblique shock.beta
- The oblique shock angle in radians.public static double os_M2(double Mn2, double beta, double theta)
Mn2
- The normal component of Mach number
downstream of the oblique shock.beta
- The oblique shock angle in radians.theta
- The incline angle in radians.public static double os_theta(double M1, double beta, double gam)
M1
- The Mach number upstream of the shock.beta
- The oblique shock angle in radians.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.public static double os_betaCrit(double M1, double gam)
M1
- The Mach number upstream of the oblique shock.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.public static double os_maxTheta(double M1, double gam)
M1
- The Mach number upstream of the oblique shock.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.public static double os_beta(double M1, double theta, double gam, double tol, boolean type) throws jahuwaldt.tools.math.RootException
M1
- The Mach number upstream of the shock.theta
- The incline angle in radians.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.tol
- Tolerance to use when calculating shock
angle.type
- Indicates if you want the Strong (true) or
weak (false) solution to be returned.jahuwaldt.tools.math.RootException
- if there is a problem finding beta.public static double os_beta(double M1, double theta, double gam, double tol, boolean type, ShockBetaEvaluator betafn) throws jahuwaldt.tools.math.RootException
M1
- The Mach number upstream of the oblique shock.theta
- The incline angle in radians.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.tol
- Tolerance to use when calculating shock
angle.type
- Indicates if you want the strong (true) or
weak (false) solution to be returned. Weak is the more common solution.betafn
- An instance of ShockBetaEvaluator.jahuwaldt.tools.math.RootException
- if there is a problem finding beta.public static double os_Mach(double theta, double beta, double gam, double tol) throws jahuwaldt.tools.math.RootException
theta
- The incline angle in radians.beta
- The oblique shock angle in radians.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.tol
- Tolerance to use when calculating Mach
number.jahuwaldt.tools.math.RootException
- if there is a problem finding Mach
number.public static double os_Mach(double theta, double beta, double gam, double tol, ShockMachEvaluator machfn) throws jahuwaldt.tools.math.RootException
theta
- The incline angle in radians.beta
- The oblique shock angle in radians.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.tol
- Tolerance to use when calculating Mach
number.machfn
- An instance of ShockMachEvaluator.jahuwaldt.tools.math.RootException
- if there is a problem finding Mach
number.public static double pm_func(double M, double gam)
M
- The Mach number upstream of an expansion fan.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.public static double pm_Mach(double nu, double gam, double tol) throws jahuwaldt.tools.math.RootException
nu
- Value of the Prandtl-Meyer function in radians.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.tol
- Tolerance to use when calculating the
Mach number.jahuwaldt.tools.math.RootException
public static double pm_Mach(double nu, double gam, double tol, ShockMachNuEvaluator machNufn) throws jahuwaldt.tools.math.RootException
nu
- Value of the Prandtl-Meyer function in radians.gam
- The specific heat ratio of the gas. The
value used for air is 1.4.tol
- Tolerance to use when calculating the
Mach number.machNufn
- An instance of a ShockMachNuEvalautor object.jahuwaldt.tools.math.RootException
public static void main(java.lang.String[] args)