Skip to content

Generalize the injector to a keyed collection of injector elements - #500

Merged
felipebogaertsm merged 1 commit into
493-feed-system-keyed-by-linefrom
494-keyed-injector-elements
Aug 23, 2026
Merged

Generalize the injector to a keyed collection of injector elements#500
felipebogaertsm merged 1 commit into
493-feed-system-keyed-by-linefrom
494-keyed-injector-elements

Conversation

@felipebogaertsm

Copy link
Copy Markdown
Owner

Closes #494. Stacked on #499.

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.

  • InjectorElement holds a discharge coefficient, a flow area and a MassFlowModel, and owns get_mass_flow(*, inlet, chamber_pressure). It is a pure function of its own inlet, and returns no flow once the chamber has caught up with it — the guard the simulation loop used to carry.
  • Injector holds one element per line name and exposes get_mass_flows(*, inlet_states, chamber_pressure), so the propellant count is free: one element for a monoliquid or an oxidizer-only hybrid feed, three for a triliquid.
  • BipropellantInjector is gone; BiliquidEngineThrustChamber.injector is now an Injector.

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.
@felipebogaertsm
felipebogaertsm force-pushed the 494-keyed-injector-elements branch from 4735c60 to 40d4a3e Compare August 17, 2026 00:44
@felipebogaertsm
felipebogaertsm merged commit 9ff1985 into master Aug 23, 2026
14 of 28 checks passed
@felipebogaertsm
felipebogaertsm deleted the 494-keyed-injector-elements branch August 24, 2026 11:58
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.

Generalize the injector to a keyed collection of injector elements

1 participant