models.thrust_chamber¶
Thrust chamber assembly and sub-components.
Nozzle— Conical nozzle defined by throat diameter, expansion ratio, and divergent half-angle. Computes throat area and outlet diameter.CombustionChamber— Cylindrical chamber defined by its inner diameter and internal length. Provides the internal volume. The inner diameter is the chamber bore, measured inside the liner if there is one, or at the casing wall if there is none. Inhibitors belong to the grain and are not subtracted: an inhibitor sleeve's annulus counts as free chamber volume.InjectorElement— The orifices one propellant line flows through, characterized by a discharge coefficient, a flow area, and aMassFlowModel. Owns the orifice mass-flow dispatch:get_mass_flow(*, inlet, chamber_pressure).Injector— OneInjectorElementper propellant line, keyed by the feed system's line names.get_mass_flows(*, inlet_states, chamber_pressure)takes the inlet state of every line and returns the flow of every line. Each element is fed aFluidState— fluid name, pressure, temperature, and density at the injector face — and is a pure function of it. An element stops flowing once the chamber has caught up with its inlet.MassFlowModel— Enum selecting the orifice flow model.SPI(single-phase incompressible) for subcooled liquid propellants;HEM(homogeneous-equilibrium two-phase) for self-pressurized propellants such as nitrous oxide, where flow can choke on the two-phase sound speed.SolidMotorThrustChamber— Bundles nozzle + chamber + the distance from nozzle exit to grain port.BiliquidEngineThrustChamber— Bundles nozzle + chamber + injector.
machwave.models.thrust_chamber
¶
BiliquidEngineThrustChamber
dataclass
¶
Bases: ThrustChamber
Thrust chamber assembly specialized for biliquid rocket engines.
Attributes:
| Name | Type | Description |
|---|---|---|
nozzle |
Nozzle
|
Nozzle instance. |
injector |
Injector
|
Injector instance, with one element per propellant line. |
combustion_chamber |
CombustionChamber
|
Combustion chamber instance. |
dry_mass_properties |
DryMassProperties | None
|
Mass, center of gravity, and inertia of the thrust chamber. Optional, not used by the internal ballistics simulation. |
Source code in machwave/models/thrust_chamber/base.py
CombustionChamber
dataclass
¶
Represents a cylindrical combustion chamber.
Attributes:
| Name | Type | Description |
|---|---|---|
inner_diameter |
float
|
Chamber bore diameter [m], measured inside the liner if there is one, or at the casing wall if there is none. Inhibitor thickness is not subtracted, since inhibitors belong to the grain. |
internal_length |
float
|
Distance from combustion chamber inlet to nozzle inlet [m]. |
Source code in machwave/models/thrust_chamber/combustion_chamber.py
internal_volume
property
¶
Internal volume of the combustion chamber [m^3].
__post_init__()
¶
Validate the combustion chamber geometry.
Raises:
| Type | Description |
|---|---|
ValueError
|
If any field is outside its valid physical range. |
Source code in machwave/models/thrust_chamber/combustion_chamber.py
Injector
dataclass
¶
An injector, with one element per propellant line.
Attributes:
| Name | Type | Description |
|---|---|---|
elements |
dict[str, InjectorElement]
|
Injector element of every line, keyed by the feed system's line names. |
Source code in machwave/models/thrust_chamber/injector.py
get_mass_flows(*, inlet_states, chamber_pressure)
¶
Compute the mass flow rate through every element.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inlet_states
|
Mapping[str, FluidState]
|
Propellant state at the inlet of every line, keyed by line name. |
required |
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, float]
|
Mass flow rate of every line [kg/s], keyed by line name. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If any element of the injector has no inlet state. |
Source code in machwave/models/thrust_chamber/injector.py
InjectorElement
dataclass
¶
The orifices one propellant line flows through at the injector face.
An element is a pure function of its own inlet: everything upstream of the face is the feed system's to account for.
Attributes:
| Name | Type | Description |
|---|---|---|
discharge_coefficient |
float
|
Discharge coefficient (dimensionless). |
area |
float
|
Effective flow area [m^2]. |
mass_flow_model |
MassFlowModel
|
Model the orifice flow is computed with. |
Source code in machwave/models/thrust_chamber/injector.py
get_mass_flow(*, inlet, chamber_pressure)
¶
Compute the mass flow rate through this element.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inlet
|
FluidState
|
Propellant state at the injector inlet. |
required |
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Mass flow rate [kg/s]. Zero once the chamber has caught up with the |
float
|
inlet, which is where the line stops feeding. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the mass flow model is unsupported. |
Source code in machwave/models/thrust_chamber/injector.py
MassFlowModel
¶
Bases: StrEnum
Models for computing mass flow through an injector orifice.
Single-phase incompressible orifice equation. Valid for subcooled liquid
propellants.
HEM: Homogeneous-equilibrium two-phase model. Required for self-pressurized propellants such as nitrous oxide, where flow can choke at the injector due to flash boiling.
Source code in machwave/models/thrust_chamber/injector.py
Nozzle
dataclass
¶
Converging-diverging nozzle geometry.
Attributes:
| Name | Type | Description |
|---|---|---|
throat_diameter |
float
|
Throat diameter [m]. |
divergent_angle |
float
|
Divergent half-angle [deg]. |
expansion_ratio |
float
|
Area ratio of exit to throat. |
discharge_coefficient |
float
|
Throat discharge coefficient. |
separation_pressure_ratio |
float
|
Pressure ratio at which the overexpanded flow separates from the nozzle wall (Summerfield criterion). |
Source code in machwave/models/thrust_chamber/nozzle.py
outlet_diameter
property
¶
Return the nozzle exit diameter [m].
__post_init__()
¶
Validate the nozzle geometry.
Raises:
| Type | Description |
|---|---|
ValueError
|
If any field is outside its valid physical range. |
Source code in machwave/models/thrust_chamber/nozzle.py
SolidMotorThrustChamber
dataclass
¶
Bases: ThrustChamber
Thrust chamber assembly specialized for solid rocket motors.
Attributes:
| Name | Type | Description |
|---|---|---|
nozzle |
Nozzle
|
Nozzle instance. |
combustion_chamber |
CombustionChamber
|
Combustion chamber instance. |
nozzle_exit_to_grain_port_distance |
float
|
Axial distance from the nozzle exit plane to the grain port [m]. Shifts grain mass properties into the motor frame, whose origin is the nozzle exit. |
dry_mass_properties |
DryMassProperties | None
|
Mass, center of gravity, and inertia of the thrust chamber. Optional, not used by the internal ballistics simulation. |
Source code in machwave/models/thrust_chamber/base.py
__post_init__()
¶
Validate the assembly geometry.
Raises:
| Type | Description |
|---|---|
ValueError
|
If the nozzle exit to grain port distance is negative. |
Source code in machwave/models/thrust_chamber/base.py
ThrustChamber
dataclass
¶
Bases: ABC
Base class for a thrust chamber assembly.
Attributes:
| Name | Type | Description |
|---|---|---|
nozzle |
Nozzle
|
Nozzle instance. |
combustion_chamber |
CombustionChamber
|
Combustion chamber instance. |
dry_mass_properties |
DryMassProperties | None
|
Mass, center of gravity, and inertia of the thrust chamber. Optional, not used by the internal ballistics simulation. |