Skip to content

Explain how feed systems are modeled, and rename the theory section to explanations - #505

Merged
felipebogaertsm merged 10 commits into
495-state-results-plots-per-linefrom
504-feed-system-explanation-docs
Aug 23, 2026
Merged

Explain how feed systems are modeled, and rename the theory section to explanations#505
felipebogaertsm merged 10 commits into
495-state-results-plots-per-linefrom
504-feed-system-explanation-docs

Conversation

@felipebogaertsm

Copy link
Copy Markdown
Owner

Closes #504. Stacked on #502.

The docs covered feed systems only as API reference; nothing explained how a propellant line, a cycle and the injector face fit together, or why the inlet states are solved in one call.

  • New explanation page docs/explanations/feed_systems.md: the propellant line and its role, the injector face as the seam, why every line is solved in one call, the pressure chain for both pressure-fed cycles, the SPI and HEM orifice models, the mixture ratio by role, and the tank energy balance.
  • docs/theory/ becomes docs/explanations/, docs/assets/theory/ becomes docs/assets/explanations/, and the nav section "Rocket Theory" becomes "Explanations".

mkdocs build --strict is clean, so every cross-reference resolves.

A feed system that identifies its propellants by the attribute names
fuel_tank and oxidizer_tank leaves no room for a third propellant, a
single propellant, or an oxidizer-only hybrid feed.

Add a PropellantLine holding the line name, its role and its Tank, plus
a LineState holding the fluid mass and internal energy the integrator
carries for that line. The role is a ComponentRole, whose ADDITIVE
member covers a triliquid diluent or a coolant line. Nothing consumes
these yet.
… one call

The feed system took a fuel tank and an oxidizer tank and exposed one
pressure hook per side, each taking every other side's fluid mass and
internal energy. That signature grows with the square of the propellant
count, and a third line was not expressible at all.

The system now holds a mapping of PropellantLine keyed by name, and
get_fuel_tank_pressure, get_oxidizer_tank_pressure, get_fuel_inlet_state
and get_oxidizer_inlet_state give way to get_inlet_pressures and
get_inlet_states, which take the state of every line and return the
result for every line. A cycle couples its lines physically, as the
stacked-tank piston ties the fuel pressure to the oxidizer ullage
pressure, so solving them together matches the physics and drops the
cross-argument passing.

StackedTankPressureFedFeedSystem stacks any number of lines below the
pressurizing one, and from_oxidizer_and_fuel keeps the two-line call
sites readable.
BipropellantInjector duplicated its discharge coefficient, flow area,
mass flow model and mass flow method once per side, so a third
propellant line meant a third copy, and a single-line monoliquid or
hybrid injector could not be expressed.

Now that the injector is fed an inlet fluid state, an element is a pure
function of its own inlet. InjectorElement holds a discharge
coefficient, a flow area and a mass flow model, and Injector holds one
element per line name with a get_mass_flows that takes the inlet state
of every line and the chamber pressure. An element returns no flow once
the chamber has caught up with its inlet, which is where the guard the
simulation loop carried now lives.
BiliquidEngineState kept a separate attribute per side for fluid mass,
internal energy, mass flow rate, tank pressure and tank temperature, and
computed the mixture ratio as one oxidizer-over-fuel division.
BiliquidSimulationResult and the tank profile plot hardcoded the same
two series.

Each of these is now a mapping keyed by line name, the internal energy
drains in a loop over the lines, and the mixture ratio is the total
oxidizer flow over the total fuel flow taken by line role, which leaves
no ratio for a monoliquid and leaves room for a hybrid grain to
contribute to the fuel total. plot_bipropellant_tank_profiles gives way
to plot_tank_profiles, which draws a trace per line. The run_timestep
skeleton stays aligned with SolidMotorState.
An oxidizer-only hybrid feed and a monoliquid feed are both the one-line
case of the feed system contract, but no cycle exercised that case.

SingleLinePressureFedFeedSystem delivers one line the tank pressurizes
itself, less what the feedline takes, with from_oxidizer_tank for the
hybrid case. Tests cover the inlet state, the blowdown as the tank
drains, the empty tank, and one line feeding one injector element
through the simulation helper.
…o explanations

The docs covered feed systems only as API reference, with nothing
explaining how a propellant line, a cycle and the injector face fit
together, or why the inlet states are solved in one call.

Add an explanation page covering the propellant line, the injector face
as the seam, the two pressure-fed cycles and their pressure chains, the
orifice models, and what the integrator carries per line. Rename the
theory section to explanations, along with docs/theory/ and
docs/assets/theory/.
An oxidizer-only hybrid feed and a monoliquid feed are both the one-line
case of the feed system contract, but no cycle exercised that case.

SingleLinePressureFedFeedSystem delivers one line the tank pressurizes
itself, less what the feedline takes, with from_oxidizer_tank for the
hybrid case. Tests cover the inlet state, the blowdown as the tank
drains, the empty tank, and one line feeding one injector element
through the simulation helper.
@felipebogaertsm
felipebogaertsm force-pushed the 496-single-line-pressure-fed branch from 977ce49 to 0eabaac Compare August 17, 2026 00:44
felipebogaertsm and others added 3 commits August 16, 2026 21:47
State the three fields as a list, say what the line name keys, and cover
how the lines are used across the feed system, the injector and the
recorded series.
Base automatically changed from 496-single-line-pressure-fed to 495-state-results-plots-per-line August 23, 2026 00:09
@felipebogaertsm
felipebogaertsm merged commit 126e789 into 495-state-results-plots-per-line Aug 23, 2026
14 checks passed
@felipebogaertsm
felipebogaertsm deleted the 504-feed-system-explanation-docs branch August 23, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant