models.propulsion.motors¶
machwave.models.propulsion.motors
¶
LiquidEngine
¶
Bases: Motor[BiliquidPropellant, LiquidEngineThrustChamber]
Source code in machwave/models/propulsion/motors/liquid.py
13 14 15 16 17 18 19 20 21 22 23 24 25 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 | |
initial_propellant_mass
property
¶
Returns the initial propellant mass in kg.
__init__(propellant, thrust_chamber, feed_system, oxidizer_tank_cog=None, fuel_tank_cog=None, other_losses=12.0)
¶
Initialize a liquid rocket engine.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
propellant
|
BiliquidPropellant
|
Bi-liquid propellant properties (oxidizer + fuel). |
required |
thrust_chamber
|
LiquidEngineThrustChamber
|
Thrust chamber assembly (nozzle + combustion chamber + injector). |
required |
feed_system
|
FeedSystem
|
Propellant feed system (tanks, lines, pumps/pressurization). |
required |
oxidizer_tank_cog
|
float | None
|
Axial position of the oxidizer tank center (where propellant CoG is), measured from the nozzle exit, in meters. If None, uses a default estimate. |
None
|
fuel_tank_cog
|
float | None
|
Axial position of the fuel tank center (where propellant CoG is), measured from the nozzle exit, in meters. If None, uses a default estimate. |
None
|
other_losses
|
float
|
Additional engine losses not accounted for by specific loss mechanisms, in percent. Defaults to 12%. |
12.0
|
Source code in machwave/models/propulsion/motors/liquid.py
get_center_of_gravity(propellant_fraction=0.0)
¶
Calculate the center of gravity of the liquid engine including structural dry mass, oxidizer, and fuel.
The calculation uses a mass-weighted average of: 1. Structural dry mass (thrust chamber, tanks structure, feed lines, etc.) 2. Oxidizer mass (from oxidizer tank) 3. Fuel mass (from fuel tank)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
propellant_fraction
|
float
|
Fraction of propellant consumed (0.0 = full, 1.0 = empty). |
0.0
|
Returns:
| Type | Description |
|---|---|
NDArray[float64]
|
Center of gravity in 3D space [x, y, z], in meters. |
NDArray[float64]
|
Origin is at the nozzle exit on the chamber axis. |
NDArray[float64]
|
Positive x-direction points forward (toward bulkhead/away from nozzle exit). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If thrust_chamber.center_of_gravity_coordinate, oxidizer_tank_cog, or fuel_tank_cog is not defined. |
Source code in machwave/models/propulsion/motors/liquid.py
get_thrust_coefficient(chamber_pressure, exit_pressure, external_pressure, expansion_ratio, k_ex, n_cf)
¶
Get 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_ex
|
float
|
Two-phase isentropic coefficient. |
required |
n_cf
|
float
|
Thrust coefficient correction factor. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Instantaneous thrust coefficient. |
Source code in machwave/models/propulsion/motors/liquid.py
Motor
¶
Bases: Generic[P, T], ABC
Abstract rocket motor/engine class. Can be used to model any chemical rocket propulsion system, such as Solid, Hybrid and Liquid.
Source code in machwave/models/propulsion/motors/base.py
18 19 20 21 22 23 24 25 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 | |
initial_propellant_mass
abstractmethod
property
¶
Returns:
| Type | Description |
|---|---|
float
|
Initial propellant mass, in kg |
__init__(propellant, thrust_chamber, other_losses=DEFAULT_OTHER_MOTOR_LOSSES)
¶
Instantiates object attributes common to any motor/engine (Solid, Hybrid or Liquid).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
propellant
|
P
|
Object representing the propellant used in the motor. |
required |
thrust_chamber
|
T
|
Object representing the thrust chamber of the motor. |
required |
other_losses
|
float
|
Other motor losses, in percent. |
DEFAULT_OTHER_MOTOR_LOSSES
|
Source code in machwave/models/propulsion/motors/base.py
get_center_of_gravity(*args, **kwargs)
abstractmethod
¶
Calculate the center of gravity of the propulsion system.
The coordinate system origin corresponds to the combustion chamber axis at the nozzle exit plane, with positive x pointing toward the bulkhead.
Returns:
| Type | Description |
|---|---|
NDArray[float64]
|
A 1D array of shape (3,) representing the [x, y, z] coordinates of |
NDArray[float64]
|
the center of gravity, in meters. |
Source code in machwave/models/propulsion/motors/base.py
get_dry_mass()
abstractmethod
¶
Calculates the dry mass of the rocket at any time.
Returns:
| Type | Description |
|---|---|
float
|
Dry mass of the rocket, in kg |
get_launch_mass()
abstractmethod
¶
Calculates the total mass of the motor before launch.
Returns:
| Type | Description |
|---|---|
float
|
Total mass of the motor before launch, in kg |
get_thrust(cf, chamber_pressure)
¶
Calculates the thrust based on instantaneous thrust coefficient and chamber pressure.
Utilized nozzle throat area from the structure and nozzle classes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cf
|
float
|
Instantaneous thrust coefficient, adimensional |
required |
chamber_pressure
|
float
|
Instantaneous chamber pressure, in Pa |
required |
Returns:
| Type | Description |
|---|---|
float
|
Instantaneous thrust, in Newtons |
Source code in machwave/models/propulsion/motors/base.py
get_thrust_coefficient(*args, **kwargs)
abstractmethod
¶
Calculates the thrust coefficient at a particular instant.
Returns:
| Type | Description |
|---|---|
float
|
Thrust coefficient |
get_thrust_coefficient_correction_factor(*args, **kwargs)
¶
Calculates the thrust coefficient correction factor. This factor is adimensional and should be applied to the ideal thrust coefficient to get the real thrust coefficient.
Returns:
| Type | Description |
|---|---|
float
|
Thrust coefficient correction factor |
Source code in machwave/models/propulsion/motors/base.py
SolidMotor
¶
Bases: Motor[SolidPropellant, SolidMotorThrustChamber]
Source code in machwave/models/propulsion/motors/solid.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 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 | |
initial_propellant_mass
property
¶
Returns:
| Type | Description |
|---|---|
float
|
Initial propellant mass, in kg |
__init__(grain, propellant, thrust_chamber, other_losses=motor_base.DEFAULT_OTHER_MOTOR_LOSSES)
¶
Initialize a solid rocket motor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
grain
|
Grain
|
Grain geometry configuration. |
required |
propellant
|
SolidPropellant
|
Solid propellant properties. |
required |
thrust_chamber
|
SolidMotorThrustChamber
|
Thrust chamber model. |
required |
other_losses
|
float
|
Additional motor losses not accounted for by specific loss mechanisms (0-1), defaults to 0.12 (12%). |
DEFAULT_OTHER_MOTOR_LOSSES
|
Source code in machwave/models/propulsion/motors/solid.py
get_center_of_gravity(web_distance=0.0)
¶
Calculates the center of gravity of the solid motor including propellant grain (wet mass) and dry mass.
The calculation uses a mass-weighted average of: 1. Propellant grain CoG; 2. Thrust chamber dry mass CoG, considered constant.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
web_distance
|
float
|
Web distance traveled [m]. Defaults to ignition state. |
0.0
|
Returns:
| Type | Description |
|---|---|
NDArray[float64]
|
Center of gravity in 3D space (x, y, z) [m]. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If thrust chamber dry mass CoG is not defined or if total mass is less than or equal to zero. |
Source code in machwave/models/propulsion/motors/solid.py
get_free_chamber_volume(propellant_volume)
¶
Calculates the chamber volume without any propellant.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
propellant_volume
|
float
|
Propellant volume, in m^3 |
required |
Returns:
| Type | Description |
|---|---|
float
|
Free chamber volume, in m^3 |
Source code in machwave/models/propulsion/motors/solid.py
get_thrust_coefficient(chamber_pressure, exit_pressure, external_pressure, expansion_ratio, k_ex, n_cf)
¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chamber_pressure
|
float
|
Chamber pressure, in Pa |
required |
exit_pressure
|
float
|
Exit pressure, in Pa |
required |
external_pressure
|
float
|
External pressure, in Pa |
required |
expansion_ratio
|
float
|
Expansion ratio, adimensional |
required |
k_ex
|
float
|
Two-phase isentropic coefficient, adimensional |
required |
n_cf
|
float
|
Thrust coefficient correction factor, adimensional |
required |
Returns:
| Type | Description |
|---|---|
float
|
Instanteneous thrust coefficient, adimensional |
Source code in machwave/models/propulsion/motors/solid.py
get_thrust_coefficient_correction_factor(n_kin, n_bl, n_tp)
¶
Calculates the thrust coefficient correction factor including all losses.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n_kin
|
float
|
Kinematic correction factor, adimensional, in percent |
required |
n_bl
|
float
|
Boundary layer correction factor, adimensional, in percent |
required |
n_tp
|
float
|
Two-phase correction factor, adimensional, in percent |
required |
Returns:
| Type | Description |
|---|---|
float
|
Thrust coefficient correction factor, adimensional |