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
3
Real-gas properties, the parameter model and the liquid-side component library
4
are 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 --
21
the API container asks for that on every health check.
22
23
What 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
45
Before changing any of it, and after: **run
46
``python3 scripts/physics_benchmark.py``**, and read ``docs/PHYSICS-BENCHMARK.md``.
47
Every expected value there was checked against hand calculation, ``fluids``, CoolProp
48
or a handbook rather than against this package, which is the only kind of check worth
49
having on a simulator.
50
51
Nothing here imports a web framework, and nothing here should. The package has
52
two callers with incompatible needs -- the feed-twin API, and EngineDesign's
53
optimizer calling it in-process thousands of times per run -- and only a plain
54
library serves both. See docs/adr/0001-feed-system-physics-is-a-library.md.
55
"""
56
57
from
__future__
import
annotations
58
59
from
feedtwin._environment
import
stack_versions
60
61
__version__ =
"0.2.0"
62
63
__all__ = [
"__version__"
,
"stack_versions"
]
feedtwin._environment
Definition
_environment.py:1
lib
feedtwin
feedtwin
__init__.py
Generated by
1.15.0