STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
__init__.py
Go to the documentation of this file.
1
"""Phase 11: the drawing is the document.
2
3
pid-designer stores a P&ID as ``{"nodes": [...], "edges": [...]}`` with every
4
hardware number in :class:`feedtwin.model.Param`'s exact shape -- value, unit,
5
source, reference. This package reads that and builds a solvable network from
6
it, so a system is drawn once and analysed where it was drawn::
7
8
from feedtwin.pid import build_network, load_diagram
9
10
drawing = load_diagram("stand.json")
11
built = build_network(drawing)
12
solve_steady(built.network)
13
14
Two graphs, two shapes. A P&ID carries hardware on symbols *and* on lines; a
15
network carries pressures on nodes and hardware on branches only. The rewrite
16
between them is :mod:`feedtwin.pid.network`, and the case that matters is the
17
inline symbol -- a valve becomes a branch with a node spliced either side.
18
"""
19
20
from
__future__
import
annotations
21
22
from
feedtwin.pid.document
import
(
23
ANNOTATION_TYPES,
24
INLINE_TYPES,
25
INSTRUMENT_TYPES,
26
SOURCE_TYPES,
27
Diagram,
28
DiagramError,
29
PidEdge,
30
PidNode,
31
load_diagram,
32
read_diagram,
33
)
34
from
feedtwin.pid.segments
import
read_segments
35
from
feedtwin.pid.network
import
(
36
BRANCH_KINDS,
37
FALLBACKS,
38
LINE_KINDS,
39
BuiltNetwork,
40
Instrument,
41
Placement,
42
build_network,
43
)
44
45
__all__ = [
46
"ANNOTATION_TYPES"
,
47
"BRANCH_KINDS"
,
48
"BuiltNetwork"
,
49
"Diagram"
,
50
"DiagramError"
,
51
"FALLBACKS"
,
52
"INLINE_TYPES"
,
53
"INSTRUMENT_TYPES"
,
54
"Instrument"
,
55
"LINE_KINDS"
,
56
"Placement"
,
57
"PidEdge"
,
58
"PidNode"
,
59
"SOURCE_TYPES"
,
60
"build_network"
,
61
"load_diagram"
,
62
"read_segments"
,
63
"read_diagram"
,
64
]
feedtwin.pid.document
Definition
document.py:1
feedtwin.pid.network
Definition
network.py:1
feedtwin.pid.segments
Definition
segments.py:1
lib
feedtwin
feedtwin
pid
__init__.py
Generated by
1.15.0