models.thrust_chamber¶
Thrust chamber assembly and sub-components.
Nozzle— Conical nozzle defined by throat diameter, expansion ratio, and convergent/divergent half-angles. Computes throat area and outlet diameter.CombustionChamber— Cylindrical casing with thermal liner. Provides internal volume from casing dimensions and liner thickness.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 |
|---|---|---|
casing_inner_diameter |
float
|
Internal diameter [m]. |
casing_outer_diameter |
float
|
Outer diameter [m]. |
internal_length |
float
|
Distance from combustion chamber inlet to nozzle inlet [m]. |
thermal_liner_thickness |
float
|
Thermal liner thickness [m]. Defaults to 0.0. |
Source code in machwave/models/thrust_chamber/combustion_chamber.py
inner_diameter
property
¶
Inner diameter of the combustion chamber [m].
inner_radius
property
¶
Inner radius of the combustion chamber [m].
internal_volume
property
¶
Internal volume of the combustion chamber [m^3].
outer_diameter
property
¶
Outer diameter of the combustion chamber [m].
outer_radius
property
¶
Outer radius of the combustion chamber [m].
__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 |
|---|---|---|
inlet_diameter |
float
|
Inlet diameter [m]. |
throat_diameter |
float
|
Throat diameter [m]. |
divergent_angle |
float
|
Divergent half-angle [deg]. |
convergent_angle |
float
|
Convergent 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 inlet diameter is larger than the combustion chamber casing inner diameter, or 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. |
Source code in machwave/models/thrust_chamber/base.py
__post_init__()
¶
Validate that the nozzle fits the combustion chamber.
Raises:
| Type | Description |
|---|---|
ValueError
|
If the nozzle inlet diameter is larger than the combustion chamber casing inner diameter. |