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
15
Unknowns are one pressure per free node and one flow per branch; equations are
16
one mass balance per free node and one pressure relation per branch. Everything
17
else -- the sparsity, the damping, the derivative floor at zero flow -- is in
18
:mod:`feedtwin.solve.steady`, along with why each is needed.
19
20
Steady, isothermal, single-phase. Node temperatures are given rather than
21
solved. Phase 05 adds the gas side, Phase 07 the transient.
22
"""
23
24
from
__future__
import
annotations
25
26
from
feedtwin.solve.network
import
Branch, Network, NetworkError, Node
27
from
feedtwin.solve.report
import
pressure_ladder
28
from
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
]
feedtwin.solve.network
Definition
network.py:1
feedtwin.solve.report
Definition
report.py:1
feedtwin.solve.steady
Definition
steady.py:1
lib
feedtwin
feedtwin
solve
__init__.py
Generated by
1.15.0