models.feed_systems¶
Feed-system models for biliquid rocket engines. The package describes how propellant is delivered from the tanks to the combustion chamber, and is organised around three concerns:
| Concern | Where it lives | What it contains |
|---|---|---|
| Contract | feed_systems.base |
The abstract FeedSystem interface every cycle must satisfy. |
| Cycle implementations | feed_systems.cycles |
One module per cycle topology (pressure-fed today; electric-pump, gas-generator, expander, staged-combustion to follow). |
| Shared component descriptions | feed_systems.components |
Static descriptions of pumps, turbines, gas generators, regenerative jackets, plus a tabulated-curve helper that cycle implementations consume. |
| Tank thermodynamics | feed_systems.tank |
Two-phase tank model backed by CoolProp. |
The FeedSystem contract¶
Every cycle implementation extends FeedSystem and exposes four methods used by the simulation loop:
get_mass_flow_ox(chamber_pressure, *, injector, oxidizer_mass) -> floatget_mass_flow_fuel(chamber_pressure, *, injector, fuel_mass, oxidizer_mass) -> floatget_oxidizer_tank_pressure(*, oxidizer_mass) -> floatget_fuel_tank_pressure(*, oxidizer_mass, fuel_mass) -> float
The mass-flow methods take a BipropellantInjector and delegate the orifice dispatch to it. The feed system is responsible for computing the upstream pressure (tank state, piston losses, pump discharge); the injector owns the orifice physics (discharge coefficient, area, and the per-side MassFlowModel that selects between single-phase incompressible and homogeneous-equilibrium two-phase flow). This split lets pump-fed cycles substitute a different upstream-pressure source without touching orifice physics.
The concrete propellant mass-flow consumer is machwave.simulation.biliquid.states.BiliquidEngineState.run_timestep, which calls these methods once per integration step with the current chamber_pressure and the BipropellantInjector from the thrust chamber.
Public surface¶
Importing from machwave.models.feed_systems exposes the abstract base, every concrete cycle, and the components sub-package:
from machwave.models.feed_systems import (
FeedSystem,
StackedTankPressureFedFeedSystem,
components,
)
pump_spec = components.PumpSpec(
name="oxidizer pump",
isentropic_efficiency=0.7,
pressure_rise=5.0e6,
volumetric_flow_design=2.0e-3,
shaft_speed_design=3000.0,
)
The top-level machwave package additionally re-exports feed_systems as a shortcut, so from machwave import feed_systems and feed_systems.StackedTankPressureFedFeedSystem work identically.
machwave.models.feed_systems
¶
FeedSystem
¶
Bases: ABC
Abstract base class for a bipropellant feed system in a biliquid rocket engine.
Source code in machwave/models/feed_systems/base.py
__init__(fuel_tank, oxidizer_tank)
¶
Initialize the FeedSystem with associated tank objects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fuel_tank
|
Tank
|
Instance representing the fuel tank. |
required |
oxidizer_tank
|
Tank
|
Instance representing the oxidizer tank. |
required |
Source code in machwave/models/feed_systems/base.py
get_fuel_tank_pressure(*, oxidizer_mass, fuel_mass)
abstractmethod
¶
Compute and return the current fuel-side upstream pressure [Pa].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
oxidizer_mass
|
float
|
Current oxidizer mass in the tank [kg]. |
required |
fuel_mass
|
float
|
Current fuel mass in the tank [kg]. |
required |
Source code in machwave/models/feed_systems/base.py
get_initial_propellant_mass()
¶
Compute and return the initial propellant mass in the system [kg].
get_mass_flow_fuel(chamber_pressure, *, injector, fuel_mass, oxidizer_mass)
abstractmethod
¶
Compute and return the current fuel mass flow rate [kg/s].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
injector
|
BipropellantInjector
|
Bipropellant injector handling the orifice dispatch. |
required |
fuel_mass
|
float
|
Current fuel mass in the tank [kg]. |
required |
oxidizer_mass
|
float
|
Current oxidizer mass in the tank [kg]. Needed because some feed systems pressurize the fuel from the oxidizer side. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Fuel mass flow rate [kg/s]. |
Source code in machwave/models/feed_systems/base.py
get_mass_flow_ox(chamber_pressure, *, injector, oxidizer_mass)
abstractmethod
¶
Compute and return the current oxidizer mass flow rate [kg/s].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
injector
|
BipropellantInjector
|
Bipropellant injector handling the orifice dispatch. |
required |
oxidizer_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/feed_systems/base.py
get_oxidizer_tank_pressure(*, oxidizer_mass)
abstractmethod
¶
Compute and return the current oxidizer tank pressure [Pa].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
oxidizer_mass
|
float
|
Current oxidizer mass in the tank [kg]. |
required |
StackedTankPressureFedFeedSystem
¶
Bases: FeedSystem
Represents a bipropellant biliquid rocket engine feed system with stacked tanks.
A stacked tank system is a type of pressure-fed system where the oxidizer and fuel tanks are arranged in a vertical stack. The tanks are separated by a piston and the fuel is pressurized by the oxidizer tank.
Source code in machwave/models/feed_systems/cycles/stacked_tank_pressure_fed.py
6 7 8 9 10 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 | |
__init__(oxidizer_line_diameter, oxidizer_line_length, fuel_line_diameter, fuel_line_length, fuel_tank, oxidizer_tank, piston_loss=0.0)
¶
Initialize the StackedTankPressureFedFeedSystem.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
oxidizer_line_diameter
|
float
|
Diameter of the oxidizer feedline [m]. |
required |
oxidizer_line_length
|
float
|
Length of the oxidizer feedline [m]. |
required |
fuel_line_diameter
|
float
|
Diameter of the fuel feedline [m]. |
required |
fuel_line_length
|
float
|
Length of the fuel feedline [m]. |
required |
fuel_tank
|
Tank
|
An instance representing the fuel tank. |
required |
oxidizer_tank
|
Tank
|
An instance representing the oxidizer tank. |
required |
piston_loss
|
float
|
Pressure loss across the piston [Pa]. Default is 0.0. |
0.0
|
Source code in machwave/models/feed_systems/cycles/stacked_tank_pressure_fed.py
get_fuel_tank_pressure(*, oxidizer_mass, fuel_mass)
¶
Returns the fuel-side upstream pressure [Pa].
In a stacked-tank system the fuel is pressurized by the oxidizer
through the piston, so the fuel-side pressure is the oxidizer tank
pressure minus the piston pressure loss; fuel_mass is unused here.
Source code in machwave/models/feed_systems/cycles/stacked_tank_pressure_fed.py
get_mass_flow_fuel(chamber_pressure, *, injector, fuel_mass, oxidizer_mass)
¶
Compute the current fuel mass flow rate by delegating to the injector.
The upstream pressure is the oxidizer tank pressure minus the piston loss, since this models a stacked tank pressurized through the piston.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
injector
|
BipropellantInjector
|
Bipropellant injector handling the orifice dispatch. |
required |
fuel_mass
|
float
|
Current fuel mass in the tank [kg]. |
required |
oxidizer_mass
|
float
|
Current oxidizer mass in the tank [kg]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Fuel mass flow rate [kg/s]. |
Source code in machwave/models/feed_systems/cycles/stacked_tank_pressure_fed.py
get_mass_flow_ox(chamber_pressure, *, injector, oxidizer_mass)
¶
Compute the current oxidizer mass flow rate by delegating to the injector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
injector
|
BipropellantInjector
|
Bipropellant injector handling the orifice dispatch. |
required |
oxidizer_mass
|
float
|
Current oxidizer mass in the tank [kg]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Oxidizer mass flow rate [kg/s]. |