STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
__init__.py
Go to the documentation of this file.
1"""Solving a feed system: steady now, transient in Phase 07.
2
3 from feedtwin.solve import Network, solve_steady
4
5 net = Network()
6 net.add_node("tank", "LOX", temperature=90.0, pressure=30e5)
7 net.add_node("inj", "LOX", temperature=90.0, pressure=20e5)
8 net.add_branch("FL-01", line, "tank", "inj")
9
10 result = solve_steady(net)
11 result.flows["FL-01"] # kg/s
12 result.pressures["inj"] # Pa
13 result.max_mass_residual # how well mass actually balanced
14
15Unknowns are one pressure per free node and one flow per branch; equations are
16one mass balance per free node and one pressure relation per branch. Everything
17else -- the sparsity, the damping, the derivative floor at zero flow -- is in
18:mod:`feedtwin.solve.steady`, along with why each is needed.
19
20Steady, isothermal, single-phase. Node temperatures are given rather than
21solved. Phase 05 adds the gas side, Phase 07 the transient.
22"""
23
24from __future__ import annotations
25
26from feedtwin.solve.network import Branch, Network, NetworkError, Node
27from feedtwin.solve.report import pressure_ladder
28from feedtwin.solve.steady import (
29 MIN_BRANCH_SLOPE,
30 ConvergenceError,
31 SteadyResult,
32 solve_steady,
33)
34
35__all__ = [
36 "MIN_BRANCH_SLOPE",
37 "Branch",
38 "ConvergenceError",
39 "Network",
40 "NetworkError",
41 "Node",
42 "SteadyResult",
43 "pressure_ladder",
44 "solve_steady",
45]