core.compressible_flow¶
Compressible flow relations for convergent-divergent nozzle analysis.
- Isentropic flow — Critical pressure ratio, exit Mach from expansion ratio, exit pressure, choked-flow detection.
- Nozzle performance — Ideal and corrected thrust coefficient (Cf), optimal expansion ratio for a given altitude, effective exit conditions under overexpanded flow separation, thrust from Cf.
machwave.core.compressible_flow
¶
Compressible flow theory and analysis.
get_critical_pressure_ratio(k)
¶
Get critical pressure ratio for choked flow.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
k
|
float
|
Isentropic exponent. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Critical pressure ratio. |
get_exit_mach_from_expansion_ratio(k, expansion_ratio)
¶
Get exit Mach number from expansion ratio.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
k
|
float
|
Isentropic exponent. |
required |
expansion_ratio
|
float
|
Expansion ratio (A_exit / A_throat). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Exit Mach number. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If solver fails to converge. |
Source code in machwave/core/compressible_flow/isentropic.py
get_exit_pressure(k_exhaust, expansion_ratio, chamber_pressure)
¶
Get exit pressure from isentropic relations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
k_exhaust
|
float
|
Isentropic exponent at exit. |
required |
expansion_ratio
|
float
|
Expansion ratio. |
required |
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Exit pressure [Pa]. |
Source code in machwave/core/compressible_flow/isentropic.py
get_expansion_ratio_from_exit_mach(mach, k)
¶
Get expansion ratio from exit Mach number.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mach
|
float
|
Mach number. |
required |
k
|
float
|
Isentropic exponent. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Expansion ratio (A / A_throat). |
Source code in machwave/core/compressible_flow/isentropic.py
get_ideal_thrust_coefficient_terms(chamber_pressure, exit_pressure, external_pressure, expansion_ratio, k_exhaust)
¶
Get the momentum and pressure terms of the ideal thrust coefficient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
exit_pressure
|
float
|
Exit pressure [Pa]. |
required |
external_pressure
|
float
|
External pressure [Pa]. |
required |
expansion_ratio
|
float
|
Expansion ratio. |
required |
k_exhaust
|
float
|
Isentropic exponent at exit. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Momentum term then pressure term. The pressure term is positive when under |
float
|
expanded and negative when over expanded. |
References
https://www.nakka-rocketry.net/th_thrst.html
Source code in machwave/core/compressible_flow/nozzle.py
get_optimal_expansion_ratio(k, chamber_pressure, atmospheric_pressure)
¶
Get optimal expansion ratio for DeLaval nozzle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
k
|
float
|
Isentropic exponent. |
required |
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
atmospheric_pressure
|
float
|
External pressure [Pa]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Optimal expansion ratio. |
Source code in machwave/core/compressible_flow/nozzle.py
get_separated_exit_conditions(k_exhaust, expansion_ratio, chamber_pressure, external_pressure, separation_pressure_ratio)
¶
Get the effective exit conditions accounting for flow separation.
The model implemented is based on the work of Summerfield et al. (1954) and assumes that flow separation occurs when the exit pressure is below a certain fraction of the ambient pressure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
k_exhaust
|
float
|
Isentropic exponent at exit. |
required |
expansion_ratio
|
float
|
Geometric expansion ratio. |
required |
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
external_pressure
|
float
|
Ambient pressure [Pa]. |
required |
separation_pressure_ratio
|
float
|
Separation-to-ambient pressure ratio. |
required |
Returns:
| Type | Description |
|---|---|
tuple[float, float]
|
Effective expansion ratio and effective exit pressure [Pa]. |
References
Summerfield, M., Foster, C. R., & Swan, W. C. (1954). Flow separation in overexpanded supersonic exhaust nozzles.
Source code in machwave/core/compressible_flow/nozzle.py
get_thrust_from_thrust_coefficient(thrust_coefficient, chamber_pressure, nozzle_throat_area)
¶
Get thrust from thrust coefficient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
thrust_coefficient
|
float
|
Thrust coefficient. |
required |
chamber_pressure
|
float
|
Chamber stagnation pressure [Pa]. |
required |
nozzle_throat_area
|
float
|
Nozzle throat area [m^2]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Thrust [N]. |
Source code in machwave/core/compressible_flow/nozzle.py
is_flow_choked(chamber_pressure, external_pressure, critical_pressure_ratio)
¶
Check if flow is choked.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
external_pressure
|
float
|
External pressure [Pa]. |
required |
critical_pressure_ratio
|
float
|
Critical pressure ratio. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if flow is choked, False otherwise. |