Cone Flow Relations¶
High-Level API¶
minuteman.cpg.cone_flow.lookup_solution_by_cone_angle ¶
lookup_solution_by_cone_angle(
cone_angle: Floatlike,
mach_upstream: Floatlike,
specific_heat_ratio: Floatlike = 1.4,
shock_type: ObliqueShockType = ObliqueShockType.weak,
) -> ConeFlowSolution
Solve a cone flow problem with a known cone angle, \(\theta_c\)
Parameters:
-
cone_angle(Floatlike) –cone angle, \(\theta_c\) [radians]. Bounds: \((0, \theta_{c,max}]\)
-
mach_upstream(Floatlike) –upstream Mach number, \(M_1\). Bounds: \((1, \infty)\)
-
specific_heat_ratio(Floatlike, default:1.4) –ratio of specific heats, \(\gamma\). Bounds: \((1, 1.67]\)
-
shock_type(ObliqueShockType, default:weak) –shock type - you almost always want weak
Returns:
-
ConeFlowSolution–Cone flow solution
Raises:
-
OutOfBoundsError–invalid inputs
minuteman.cpg.cone_flow.lookup_solution_by_shock_angle ¶
lookup_solution_by_shock_angle(
shock_angle: Floatlike, mach_upstream: Floatlike, specific_heat_ratio: Floatlike = 1.4
) -> ConeFlowSolution
Solve a cone flow problem with a known shock angle, \(\theta_s\)
Parameters:
-
shock_angle(Floatlike) –shock angle, \(\theta_s\) [radians]. Bounds: \([\arcsin\left(\frac{1}{M1}\right), 90^\circ]\)
-
mach_upstream(Floatlike) –upstream Mach number, \(M_1\). Bounds: \((1, \infty)\)
-
specific_heat_ratio(Floatlike, default:1.4) –ratio of specific heats, \(\gamma\). Bounds: \((1, 1.67]\)
Returns:
-
ConeFlowSolution–Cone flow solution
Raises:
-
OutOfBoundsError–invalid inputs
minuteman.cpg.cone_flow.lookup_solution_by_surface_mach ¶
lookup_solution_by_surface_mach(
surface_mach: Floatlike, mach_upstream: Floatlike, specific_heat_ratio: Floatlike = 1.4
) -> ConeFlowSolution
Solve a cone flow problem with a known surface Mach number, \(M_c\)
Parameters:
-
surface_mach(Floatlike) –Mach number at the surface of the cone, \(M_c\). Bounds: \([M_2, M_1]\), where \(M_2\) is the Mach number downstream of a normal shock.
-
mach_upstream(Floatlike) –upstream Mach number, \(M_1\). Bounds: \((1, \infty)\)
-
specific_heat_ratio(Floatlike, default:1.4) –ratio of specific heats, \(\gamma\). Bounds: \((1, 1.67]\)
Returns:
-
ConeFlowSolution–Cone flow solution
Raises:
-
OutOfBoundsError–invalid inputs
Low-Level API¶
minuteman.cpg.cone_flow.solve_taylor_maccoll_by_cone_angle ¶
solve_taylor_maccoll_by_cone_angle(
cone_angle: Floatlike,
mach_upstream: Floatlike,
specific_heat_ratio: Floatlike,
shock_type: ObliqueShockType,
) -> tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat]
Solve the Taylor-Maccoll equations for a given cone angle, \(\theta_c\)
Parameters:
-
cone_angle(Floatlike) –cone angle, \(\theta_c\) [radians]
-
mach_upstream(Floatlike) –Upstream Mach number, \(M_1\)
-
specific_heat_ratio(Floatlike) –ratio of specific heats, \(\gamma\)
-
shock_type(ObliqueShockType) –shock type, strong or weak
Returns:
-
tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat]–Polar angle \(\theta\), nondimensional radial velocity \(V'_r\), and polar velocity \(V'_{\theta}\)
minuteman.cpg.cone_flow.solve_taylor_maccoll_by_shock_angle ¶
solve_taylor_maccoll_by_shock_angle(
shock_angle: Floatlike, mach_upstream: Floatlike, specific_heat_ratio: Floatlike
) -> tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat]
Compute the solution to the Taylor Maccoll equations for a given shock angle, \(\theta_s\).
Parameters:
-
shock_angle(Floatlike) –shock angle, \(\theta_s\) [radians]
-
mach_upstream(Floatlike) –upstream Mach number, \(M_1\)
-
specific_heat_ratio(Floatlike) –ratio of specific heats, \(\gamma\)
Returns:
-
tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat]–Polar angle \(\theta\), nondimensional radial velocity \(V'_r\), and polar velocity \(V'_{\theta}\)
Raises:
-
ValueError–polar velocity is positive (should be negative by convention)
-
SolveIVPError–IVP solver failed, check inputs
minuteman.cpg.cone_flow.solve_taylor_maccoll_by_surface_mach ¶
solve_taylor_maccoll_by_surface_mach(
surface_mach: Floatlike, mach_upstream: Floatlike, specific_heat_ratio: Floatlike
) -> tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat]
Compute the solution to the Taylor-Maccoll equations for a given Mach number at the surface of the cone, \(M_c\).
Parameters:
-
surface_mach(Floatlike) –Mach number at the surface of the cone, \(M_c\)
-
mach_upstream(Floatlike) –upstream Mach number, \(M_1\)
-
specific_heat_ratio(Floatlike) –ratio of specific heats, \(\gamma\)
Returns:
-
tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat]–Polar angle \(\theta\), nondimensional radial velocity \(V'_r\), and polar velocity \(V'_{\theta}\)
Raises:
-
DeveloperError–Root-finding failed
minuteman.cpg.cone_flow.cone_shock_angle_maxes ¶
cone_shock_angle_maxes(
mach_upstream: Floatlike, specific_heat_ratio: Floatlike
) -> tuple[float, float]
Compute the max cone angle \(\theta_{c,max}\) for a given upstream condition before the shock detaches, as well as the shock angle at that max cone angle condition, \(\theta_{s,max}\)
Parameters:
-
mach_upstream(Floatlike) –Upstream Mach number, \(M_1\)
-
specific_heat_ratio(Floatlike) –Ratio of specific heats, \(\gamma\)
Returns:
-
tuple[float, float]–(max cone angle \(\theta_{c,max}\), shock angle for the max cone angle, \(\theta_{s,max}\))
Raises:
-
DeveloperError–Solver did not converge
minuteman.cpg.cone_flow.deflection_angle_by_velocity_components ¶
deflection_angle_by_velocity_components(
polar_angle: NDArrayFloat, velocity_radial: NDArrayFloat, velocity_polar: NDArrayFloat
) -> NDArrayFloat
Compute the flow deflection angle \(\psi\) at all polar angles \(\theta\)
Parameters:
-
polar_angle(NDArrayFloat) –polar angle \(\theta\) [radians]
-
velocity_radial(NDArrayFloat) –nondimensional radial velocity, \(V'_r\)
-
velocity_polar(NDArrayFloat) –nondimensional polar velocity, \(V'_{\theta}\)
Returns:
-
NDArrayFloat–Flow deflection angle \(\psi\) at all polar angles post-shock
minuteman.cpg.cone_flow.mach_from_nondimensional_velocity ¶
minuteman.cpg.cone_flow.nondimensional_velocity_from_components ¶
Compute the nondimensional velocity \(V'\) useful to nondimensionalizing the Taylor Maccoll equations from its radial and polar components.
Parameters:
-
velocity_radial(Any) –nondimensional radial velocity \(V'_r\)
-
velocity_polar(Any) –nondimensional polar velocity \(V'_{\theta}\)
Returns:
-
Any–Nondimensional velocity \(V'\)
minuteman.cpg.cone_flow.nondimensional_velocity_from_mach ¶
Compute the nondimensional velocity \(V'\) useful to nondimensionalizing the Taylor Maccoll equations.
\(V' = V / V_{max}\) in chapter 10 of [1]. \(V_{max}\) is a max theoretical velocity if the flow were expanded to 0 K.
Parameters:
Returns:
-
Any–Nondimensional velocity \(V'\)
minuteman.cpg.cone_flow.nondimensional_velocity_polar ¶
Compute the nondimensional polar velocity \(V'_{\theta}\) for conic flow
The quantity is negative, as the \(+V'_{\theta}\) axis in the coordinate system is positive pointing away from the body.
Parameters:
-
velocity(Any) –nondimensional velocity, \(V'\)
-
shock_angle(Any) –shock angle \(\theta_s\) [radians]
-
deflection_angle(Any) –flow deflection angle, \(\theta\) [radians]
Returns:
-
Any–Polar component of nondimensional velocity, \(V'_{\theta}\)
minuteman.cpg.cone_flow.nondimensional_velocity_radial ¶
Compute the nondimensional radial velocity \(V'_r\) for conic flow
The quantity is positive in the downstream direction
Parameters:
-
velocity(Any) –nondimensional velocity, \(V'\)
-
shock_angle(Any) –shock angle \(\theta_s\) [radians]
-
deflection_angle(Any) –flow deflection angle, \(\theta\) [radians]
Returns:
-
Any–Radial component of nondimensional velocity, \(V'_r\)
Data Structures¶
minuteman.cpg.cone_flow.ConeFlowSolution
dataclass
¶
Flowfield solution for cone flow for a calorically perfect gas.
Array-like quantities vary as a function of the polar angle, \(\theta\).
mach_upstream: float
instance-attribute
¶
Upstream mach number, \(M_1\)
polar_angle: NDArrayFloat
instance-attribute
¶
Polar or cross-flow angle decreasing from the shock to the cone surface, \(\theta\) [radians]
shock_angle: float
property
¶
Shock angle, \(\theta_s\) [radians]
cone_angle: float
property
¶
Cone half-angle, \(\theta_c\) [radians]
specific_heat_ratio: float
instance-attribute
¶
Ratio of specific heats, \(\gamma\)
flow_angle: NDArrayFloat
instance-attribute
¶
Flow angle w.r.t. the cone axis, \(\psi\) [radians]
velocity_radial: NDArrayFloat
instance-attribute
¶
Nondimensional radial velocity, \(V'_r\)
velocity_polar: NDArrayFloat
instance-attribute
¶
Nondimensional polar velocity, \(V'_{\theta}\)
velocity: NDArrayFloat
instance-attribute
¶
Nondimensional velocity magnitude, \(V'\)
mach: NDArrayFloat
instance-attribute
¶
Downstream mach number, \(M\)
pressure_ratio: NDArrayFloat
instance-attribute
¶
Pressure ratio, \(p / p_1\)
temperature_ratio: NDArrayFloat
instance-attribute
¶
Temperature ratio, \(T / T_1\)
density_ratio: NDArrayFloat
instance-attribute
¶
Density ratio, \(\rho / \rho_1\)
total_pressure_ratio: float
instance-attribute
¶
Total pressure ratio, \(p_0 / p_{01}\). This value is a constant
Error Types¶
Theory¶
References¶
- Anderson, J. D., Jr. (2003). Modern compressible flow: With historical perspective (3rd ed.). McGraw-Hill.
- Sims, J. L. (1964). Tables for supersonic flow around right circular cones at zero angle of attack.