STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
__init__.py
Go to the documentation of this file.
1"""Propellant feed system physics.
2
3Real-gas properties, the parameter model and the liquid-side component library
4are in. The network solver is next::
5
6 from feedtwin.props import Fluid
7 from feedtwin.model import Param, Provenance, ComponentInstance
8
9 Fluid("LOX").get("rho", p=3.0e6, T=90.0) # 1148 kg/m3
10
11 from feedtwin.comps import build_component, conditions_from_fluid
12
13 line = build_component(ComponentInstance.build("FL-01", "pipe", {
14 "length": Param(18.0, "in", Provenance.MEASURED, "tape, 2026-09-08"),
15 "bore": Param(0.305, "in", Provenance.MANUFACTURER, "3/8 x 0.035 tube"),
16 }))
17 line.pressure_drop(0.5, conditions_from_fluid(Fluid("LOX"), 3.0e6, 90.0))
18
19:mod:`feedtwin.props` is imported explicitly rather than re-exported here, so
20``import feedtwin`` stays cheap for callers that only want version metadata --
21the API container asks for that on every health check.
22
23What goes where, as the phases land::
24
25 feedtwin.props Phase 01 real-gas properties, tabulated [DONE]
26 feedtwin.model Phase 02 Param, ComponentSpec, the catalog [DONE]
27 feedtwin.comps Phase 03 pipes, fittings, valves, orifices [DONE]
28 feedtwin.solve Phase 04 steady network [DONE]
29 feedtwin.vessels Phase 05 gas side and tank thermodynamics [DONE]
30 feedtwin.session the stand in time: vessels marched against the
31 network, the chamber closed, a burn [DONE]
32 (Phase 07's stiff integrator, feedtwin.transient,
33 was replaced by it and removed 2026-10-08)
34 feedtwin.engine Phase 08 a Layer-1 engine on the end [DONE]
35 feedtwin.pid Phase 11 the drawing is the document [DONE]
36 feedtwin.vessels.vapour Phase 14 ullage vapour, chilldown [DONE, opt-in]
37 feedtwin.fit Phase 12 parameter identification from test data
38 -- NOT BUILT. The reader belongs in the DAQ;
39 what crosses is a fitted K, and the shapes for
40 it already exist. See
41 docs/integration/daq-k-fitting.md.
42 Phase 15 constraint API (MEOP, NPSH, injector margins)
43 -- not started.
44
45Before changing any of it, and after: **run
46``python3 scripts/physics_benchmark.py``**, and read ``docs/PHYSICS-BENCHMARK.md``.
47Every expected value there was checked against hand calculation, ``fluids``, CoolProp
48or a handbook rather than against this package, which is the only kind of check worth
49having on a simulator.
50
51Nothing here imports a web framework, and nothing here should. The package has
52two callers with incompatible needs -- the feed-twin API, and EngineDesign's
53optimizer calling it in-process thousands of times per run -- and only a plain
54library serves both. See docs/adr/0001-feed-system-physics-is-a-library.md.
55"""
56
57from __future__ import annotations
58
59from feedtwin._environment import stack_versions
60
61__version__ = "0.2.0"
62
63__all__ = ["__version__", "stack_versions"]