models.motors¶
Top-level motor/engine definitions that assemble all physical sub-components into a complete propulsion unit.
SolidMotor— Combines aGrain,SolidPropellant, andSolidMotorThrustChamber. Provides launch/dry mass, free chamber volume, CoG (mass-weighted across grain and hardware), and thrust coefficient with loss corrections.BiliquidEngine— Combines aBiliquidPropellant,BiliquidEngineThrustChamber, andFeedSystem. Tracks CoG shift as propellant is consumed from the tanks.
Both inherit from the generic Motor[P, T] base class. A motor instance is the primary input to InternalBallisticsSimulation.
machwave.models.motors
¶
BiliquidEngine
¶
Bases: Motor[BiliquidPropellant, BiliquidEngineThrustChamber]
Biliquid rocket engine with a bipropellant feed system.
Source code in machwave/models/motors/biliquid.py
11 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 | |
initial_propellant_mass
property
¶
Return the initial propellant mass [kg].
__init__(propellant, thrust_chamber, feed_system, oxidizer_tank_cog=None, fuel_tank_cog=None, combustion_efficiency=0.95, nozzle_loss_model=None)
¶
Initialize a biliquid rocket engine.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
propellant
|
BiliquidPropellant
|
Biliquid propellant properties (oxidizer + fuel). |
required |
thrust_chamber
|
BiliquidEngineThrustChamber
|
Thrust chamber assembly (nozzle, combustion chamber, injector). |
required |
feed_system
|
FeedSystem
|
Propellant feed system (tanks, lines, pumps or pressurization). |
required |
oxidizer_tank_cog
|
float | None
|
Axial position of the oxidizer propellant center of gravity, measured from the nozzle exit [m]. If None, uses a default estimate. |
None
|
fuel_tank_cog
|
float | None
|
Axial position of the fuel propellant center of gravity, measured from the nozzle exit [m]. If None, uses a default estimate. |
None
|
combustion_efficiency
|
float
|
Ratio of the actual flame temperature to the ideal adiabatic flame temperature (0, 1]. |
0.95
|
nozzle_loss_model
|
NozzleLossModel | None
|
Nozzle loss model. |
None
|
Source code in machwave/models/motors/biliquid.py
get_center_of_gravity(propellant_fraction=0.0)
¶
Return the engine center of gravity.
Combines structural dry mass, oxidizer, and fuel via a mass-weighted average. Origin is at the nozzle exit on the chamber axis with positive x pointing forward (toward bulkhead).
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 as |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in machwave/models/motors/biliquid.py
get_dry_mass()
¶
get_launch_mass()
¶
Motor
¶
Bases: Generic[P, T], ABC
Abstract rocket motor/engine for solid, hybrid, or biliquid systems.
Source code in machwave/models/motors/base.py
initial_propellant_mass
abstractmethod
property
¶
Return the initial propellant mass [kg].
__init__(propellant, thrust_chamber, combustion_efficiency=0.95, nozzle_loss_model=None)
¶
Initialize attributes common to any motor or engine.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
propellant
|
P
|
Propellant used in the motor. |
required |
thrust_chamber
|
T
|
Thrust chamber of the motor. |
required |
combustion_efficiency
|
float
|
Ratio of the actual flame temperature to the ideal adiabatic flame temperature (0, 1]. |
0.95
|
nozzle_loss_model
|
NozzleLossModel | None
|
Nozzle thrust coefficient loss model. Motor subclasses supply an engine-appropriate default. |
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in machwave/models/motors/base.py
get_center_of_gravity(*args, **kwargs)
abstractmethod
¶
Return 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]
|
1D array of shape |
NDArray[float64]
|
the center of gravity [m]. |
Source code in machwave/models/motors/base.py
get_dry_mass()
abstractmethod
¶
SolidMotor
¶
Bases: Motor[SolidPropellant, SolidMotorThrustChamber]
Solid rocket motor with a propellant grain and thrust chamber.
Source code in machwave/models/motors/solid.py
11 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 | |
initial_propellant_mass
property
¶
Return the initial propellant mass [kg].
__init__(grain, propellant, thrust_chamber, combustion_efficiency=0.95, nozzle_loss_model=None)
¶
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 |
combustion_efficiency
|
float
|
Ratio of the actual flame temperature to the ideal adiabatic flame temperature (0, 1]. |
0.95
|
nozzle_loss_model
|
NozzleLossModel | None
|
Nozzle loss model. |
None
|
Source code in machwave/models/motors/solid.py
get_center_of_gravity(web_distance=0.0)
¶
Return the solid motor center of gravity.
Combines the propellant grain (wet mass) and the thrust chamber dry mass via a mass-weighted average. Dry mass center of gravity is 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 as |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the thrust chamber dry mass center of gravity is not defined or if the total mass is not strictly positive. |
Source code in machwave/models/motors/solid.py
get_dry_mass()
¶
get_free_chamber_volume(propellant_volume)
¶
Return the chamber volume without any propellant.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
propellant_volume
|
float
|
Propellant volume [m^3]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Free chamber volume [m^3]. |