Oblique Shock Relations¶
High-Level API¶
minuteman.cpg.oblique_shock.lookup_table_by_deflection_angle ¶
lookup_table_by_deflection_angle(
deflection_angle: ArraylikeFloat,
mach_upstream: ArraylikeFloat,
specific_heat_ratio: ArraylikeFloat = 1.4,
shock_type: ArraylikeObliqueShockType = ObliqueShockType.weak,
) -> ObliqueShockTable
Look up the oblique shock properties from a known flow deflection angle \(\theta\)
Parameters:
-
deflection_angle(ArraylikeFloat) –deflection angle, \(\theta\) [radians]. Bounds: \((0, \theta_{max}]\)
-
mach_upstream(ArraylikeFloat) –upstream Mach number \(M_1\). Bounds: \((1, \infty)\)
-
specific_heat_ratio(ArraylikeFloat, default:1.4) –ratio of specific heats, \(\gamma\). Bounds: \((1, 1.67]\)
-
shock_type(ArraylikeObliqueShockType, default:weak) –shock type
Returns:
-
ObliqueShockTable–Oblique shock table
Raises:
-
OutOfBoundsError–invalid inputs
minuteman.cpg.oblique_shock.lookup_table_by_mach_upstream_normal ¶
lookup_table_by_mach_upstream_normal(
mach_upstream_normal: ArraylikeFloat,
mach_upstream: ArraylikeFloat,
specific_heat_ratio: ArraylikeFloat = 1.4,
) -> ObliqueShockTable
Look up oblique shock table by the normal component of the upstream Mach number, \(M_{n1}\)
Parameters:
-
mach_upstream_normal(ArraylikeFloat) –normal component of the upstream Mach number, \(M_{n1}\). Bounds: \((1, M_1)\)
-
mach_upstream(ArraylikeFloat) –upstream Mach number, \(M_1\). Bounds: \((1, \infty)\)
-
specific_heat_ratio(ArraylikeFloat, default:1.4) –ratio of specific heats, \(\gamma\). Bounds: \((1, 1.67]\)
Returns:
-
ObliqueShockTable–Oblique shock table
Raises:
-
OutOfBoundsError–invalid inputs
minuteman.cpg.oblique_shock.lookup_table_by_shock_angle ¶
lookup_table_by_shock_angle(
shock_angle: ArraylikeFloat,
mach_upstream: ArraylikeFloat,
specific_heat_ratio: ArraylikeFloat = 1.4,
) -> ObliqueShockTable
Look up the oblique shock properties from a known shock angle, \(\beta\)
Parameters:
-
shock_angle(ArraylikeFloat) –shock angle, \(\beta\) [radians]. Bounds: \([\arcsin\left(\frac{1}{M1}\right), 90^\circ]\)
-
mach_upstream(ArraylikeFloat) –upstream Mach number, \(M_1\). Bounds: \((1, \infty)\)
-
specific_heat_ratio(ArraylikeFloat, default:1.4) –ratio of specific heats, \(\gamma\). Bounds: \((1, 1.67]\)
Returns:
-
ObliqueShockTable–Oblique shock table
Raises:
-
OutOfBoundsError–invalid inputs
Low-Level API¶
minuteman.cpg.oblique_shock.check_deflection_angle ¶
check_deflection_angle(
deflection_angle: ArraylikeFloat,
mach_upstream: ArraylikeFloat,
specific_heat_ratio: ArraylikeFloat,
) -> None
Ensure deflection angle \(\theta\) is within bounds or throw an error.
Parameters:
-
deflection_angle(ArraylikeFloat) –deflection angle \(\theta\) [radians]
-
mach_upstream(ArraylikeFloat) –upstream Mach number, \(M_1\)
-
specific_heat_ratio(ArraylikeFloat) –ratio of specific heats, \(\gamma\)
Raises:
-
OutOfBoundsError–deflection angle is invalid
minuteman.cpg.oblique_shock.check_shock_angle ¶
Ensure shock angle \(\beta\) is within bounds or throw an error.
Parameters:
-
shock_angle(ArraylikeFloat) –shock angle \(\beta\) [radians]
-
mach(ArraylikeFloat) –Mach number \(M\)
Raises:
-
OutOfBoundsError–shock angle is out of bounds for given Mach number
minuteman.cpg.oblique_shock.deflection_angle_by_shock_mach ¶
deflection_angle_by_shock_mach(
shock_angle: ArraylikeFloat, mach_upstream: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat
) -> NDArrayFloat
Compute the deflection angle \(\theta\) for a given shock angle \(\beta\) and upstream Mach number \(M_1\). This is the \(\theta\)-\(\beta\)-\(M\) relation (Eq. 4.17 in 1).
Parameters:
-
shock_angle(ArraylikeFloat) –shock angle \(\beta\) [radians]
-
mach_upstream(ArraylikeFloat) –upstream Mach number \(M_1\)
-
specific_heat_ratio(ArraylikeFloat) –ratio of specific heats, \(\gamma\)
Returns:
-
NDArrayFloat–Flow deflection angle, \(\theta\) [radians]
minuteman.cpg.oblique_shock.deflection_angle_max ¶
deflection_angle_max(
mach_upstream: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat
) -> NDArrayFloat
Compute the maximum flow deflection angle \(\theta_{max}\) [radians] for a given upstream Mach number \(M_1\).
Parameters:
-
mach_upstream(ArraylikeFloat) –upstream Mach number, \(M_1\)
-
specific_heat_ratio(ArraylikeFloat) –ratio of specific heats, \(\gamma\)
Returns:
-
NDArrayFloat–Max flow deflection angle, \(\theta_{max}\) [radians]
minuteman.cpg.oblique_shock.deflection_angle_sonic ¶
deflection_angle_sonic(
mach_upstream: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat
) -> NDArrayFloat
Compute the flow deflection angle \(\theta\) [radians] such that the downstream Mach number is sonic (\(M_2=1\)).
Parameters:
-
mach_upstream(ArraylikeFloat) –upstream Mach number, \(M_1\)
-
specific_heat_ratio(ArraylikeFloat) –ratio of specific heats, \(\gamma\)
Returns:
-
NDArrayFloat–Deflection angle \(\theta\) [radians] yielding sonic flow
minuteman.cpg.oblique_shock.mach_downstream_by_postshock ¶
mach_downstream_by_postshock(
mach_downstream_normal: ArraylikeFloat,
shock_angle: ArraylikeFloat,
deflection_angle: ArraylikeFloat,
) -> NDArrayFloat
Compute the downstream Mach number, \(M_2\)
Parameters:
-
mach_downstream_normal(ArraylikeFloat) –component of downstream Mach number normal to the shock, \(M_{n2}\)
-
shock_angle(ArraylikeFloat) –shock angle, \(\beta\) [radians]
-
deflection_angle(ArraylikeFloat) –flow deflection angle, \(\theta\) [radians]
Returns:
-
NDArrayFloat–Downstream Mach number, \(M_2\)
Raises:
-
OutOfBoundsError–Deflection angle must be smaller than shock angle
minuteman.cpg.oblique_shock.mach_downstream_normal_component ¶
mach_downstream_normal_component(
mach_upstream_normal: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat
) -> NDArrayFloat
Compute the component of downstream Mach number normal to the shock, \(M_{n2}\)
Parameters:
-
mach_upstream_normal(ArraylikeFloat) –component of upstream Mach number normal to the shock, \(M_{n1}\)
-
specific_heat_ratio(ArraylikeFloat) –ratio of specific heats, \(\gamma\)
Returns:
-
NDArrayFloat–Component of downstream Mach number normal to the shock, \(M_{n2}\)
minuteman.cpg.oblique_shock.mach_upstream_normal_component ¶
mach_upstream_normal_component(
mach_upstream: ArraylikeFloat, shock_angle: ArraylikeFloat
) -> NDArrayFloat
Compute the normal component of the upstream Mach number, \(M_{n1}\)
Parameters:
-
mach_upstream(ArraylikeFloat) –upstream Mach number, \(M_1\)
-
shock_angle(ArraylikeFloat) –shock angle, \(\beta\) [radians]
Returns:
-
NDArrayFloat–Normal component of the upstream Mach number, \(M_{n1}\)
minuteman.cpg.oblique_shock.shock_angle_by_deflection_mach ¶
shock_angle_by_deflection_mach(
deflection_angle: ArraylikeFloat,
mach_upstream: ArraylikeFloat,
specific_heat_ratio: ArraylikeFloat,
shock_type: ArraylikeObliqueShockType = ObliqueShockType.weak,
) -> NDArrayFloat
Compute the oblique shock angle \(\beta\) [radians] for a given deflection angle \(\theta\) and upstream Mach number \(M_1\).
This is the lesser-known \(\beta\)-\(\theta\)-\(M\) relation (Eq. 4.19-4.21 of 1)
Parameters:
-
deflection_angle(ArraylikeFloat) –flow deflection angle, \(\theta\) [radians]
-
mach_upstream(ArraylikeFloat) –upstream Mach number, \(M_1\)
-
specific_heat_ratio(ArraylikeFloat) –ratio of specific heats, \(\gamma\)
-
shock_type(ArraylikeObliqueShockType, default:weak) –Oblique shock type (weak or strong).
Returns:
-
NDArrayFloat–Shock angle \(\beta\) [radians]
minuteman.cpg.oblique_shock.shock_angle_max ¶
Compute the shock angle \(\beta_{max}\) [radians] that yields the max deflection angle \(\theta_{max}\) for a given Mach number \(M\) (slide 11 of 2).
Parameters:
-
mach_upstream(ArraylikeFloat) –upstream Mach number, \(M_1\)
-
specific_heat_ratio(ArraylikeFloat) –ratio of specific heats, \(\gamma\).
Returns:
-
NDArrayFloat–Maximum shock angle \(\beta_{max}\) [radians] that is still attached
minuteman.cpg.oblique_shock.shock_angle_sonic ¶
shock_angle_sonic(
mach_upstream: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat
) -> NDArrayFloat
Compute the oblique shock angle \(\beta\) [radians] which will yield a sonic downstream Mach number, \(M_2=1\) (slide 29 of 2).
Parameters:
-
mach_upstream(ArraylikeFloat) –upstream Mach number, \(M_1\)
-
specific_heat_ratio(ArraylikeFloat) –ratio of specific heats, \(\gamma\)
Returns:
-
NDArrayFloat–Shock angle \(\beta\) [radians] yielding sonic flow
Data Structures¶
minuteman.cpg.oblique_shock.ObliqueShockTable
dataclass
¶
Oblique shock table for a calorically perfect gas
mach_upstream: NDArrayFloat
instance-attribute
¶
Upstream mach number, \(M_1\)
mach_downstream: NDArrayFloat
instance-attribute
¶
Downstream mach number, \(M_2\)
mach_upstream_normal: NDArrayFloat
instance-attribute
¶
Normal component of upstream Mach number, \(M_{n1}\)
mach_downstream_normal: NDArrayFloat
instance-attribute
¶
Normal component of downstream Mach number, \(M_{n2}\)
deflection_angle: NDArrayFloat
instance-attribute
¶
Deflection angle, \(\theta\)
shock_angle: NDArrayFloat
instance-attribute
¶
Shock angle, \(\beta\)
temperature_ratio: NDArrayFloat
instance-attribute
¶
Temperature ratio, \(T_2 / T_1\)
pressure_ratio: NDArrayFloat
instance-attribute
¶
Static pressure ratio, \(p_2 / p_1\)
density_ratio: NDArrayFloat
instance-attribute
¶
Density ratio, \(\rho_2 / \rho_1\)
total_pressure_ratio: NDArrayFloat
instance-attribute
¶
Total pressure ratio, \(p_{02} / p_{01}\)
specific_heat_ratio: NDArrayFloat
instance-attribute
¶
Ratio of specific heats, \(\gamma\)
minuteman.cpg.oblique_shock.ObliqueShockType
¶
References¶
- Anderson, J. D., Jr. (2003). Modern compressible flow: With historical perspective (3rd ed.). McGraw-Hill.
- Whitmore, Stephen. Section 8 Lecture 3: Supersonic Flow Around a Blunt Body [[PDF slides]]. MAE 5420, Utah State University. URL