90 """LE4's layout plus its cart on a GSE page: a bank bottle, the table's own
91 `GSE High Press Control` valve, and a paired disconnect onto the COPV. In GN2
92 High Press the bank charges the COPV through the drawing, and the session's
93 built-in charge (which stands in for an undrawn cart) is off -- or the bottle
94 would be filled twice."""
95 from test_pid_drawn_freely
import _le4_like, _machine
100 payload: Any = _le4_like()
101 payload[
"nodes"] += [
109 "pressure": P(4500,
"psi"),
110 "temperature": P(293,
"K"),
111 "volume": P(50,
"L"),
117 "GSE High Press Control",
119 params={
"Cv": P(0.3,
"Cv")},
121 node(
"QG",
"QD",
"QD-CART", page=
"GSE", options={
"pairedWith":
"QV"}),
122 node(
"QV",
"QD",
"QD-COPV", page=
"Main"),
124 payload[
"edges"] += [
125 line(
"bank-hpc",
"BANK",
"HPC"),
126 line(
"hpc-qg",
"HPC",
"QG"),
127 line(
"qv-kb",
"QV",
"KB"),
129 model = assemble_model(read_diagram(payload, name=
"le4+cart"), diagram_id=
"x")
131 session = Session(model, machine, binding(model, machine,
None))
132 assert session.binding.to_symbol.get(
"GSE High Press Control") ==
"HPC"
133 assert any(
"charged through the drawing" in a
for a
in session.assumptions)
135 session.prime(tank_psi=0.0, copv_psi=1000.0, state=
"Idle", hold_s=1.0)
136 bank = session.bottles[
"BANK"]
137 bank.state = bank.volume.initial_state(
138 pressure=4500 * 6894.757 + 101325.0, temperature=293.15
140 session.state =
"GN2 High Press"
141 copv = session.bottles[
"KB"]
142 start = copv.pressure
145 assert not copv.filling,
"the built-in charge stands aside"
146 assert copv.pressure > start + 200 * 6894.757,
"the drawn cart charged it"
147 assert session.bottles[
"BANK"].pressure < 4500 * 6894.757 + 101325.0
Any _two_pages(str pair="both")
None test_a_drawing_that_pairs_nothing_builds_as_before()
None test_halves_joined_by_their_own_line_are_coupled_and_nothing_is_said()
tuple[float, Any] _flow(Any payload)
None test_a_cart_drawn_on_the_gse_page_charges_the_copv_itself()
None test_unpaired_the_two_pages_are_two_systems()
None test_halves_naming_different_partners_are_left_apart_and_said_so()
None test_a_paired_disconnect_joins_the_cart_page_to_the_vehicle_page(str pair)