models.propellants.categories¶
Propellant type classes.
SolidPropellant— Defined by component mass fractions, pre-computed or CEA-evaluated thermochemical properties, and aburn_rate_mapencoding St. Robert’s law coefficients (\(r = a \cdot P_0^n\)) across pressure ranges. Callget_burn_rate(P_0)to obtain instantaneous regression rate.BiliquidPropellant— Defined by exactly two components (oxidizer + fuel) and an O/F mass ratio. Thermochemical properties are evaluated at the specified O/F.
Both extend the Propellant base class and implement evaluate(chamber_pressure, expansion_ratio, mixture_ratio=None) to return a ThermochemicalProperties dataclass. The optional mixture_ratio overrides the propellant's stored ratio per-call — BiliquidEngineState uses this to feed the live \(\dot{m}_{ox} / \dot{m}_{fuel}\) each step.
machwave.models.propellants.categories
¶
Propellant categories or mixture types.
BiliquidPropellant
¶
Bases: Propellant
Biliquid propellant with separate oxidizer and fuel.
Source code in machwave/models/propellants/categories/biliquid.py
__init__(name, components=None, oxidizer_to_fuel_ratio=None)
¶
Initialize biliquid propellant.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Propellant name. |
required |
components
|
list[PropellantComponent] | None
|
Chemical components (should be exactly 2: oxidizer and fuel). |
None
|
oxidizer_to_fuel_ratio
|
float | None
|
Oxidizer-to-fuel mass ratio for this
formulation. Used as the default mixture_ratio at the
thermochemical service layer; callers can override per-call
via |
None
|
Raises:
| Type | Description |
|---|---|
PropellantValidationError
|
If components do not include exactly one oxidizer and one fuel. |
Source code in machwave/models/propellants/categories/biliquid.py
MixtureType
¶
Propellant
¶
Bases: ABC
Base class for propellant formulations.
Source code in machwave/models/propellants/categories/base.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
has_condensed_phase
property
¶
Whether this propellant can form a condensed combustion phase.
A propellant built solely from elements in GASEOUS_ONLY_ELEMENTS cannot form a
condensed phase.
thermochemical_service
cached
property
¶
Get thermochemical service, cached.
__init__(name, components=None)
¶
Initialize a propellant.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Propellant name. |
required |
components
|
list[PropellantComponent] | None
|
Chemical components. If None, defaults to empty list. |
None
|
Source code in machwave/models/propellants/categories/base.py
evaluate(chamber_pressure, expansion_ratio=8.0, mixture_ratio=None)
¶
Evaluate thermochemical properties at given conditions.
Chamber pressure is quantized to CHAMBER_PRESSURE_QUANTIZATION_PA and
mixture ratio to MIXTURE_RATIO_QUANTIZATION; the result is cached per
(chamber_pressure, expansion_ratio, mixture_ratio).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
expansion_ratio
|
float
|
Nozzle area ratio (Ae/At). |
8.0
|
mixture_ratio
|
float | None
|
Ratio of the propellant mixture. |
None
|
Returns:
| Type | Description |
|---|---|
ThermochemicalProperties
|
ThermochemicalProperties. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If evaluation fails. |
Source code in machwave/models/propellants/categories/base.py
SolidPropellant
¶
Bases: Propellant
Solid propellant with burn rate model.
Source code in machwave/models/propellants/categories/solid.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
ideal_density
property
¶
Return the ideal propellant density [kg/m^3] for solid mixtures.
Uses a harmonic mean based on solid mixture mass fractions.
properties
property
¶
Expose pre-defined thermochemical properties when present.
__init__(name, components=None, mass_fractions=None, properties=None, burn_rate_map=None)
¶
Initialize a solid propellant.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Propellant name. |
required |
components
|
list[PropellantComponent] | None
|
Chemical components. Required; must contain at least one oxidizer and one fuel. |
None
|
mass_fractions
|
list[float] | None
|
Mass fractions aligned with |
None
|
properties
|
ThermochemicalProperties | None
|
Pre-defined thermochemical properties. Optional
override used by |
None
|
burn_rate_map
|
list[dict[str, float | int]] | None
|
Saint Robert's law coefficients by pressure range. |
None
|
Raises:
| Type | Description |
|---|---|
PropellantValidationError
|
If components, mass_fractions, or their relationship is invalid. |
Source code in machwave/models/propellants/categories/solid.py
evaluate(chamber_pressure, expansion_ratio=8.0, mixture_ratio=None)
¶
Evaluate thermochemical properties.
If properties are pre-defined, returns them directly. Otherwise, evaluates using the thermochemical service via the parent class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
expansion_ratio
|
float
|
Nozzle area expansion ratio (Ae/At). |
8.0
|
mixture_ratio
|
float | None
|
Per-call mixture ratio override. Unused for solid formulations; accepted for parent-class compatibility. |
None
|
Returns:
| Type | Description |
|---|---|
ThermochemicalProperties
|
Pre-defined or calculated properties. |
Raises:
| Type | Description |
|---|---|
PropellantValidationError
|
If evaluation fails. |
Source code in machwave/models/propellants/categories/solid.py
get_burn_rate(chamber_pressure)
¶
Return the instantaneous burn rate of the solid propellant.
Uses Saint Robert's law r = a * P^n, where r is burn rate [m/s],
P is chamber pressure [MPa], and a, n are empirical coefficients
drawn from burn_rate_map.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Burn rate [m/s]. |
Raises:
| Type | Description |
|---|---|
BurnRateOutOfBoundsError
|
If pressure is outside the valid range. |
PropellantValidationError
|
If the burn rate model is not defined. |