Skip to content

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.
  • BipropellantInjector — Injector for biliquid engines, characterized by discharge coefficients, orifice areas, and a per-side MassFlowModel for the oxidizer and fuel sides. Owns the orifice mass-flow dispatch: get_mass_flow_ox(*, tank, pressure_upstream, chamber_pressure, fluid_mass) and get_mass_flow_fuel(*, tank, pressure_upstream, chamber_pressure, fluid_mass). Feed systems delegate to these methods.
  • 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

Bases: ThrustChamber

Thrust chamber assembly specialized for biliquid rocket engines.

Source code in machwave/models/thrust_chamber/base.py
class BiliquidEngineThrustChamber(ThrustChamber):
    """Thrust chamber assembly specialized for biliquid rocket engines."""

    def __init__(
        self,
        nozzle: nozzle_models.Nozzle,
        injector: injector_models.BipropellantInjector,
        combustion_chamber: combustion_chamber_models.CombustionChamber,
        dry_mass: float,
        center_of_gravity_coordinate: tuple[float, float, float] | None = None,
    ):
        """
        Initialize a biliquid engine thrust chamber.

        Args:
            nozzle: Nozzle instance.
            injector: Bipropellant injector instance.
            combustion_chamber: Combustion chamber instance.
            dry_mass: Dry mass of the thrust chamber assembly [kg].
            center_of_gravity_coordinate: Dry-mass center of gravity position
                `(x, y, z)` [m], measured from the nozzle exit. Positive x
                points toward the bulkhead. If None, estimated from chamber
                geometry.
        """
        super().__init__(
            nozzle, combustion_chamber, dry_mass, center_of_gravity_coordinate
        )
        self.injector = injector

__init__(nozzle, injector, combustion_chamber, dry_mass, center_of_gravity_coordinate=None)

Initialize a biliquid engine thrust chamber.

Parameters:

Name Type Description Default
nozzle Nozzle

Nozzle instance.

required
injector BipropellantInjector

Bipropellant injector instance.

required
combustion_chamber CombustionChamber

Combustion chamber instance.

required
dry_mass float

Dry mass of the thrust chamber assembly [kg].

required
center_of_gravity_coordinate tuple[float, float, float] | None

Dry-mass center of gravity position (x, y, z) [m], measured from the nozzle exit. Positive x points toward the bulkhead. If None, estimated from chamber geometry.

None
Source code in machwave/models/thrust_chamber/base.py
def __init__(
    self,
    nozzle: nozzle_models.Nozzle,
    injector: injector_models.BipropellantInjector,
    combustion_chamber: combustion_chamber_models.CombustionChamber,
    dry_mass: float,
    center_of_gravity_coordinate: tuple[float, float, float] | None = None,
):
    """
    Initialize a biliquid engine thrust chamber.

    Args:
        nozzle: Nozzle instance.
        injector: Bipropellant injector instance.
        combustion_chamber: Combustion chamber instance.
        dry_mass: Dry mass of the thrust chamber assembly [kg].
        center_of_gravity_coordinate: Dry-mass center of gravity position
            `(x, y, z)` [m], measured from the nozzle exit. Positive x
            points toward the bulkhead. If None, estimated from chamber
            geometry.
    """
    super().__init__(
        nozzle, combustion_chamber, dry_mass, center_of_gravity_coordinate
    )
    self.injector = injector

BipropellantInjector

A simple injector class for a biliquid rocket engine.

Source code in machwave/models/thrust_chamber/injector.py
class BipropellantInjector:
    """A simple injector class for a biliquid rocket engine."""

    def __init__(
        self,
        discharge_coefficient_fuel: float,
        discharge_coefficient_oxidizer: float,
        area_fuel: float,
        area_ox: float,
        mass_flow_model_fuel: MassFlowModel = MassFlowModel.SPI,
        mass_flow_model_oxidizer: MassFlowModel = MassFlowModel.SPI,
    ):
        """
        Initialize an Injector instance.

        Args:
            discharge_coefficient_fuel:
                Discharge coefficient for the fuel side (dimensionless).
            discharge_coefficient_oxidizer:
                Discharge coefficient for the oxidizer side (dimensionless).
            area_fuel:
                Effective flow area of the fuel injector [m^2].
            area_ox:
                Effective flow area of the oxidizer injector [m^2].
            mass_flow_model_fuel:
                Mass flow model for the fuel side.
            mass_flow_model_oxidizer:
                Mass flow model for the oxidizer side.
        """
        self.discharge_coefficient_fuel = discharge_coefficient_fuel
        self.discharge_coefficient_oxidizer = discharge_coefficient_oxidizer
        self.area_fuel = area_fuel
        self.area_ox = area_ox
        self.mass_flow_model_fuel = MassFlowModel(mass_flow_model_fuel)
        self.mass_flow_model_oxidizer = MassFlowModel(mass_flow_model_oxidizer)

    def get_mass_flow_fuel(
        self,
        *,
        tank: tank_models.Tank,
        pressure_upstream: float,
        chamber_pressure: float,
        fluid_mass: float,
    ) -> float:
        """
        Compute the fuel-side mass flow rate through this injector.

        Args:
            tank: Tank supplying the fuel.
            pressure_upstream: Upstream stagnation pressure [Pa].
            chamber_pressure: Chamber pressure [Pa].
            fluid_mass: Current fuel mass in the tank [kg].

        Returns:
            Fuel mass flow rate [kg/s].
        """
        return self._get_mass_flow(
            tank=tank,
            pressure_upstream=pressure_upstream,
            chamber_pressure=chamber_pressure,
            discharge_coefficient=self.discharge_coefficient_fuel,
            injector_area=self.area_fuel,
            mass_flow_model=self.mass_flow_model_fuel,
            fluid_mass=fluid_mass,
        )

    def get_mass_flow_ox(
        self,
        *,
        tank: tank_models.Tank,
        pressure_upstream: float,
        chamber_pressure: float,
        fluid_mass: float,
    ) -> float:
        """
        Compute the oxidizer-side mass flow rate through this injector.

        Args:
            tank: Tank supplying the oxidizer.
            pressure_upstream: Upstream stagnation pressure [Pa].
            chamber_pressure: Chamber pressure [Pa].
            fluid_mass: Current oxidizer mass in the tank [kg].

        Returns:
            Oxidizer mass flow rate [kg/s].
        """
        return self._get_mass_flow(
            tank=tank,
            pressure_upstream=pressure_upstream,
            chamber_pressure=chamber_pressure,
            discharge_coefficient=self.discharge_coefficient_oxidizer,
            injector_area=self.area_ox,
            mass_flow_model=self.mass_flow_model_oxidizer,
            fluid_mass=fluid_mass,
        )

    @staticmethod
    def _get_mass_flow(
        *,
        tank: tank_models.Tank,
        pressure_upstream: float,
        chamber_pressure: float,
        discharge_coefficient: float,
        injector_area: float,
        mass_flow_model: MassFlowModel,
        fluid_mass: float,
    ) -> float:
        """
        Dispatch a mass flow calculation through the requested model.

        Args:
            tank: Tank supplying the propellant.
            pressure_upstream: Upstream stagnation pressure [Pa].
            chamber_pressure: Chamber pressure [Pa].
            discharge_coefficient: Discharge coefficient (dimensionless).
            injector_area: Effective flow area [m^2].
            mass_flow_model: Mass flow model for this side.
            fluid_mass: Current mass of fluid in the tank [kg].

        Returns:
            Mass flow rate [kg/s].
        """
        if mass_flow_model == MassFlowModel.HEM:
            mass_flux = two_phase_flow.get_homogeneous_equilibrium_mass_flux(
                fluid_name=tank.fluid_name,
                temperature_upstream=tank.temperature,
                pressure_downstream=chamber_pressure,
                pressure_upstream=pressure_upstream,
            )
            return discharge_coefficient * injector_area * mass_flux
        elif mass_flow_model == MassFlowModel.SPI:
            return incompressible_flow.get_mass_flow_orifice(
                discharge_coefficient=discharge_coefficient,
                area=injector_area,
                density=tank.get_density(fluid_mass),
                pressure_upstream=pressure_upstream,
                pressure_downstream=chamber_pressure,
            )

        raise ValueError(f"Unsupported mass flow model: {mass_flow_model}")

__init__(discharge_coefficient_fuel, discharge_coefficient_oxidizer, area_fuel, area_ox, mass_flow_model_fuel=MassFlowModel.SPI, mass_flow_model_oxidizer=MassFlowModel.SPI)

Initialize an Injector instance.

Parameters:

Name Type Description Default
discharge_coefficient_fuel float

Discharge coefficient for the fuel side (dimensionless).

required
discharge_coefficient_oxidizer float

Discharge coefficient for the oxidizer side (dimensionless).

required
area_fuel float

Effective flow area of the fuel injector [m^2].

required
area_ox float

Effective flow area of the oxidizer injector [m^2].

required
mass_flow_model_fuel MassFlowModel

Mass flow model for the fuel side.

SPI
mass_flow_model_oxidizer MassFlowModel

Mass flow model for the oxidizer side.

SPI
Source code in machwave/models/thrust_chamber/injector.py
def __init__(
    self,
    discharge_coefficient_fuel: float,
    discharge_coefficient_oxidizer: float,
    area_fuel: float,
    area_ox: float,
    mass_flow_model_fuel: MassFlowModel = MassFlowModel.SPI,
    mass_flow_model_oxidizer: MassFlowModel = MassFlowModel.SPI,
):
    """
    Initialize an Injector instance.

    Args:
        discharge_coefficient_fuel:
            Discharge coefficient for the fuel side (dimensionless).
        discharge_coefficient_oxidizer:
            Discharge coefficient for the oxidizer side (dimensionless).
        area_fuel:
            Effective flow area of the fuel injector [m^2].
        area_ox:
            Effective flow area of the oxidizer injector [m^2].
        mass_flow_model_fuel:
            Mass flow model for the fuel side.
        mass_flow_model_oxidizer:
            Mass flow model for the oxidizer side.
    """
    self.discharge_coefficient_fuel = discharge_coefficient_fuel
    self.discharge_coefficient_oxidizer = discharge_coefficient_oxidizer
    self.area_fuel = area_fuel
    self.area_ox = area_ox
    self.mass_flow_model_fuel = MassFlowModel(mass_flow_model_fuel)
    self.mass_flow_model_oxidizer = MassFlowModel(mass_flow_model_oxidizer)

get_mass_flow_fuel(*, tank, pressure_upstream, chamber_pressure, fluid_mass)

Compute the fuel-side mass flow rate through this injector.

Parameters:

Name Type Description Default
tank Tank

Tank supplying the fuel.

required
pressure_upstream float

Upstream stagnation pressure [Pa].

required
chamber_pressure float

Chamber pressure [Pa].

required
fluid_mass float

Current fuel mass in the tank [kg].

required

Returns:

Type Description
float

Fuel mass flow rate [kg/s].

Source code in machwave/models/thrust_chamber/injector.py
def get_mass_flow_fuel(
    self,
    *,
    tank: tank_models.Tank,
    pressure_upstream: float,
    chamber_pressure: float,
    fluid_mass: float,
) -> float:
    """
    Compute the fuel-side mass flow rate through this injector.

    Args:
        tank: Tank supplying the fuel.
        pressure_upstream: Upstream stagnation pressure [Pa].
        chamber_pressure: Chamber pressure [Pa].
        fluid_mass: Current fuel mass in the tank [kg].

    Returns:
        Fuel mass flow rate [kg/s].
    """
    return self._get_mass_flow(
        tank=tank,
        pressure_upstream=pressure_upstream,
        chamber_pressure=chamber_pressure,
        discharge_coefficient=self.discharge_coefficient_fuel,
        injector_area=self.area_fuel,
        mass_flow_model=self.mass_flow_model_fuel,
        fluid_mass=fluid_mass,
    )

get_mass_flow_ox(*, tank, pressure_upstream, chamber_pressure, fluid_mass)

Compute the oxidizer-side mass flow rate through this injector.

Parameters:

Name Type Description Default
tank Tank

Tank supplying the oxidizer.

required
pressure_upstream float

Upstream stagnation pressure [Pa].

required
chamber_pressure float

Chamber pressure [Pa].

required
fluid_mass float

Current oxidizer mass in the tank [kg].

required

Returns:

Type Description
float

Oxidizer mass flow rate [kg/s].

Source code in machwave/models/thrust_chamber/injector.py
def get_mass_flow_ox(
    self,
    *,
    tank: tank_models.Tank,
    pressure_upstream: float,
    chamber_pressure: float,
    fluid_mass: float,
) -> float:
    """
    Compute the oxidizer-side mass flow rate through this injector.

    Args:
        tank: Tank supplying the oxidizer.
        pressure_upstream: Upstream stagnation pressure [Pa].
        chamber_pressure: Chamber pressure [Pa].
        fluid_mass: Current oxidizer mass in the tank [kg].

    Returns:
        Oxidizer mass flow rate [kg/s].
    """
    return self._get_mass_flow(
        tank=tank,
        pressure_upstream=pressure_upstream,
        chamber_pressure=chamber_pressure,
        discharge_coefficient=self.discharge_coefficient_oxidizer,
        injector_area=self.area_ox,
        mass_flow_model=self.mass_flow_model_oxidizer,
        fluid_mass=fluid_mass,
    )

CombustionChamber

Geometry model of a cylindrical combustion-chamber.

Source code in machwave/models/thrust_chamber/combustion_chamber.py
class CombustionChamber:
    """Geometry model of a cylindrical combustion-chamber."""

    def __init__(
        self,
        casing_inner_diameter: float,
        casing_outer_diameter: float,
        internal_length: float,
        thermal_liner_thickness: float = 0.0,
    ) -> None:
        """
        Create a new CombustionChamber instance.

        Args:
            casing_inner_diameter: Internal diameter [m].
            casing_outer_diameter: Outer diameter [m].
            internal_length: Distance from combustion chamber inlet to
                nozzle inlet [m].
            thermal_liner_thickness: Thermal liner thickness [m].
                Defaults to 0.0.
        """
        self.casing_inner_diameter = casing_inner_diameter
        self.casing_outer_diameter = casing_outer_diameter
        self.internal_length = internal_length
        self.thermal_liner_thickness = thermal_liner_thickness

    @property
    def inner_diameter(self) -> float:
        """Inner diameter of the combustion chamber [m]."""
        return self.casing_inner_diameter - 2 * self.thermal_liner_thickness

    @property
    def outer_diameter(self) -> float:
        """Outer diameter of the combustion chamber [m]."""
        return self.casing_outer_diameter

    @property
    def inner_radius(self) -> float:
        """Inner radius of the combustion chamber [m]."""
        return 0.5 * self.inner_diameter

    @property
    def outer_radius(self) -> float:
        """Outer radius of the combustion chamber [m]."""
        return 0.5 * self.outer_diameter

    @property
    def internal_volume(self) -> float:
        """Internal volume of the combustion chamber [m^3]."""
        r = self.inner_radius
        return np.pi * r * r * self.internal_length

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].

__init__(casing_inner_diameter, casing_outer_diameter, internal_length, thermal_liner_thickness=0.0)

Create a new CombustionChamber instance.

Parameters:

Name Type Description Default
casing_inner_diameter float

Internal diameter [m].

required
casing_outer_diameter float

Outer diameter [m].

required
internal_length float

Distance from combustion chamber inlet to nozzle inlet [m].

required
thermal_liner_thickness float

Thermal liner thickness [m]. Defaults to 0.0.

0.0
Source code in machwave/models/thrust_chamber/combustion_chamber.py
def __init__(
    self,
    casing_inner_diameter: float,
    casing_outer_diameter: float,
    internal_length: float,
    thermal_liner_thickness: float = 0.0,
) -> None:
    """
    Create a new CombustionChamber instance.

    Args:
        casing_inner_diameter: Internal diameter [m].
        casing_outer_diameter: Outer diameter [m].
        internal_length: Distance from combustion chamber inlet to
            nozzle inlet [m].
        thermal_liner_thickness: Thermal liner thickness [m].
            Defaults to 0.0.
    """
    self.casing_inner_diameter = casing_inner_diameter
    self.casing_outer_diameter = casing_outer_diameter
    self.internal_length = internal_length
    self.thermal_liner_thickness = thermal_liner_thickness

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
class MassFlowModel(enum.StrEnum):
    """
    Models for computing mass flow through an injector orifice.

    SPI: 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.
    """

    SPI = "spi"
    HEM = "hem"

Nozzle

Converging-diverging nozzle geometry.

Source code in machwave/models/thrust_chamber/nozzle.py
class Nozzle:
    """Converging-diverging nozzle geometry."""

    def __init__(
        self,
        inlet_diameter: float,
        throat_diameter: float,
        divergent_angle: float,
        convergent_angle: float,
        expansion_ratio: float,
        discharge_coefficient: float = 1.0,
        separation_pressure_ratio: float = DEFAULT_SEPARATION_PRESSURE_RATIO,
    ) -> None:
        """
        Initialize a nozzle.

        Args:
            inlet_diameter: Inlet diameter [m].
            throat_diameter: Throat diameter [m].
            divergent_angle: Divergent half-angle [deg].
            convergent_angle: Convergent half-angle [deg].
            expansion_ratio: Area ratio of exit to throat.
            discharge_coefficient: Throat discharge coefficient.
            separation_pressure_ratio: Pressure ratio at which the overexpanded flow
                separates from the nozzle wall (Summerfield criterion).
        """
        self.inlet_diameter = inlet_diameter
        self.throat_diameter = throat_diameter
        self.divergent_angle = divergent_angle
        self.convergent_angle = convergent_angle
        self.expansion_ratio = expansion_ratio
        self.discharge_coefficient = discharge_coefficient
        self.separation_pressure_ratio = separation_pressure_ratio

    @property
    def outlet_diameter(self) -> float:
        """Return the nozzle exit diameter [m]."""
        return self.throat_diameter * np.sqrt(self.expansion_ratio)

    def get_throat_area(self) -> float:
        """Return the nozzle throat area [m^2]."""
        return geometric.get_circle_area(self.throat_diameter)

outlet_diameter property

Return the nozzle exit diameter [m].

__init__(inlet_diameter, throat_diameter, divergent_angle, convergent_angle, expansion_ratio, discharge_coefficient=1.0, separation_pressure_ratio=DEFAULT_SEPARATION_PRESSURE_RATIO)

Initialize a nozzle.

Parameters:

Name Type Description Default
inlet_diameter float

Inlet diameter [m].

required
throat_diameter float

Throat diameter [m].

required
divergent_angle float

Divergent half-angle [deg].

required
convergent_angle float

Convergent half-angle [deg].

required
expansion_ratio float

Area ratio of exit to throat.

required
discharge_coefficient float

Throat discharge coefficient.

1.0
separation_pressure_ratio float

Pressure ratio at which the overexpanded flow separates from the nozzle wall (Summerfield criterion).

DEFAULT_SEPARATION_PRESSURE_RATIO
Source code in machwave/models/thrust_chamber/nozzle.py
def __init__(
    self,
    inlet_diameter: float,
    throat_diameter: float,
    divergent_angle: float,
    convergent_angle: float,
    expansion_ratio: float,
    discharge_coefficient: float = 1.0,
    separation_pressure_ratio: float = DEFAULT_SEPARATION_PRESSURE_RATIO,
) -> None:
    """
    Initialize a nozzle.

    Args:
        inlet_diameter: Inlet diameter [m].
        throat_diameter: Throat diameter [m].
        divergent_angle: Divergent half-angle [deg].
        convergent_angle: Convergent half-angle [deg].
        expansion_ratio: Area ratio of exit to throat.
        discharge_coefficient: Throat discharge coefficient.
        separation_pressure_ratio: Pressure ratio at which the overexpanded flow
            separates from the nozzle wall (Summerfield criterion).
    """
    self.inlet_diameter = inlet_diameter
    self.throat_diameter = throat_diameter
    self.divergent_angle = divergent_angle
    self.convergent_angle = convergent_angle
    self.expansion_ratio = expansion_ratio
    self.discharge_coefficient = discharge_coefficient
    self.separation_pressure_ratio = separation_pressure_ratio

get_throat_area()

Return the nozzle throat area [m^2].

Source code in machwave/models/thrust_chamber/nozzle.py
def get_throat_area(self) -> float:
    """Return the nozzle throat area [m^2]."""
    return geometric.get_circle_area(self.throat_diameter)

SolidMotorThrustChamber

Bases: ThrustChamber

Thrust chamber assembly specialized for solid rocket motors.

Source code in machwave/models/thrust_chamber/base.py
class SolidMotorThrustChamber(ThrustChamber):
    """Thrust chamber assembly specialized for solid rocket motors."""

    def __init__(
        self,
        nozzle: nozzle_models.Nozzle,
        combustion_chamber: combustion_chamber_models.CombustionChamber,
        dry_mass: float,
        nozzle_exit_to_grain_port_distance: float,
        center_of_gravity_coordinate: tuple[float, float, float] | None = None,
    ):
        """
        Initialize a solid motor thrust chamber.

        Args:
            nozzle: Nozzle instance.
            combustion_chamber: Combustion chamber instance.
            dry_mass: Dry mass of the thrust chamber assembly [kg].
            nozzle_exit_to_grain_port_distance: Axial distance from the nozzle
                exit plane to the grain port [m].
            center_of_gravity_coordinate: Dry-mass center of gravity position
                `(x, y, z)` [m], measured from the nozzle exit. Positive x
                points toward the bulkhead. If None, estimated from chamber
                geometry.
        """
        super().__init__(
            nozzle, combustion_chamber, dry_mass, center_of_gravity_coordinate
        )
        self.nozzle_exit_to_grain_port_distance = nozzle_exit_to_grain_port_distance

__init__(nozzle, combustion_chamber, dry_mass, nozzle_exit_to_grain_port_distance, center_of_gravity_coordinate=None)

Initialize a solid motor thrust chamber.

Parameters:

Name Type Description Default
nozzle Nozzle

Nozzle instance.

required
combustion_chamber CombustionChamber

Combustion chamber instance.

required
dry_mass float

Dry mass of the thrust chamber assembly [kg].

required
nozzle_exit_to_grain_port_distance float

Axial distance from the nozzle exit plane to the grain port [m].

required
center_of_gravity_coordinate tuple[float, float, float] | None

Dry-mass center of gravity position (x, y, z) [m], measured from the nozzle exit. Positive x points toward the bulkhead. If None, estimated from chamber geometry.

None
Source code in machwave/models/thrust_chamber/base.py
def __init__(
    self,
    nozzle: nozzle_models.Nozzle,
    combustion_chamber: combustion_chamber_models.CombustionChamber,
    dry_mass: float,
    nozzle_exit_to_grain_port_distance: float,
    center_of_gravity_coordinate: tuple[float, float, float] | None = None,
):
    """
    Initialize a solid motor thrust chamber.

    Args:
        nozzle: Nozzle instance.
        combustion_chamber: Combustion chamber instance.
        dry_mass: Dry mass of the thrust chamber assembly [kg].
        nozzle_exit_to_grain_port_distance: Axial distance from the nozzle
            exit plane to the grain port [m].
        center_of_gravity_coordinate: Dry-mass center of gravity position
            `(x, y, z)` [m], measured from the nozzle exit. Positive x
            points toward the bulkhead. If None, estimated from chamber
            geometry.
    """
    super().__init__(
        nozzle, combustion_chamber, dry_mass, center_of_gravity_coordinate
    )
    self.nozzle_exit_to_grain_port_distance = nozzle_exit_to_grain_port_distance

ThrustChamber

Bases: ABC

Thrust chamber assembly that ties nozzle, chamber, and injectors together.

Source code in machwave/models/thrust_chamber/base.py
class ThrustChamber(abc.ABC):
    """Thrust chamber assembly that ties nozzle, chamber, and injectors together."""

    def __init__(
        self,
        nozzle: nozzle_models.Nozzle,
        combustion_chamber: combustion_chamber_models.CombustionChamber,
        dry_mass: float,
        center_of_gravity_coordinate: tuple[float, float, float] | None = None,
    ):
        """
        Initialize a thrust chamber.

        Args:
            nozzle: Nozzle instance.
            combustion_chamber: Combustion chamber instance.
            dry_mass: Dry mass of the thrust chamber assembly [kg].
            center_of_gravity_coordinate: Dry-mass center of gravity position
                `(x, y, z)` [m], measured from the nozzle exit. Positive x
                points toward the bulkhead. If None, estimated from chamber
                geometry.
        """
        self.nozzle = nozzle
        self.combustion_chamber = combustion_chamber
        self.dry_mass = dry_mass
        self.center_of_gravity_coordinate = (
            np.array(center_of_gravity_coordinate, dtype=np.float64)
            if center_of_gravity_coordinate is not None
            else None
        )

__init__(nozzle, combustion_chamber, dry_mass, center_of_gravity_coordinate=None)

Initialize a thrust chamber.

Parameters:

Name Type Description Default
nozzle Nozzle

Nozzle instance.

required
combustion_chamber CombustionChamber

Combustion chamber instance.

required
dry_mass float

Dry mass of the thrust chamber assembly [kg].

required
center_of_gravity_coordinate tuple[float, float, float] | None

Dry-mass center of gravity position (x, y, z) [m], measured from the nozzle exit. Positive x points toward the bulkhead. If None, estimated from chamber geometry.

None
Source code in machwave/models/thrust_chamber/base.py
def __init__(
    self,
    nozzle: nozzle_models.Nozzle,
    combustion_chamber: combustion_chamber_models.CombustionChamber,
    dry_mass: float,
    center_of_gravity_coordinate: tuple[float, float, float] | None = None,
):
    """
    Initialize a thrust chamber.

    Args:
        nozzle: Nozzle instance.
        combustion_chamber: Combustion chamber instance.
        dry_mass: Dry mass of the thrust chamber assembly [kg].
        center_of_gravity_coordinate: Dry-mass center of gravity position
            `(x, y, z)` [m], measured from the nozzle exit. Positive x
            points toward the bulkhead. If None, estimated from chamber
            geometry.
    """
    self.nozzle = nozzle
    self.combustion_chamber = combustion_chamber
    self.dry_mass = dry_mass
    self.center_of_gravity_coordinate = (
        np.array(center_of_gravity_coordinate, dtype=np.float64)
        if center_of_gravity_coordinate is not None
        else None
    )