STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
__init__.py
Go to the documentation of this file.
1"""Phase 08: an optimized Layer-1 engine on the end of the feed system.
2
3Point it at what the optimizer wrote and fire it::
4
5 from feedtwin.engine import Chamber, CEATable, load_engine, injector_legs
6
7 design = load_engine("configs/impinging_lox_ch4_8000N_optimal.yaml")
8 design.summary()
9 # impinging injector, oxygen/methane, A_t 1398.2 mm^2,
10 # A_inj ox 124.55 mm^2 / fuel 60.76 mm^2, design 8000 N at 24.1 bar
11
12 chamber = Chamber(design.throat_area,
13 CEATable("output/cache/cea_cache_LOX_CH4_3D.npz",
14 expansion_ratio=design.expansion_ratio))
15 ox_leg, fuel_leg = injector_legs(design)
16
17Nothing is retyped. The injector areas come from Layer 1's own geometry through
18a **type-aware** extractor -- round jets for an impinging face, orifices and an
19annulus for a pintle, core and annulus for a coaxial -- and an unrecognised type
20is refused rather than guessed at, because a wrong area is a wrong mass flow and
21every number downstream of it stays perfectly plausible.
22
23Combustion is **propellant-aware** for real: :class:`CEATable` reads
24EngineDesign's own CEA cache, so ``c*``, chamber temperature, ``gamma`` and
25``C_F`` come from the same table both tools use. That is what lets a firing
26trace report chamber temperature and O/F drift rather than assuming them.
27
28The engine is a boundary, not a component: chamber pressure depends on the flows
29and the flows depend on chamber pressure, and the session closes that loop around
30the whole feed system (``feedtwin.session.core.Session._close_chamber``).
31"""
32
33from __future__ import annotations
34
35from feedtwin.engine.balance import (
36 MixtureBalance,
37 SideBalance,
38 balance_from,
39)
40from feedtwin.engine.chamber import (
41 GRAVITY,
42 CEATable,
43 Chamber,
44 ChamberResult,
45 CombustionState,
46 ConstantCStar,
47 CStarModel,
48 cea_cache_for,
49 mixture_ratio_of,
50)
51from feedtwin.engine.card import (
52 CardChamber,
53 ChamberCard,
54 EngineCard,
55 InjectorCard,
56 Table2D,
57)
58from feedtwin.engine.component import InjectorLeg, injector_legs
59from feedtwin.engine.design import (
60 PROPELLANT_ALIASES,
61 DischargeModel,
62 EngineDesign,
63 InjectorSide,
64 UnknownPropellant,
65 injector_areas,
66 register_injector_type,
67 register_propellant_alias,
68 registered_injector_types,
69 species_for,
70)
71from feedtwin.engine.importer import (
72 EngineImportError,
73 engine_from_config,
74 load_engine,
75)
76
77__all__ = [
78 "CardChamber",
79 "ChamberCard",
80 "EngineCard",
81 "InjectorCard",
82 "Table2D",
83 "MixtureBalance",
84 "SideBalance",
85 "balance_from",
86 "GRAVITY",
87 "PROPELLANT_ALIASES",
88 "CEATable",
89 "CStarModel",
90 "Chamber",
91 "ChamberResult",
92 "CombustionState",
93 "ConstantCStar",
94 "DischargeModel",
95 "EngineDesign",
96 "EngineImportError",
97 "InjectorLeg",
98 "InjectorSide",
99 "UnknownPropellant",
100 "cea_cache_for",
101 "engine_from_config",
102 "injector_areas",
103 "injector_legs",
104 "load_engine",
105 "mixture_ratio_of",
106 "register_injector_type",
107 "register_propellant_alias",
108 "registered_injector_types",
109 "species_for",
110]