接入test_mql P4桥接环网管路
This commit is contained in:
1 parent
8639b42574
commit
a09a8c8daf
3 files changed
+274
-26
No files matched your search
@@ -211,6 +211,10 @@ class TestMqlPn3P4NodeChamberSegmentComponents:
|
||||
p4_port1_next_node: TestMqlPneumaticNode4
|
||||
p4_port1_next_primary_line: AmesimPnl0001Pipe
|
||||
p4_port1_next_primary_chamber: AmesimPneumaticVolume
|
||||
p4_port1_next_port1_line: AmesimPnl0002Pipe
|
||||
p4_bridge_node: TestMqlPneumaticNode4
|
||||
p4_bridge_primary_line: AmesimPnl0001Pipe
|
||||
p4_bridge_primary_chamber: AmesimPneumaticVolume
|
||||
p4_port1_remote_orifice: AmesimPneumaticOrifice
|
||||
p4_port1_remote_orifice_line: AmesimPnl0003Pipe
|
||||
p4_port1_remote_orifice_node: TestMqlPneumaticNode3
|
||||
@@ -226,6 +230,7 @@ class TestMqlPn3P4NodeChamberSegmentComponents:
|
||||
p4_port3_next_node: TestMqlPneumaticNode4
|
||||
p4_port3_next_primary_line: AmesimPnl0001Pipe
|
||||
p4_port3_next_primary_chamber: AmesimPneumaticVolume
|
||||
p4_port3_next_port3_line: AmesimPnl0002Pipe
|
||||
p4_port3_remote_orifice: AmesimPneumaticOrifice
|
||||
p4_port3_remote_orifice_line: AmesimPnl0003Pipe
|
||||
p4_port3_remote_orifice_node: TestMqlPneumaticNode3
|
||||
@@ -258,6 +263,9 @@ class TestMqlPn3P4NodeChamberSegmentSnapshot:
|
||||
p4_port1_far_port1_line: ThermodynamicProperties
|
||||
p4_port1_next_primary_line: ThermodynamicProperties
|
||||
p4_port1_next_primary_chamber: ThermodynamicProperties
|
||||
p4_port1_next_port1_line: ThermodynamicProperties
|
||||
p4_bridge_primary_line: ThermodynamicProperties
|
||||
p4_bridge_primary_chamber: ThermodynamicProperties
|
||||
p4_port1_remote_orifice_line_port_1: ThermodynamicProperties
|
||||
p4_port1_remote_orifice_line_port_2: ThermodynamicProperties
|
||||
p4_port3_line: ThermodynamicProperties
|
||||
@@ -269,6 +277,7 @@ class TestMqlPn3P4NodeChamberSegmentSnapshot:
|
||||
p4_port3_far_port3_line: ThermodynamicProperties
|
||||
p4_port3_next_primary_line: ThermodynamicProperties
|
||||
p4_port3_next_primary_chamber: ThermodynamicProperties
|
||||
p4_port3_next_port3_line: ThermodynamicProperties
|
||||
p4_port3_remote_orifice_line_port_1: ThermodynamicProperties
|
||||
p4_port3_remote_orifice_line_port_2: ThermodynamicProperties
|
||||
p4_port3_remote_resistance_node_line_port_1: ThermodynamicProperties
|
||||
@@ -280,6 +289,7 @@ class TestMqlPn3P4NodeChamberSegmentSnapshot:
|
||||
p4_port1_remote_balance: TestMqlPneumaticNode4Balance
|
||||
p4_port1_far_balance: TestMqlPneumaticNode4Balance
|
||||
p4_port1_next_balance: TestMqlPneumaticNode4Balance
|
||||
p4_bridge_balance: TestMqlPneumaticNode4Balance
|
||||
p4_port1_remote_orifice_node_balance: TestMqlPneumaticNode3Balance
|
||||
p4_port3_remote_balance: TestMqlPneumaticNode4Balance
|
||||
p4_port3_far_balance: TestMqlPneumaticNode4Balance
|
||||
@@ -308,6 +318,10 @@ class TestMqlPn3P4NodeChamberSegmentSnapshot:
|
||||
p4_port1_next_node_to_line_flow: float
|
||||
p4_port1_next_chamber_to_line_flow: float
|
||||
p4_port1_next_node_to_primary_line_flow: float
|
||||
p4_port1_next_to_bridge_line_flow: float
|
||||
p4_bridge_to_port1_next_line_flow: float
|
||||
p4_bridge_chamber_to_line_flow: float
|
||||
p4_bridge_node_to_primary_line_flow: float
|
||||
p4_port1_remote_node_to_orifice_line_flow: float
|
||||
p4_port1_remote_orifice_line_center_flow: float
|
||||
p4_port1_remote_orifice_to_node_flow: float
|
||||
@@ -323,6 +337,8 @@ class TestMqlPn3P4NodeChamberSegmentSnapshot:
|
||||
p4_port3_next_node_to_line_flow: float
|
||||
p4_port3_next_chamber_to_line_flow: float
|
||||
p4_port3_next_node_to_primary_line_flow: float
|
||||
p4_bridge_to_port3_next_line_flow: float
|
||||
p4_port3_next_to_bridge_line_flow: float
|
||||
p4_port3_remote_node_to_orifice_line_flow: float
|
||||
p4_port3_remote_node_to_resistance_flow: float
|
||||
p4_port3_remote_resistance_node_to_line_flow: float
|
||||
@@ -368,6 +384,9 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
*self.components.p4_port1_far_port1_line.get_state_vector(),
|
||||
*self.components.p4_port1_next_primary_line.get_state_vector(),
|
||||
*self.components.p4_port1_next_primary_chamber.get_state_vector(),
|
||||
*self.components.p4_port1_next_port1_line.get_state_vector(),
|
||||
*self.components.p4_bridge_primary_line.get_state_vector(),
|
||||
*self.components.p4_bridge_primary_chamber.get_state_vector(),
|
||||
*self.components.p4_port1_remote_orifice_line.get_state_vector(),
|
||||
*self.components.p4_port3_line.get_state_vector(),
|
||||
*self.components.p4_port3_remote_primary_line.get_state_vector(),
|
||||
@@ -378,13 +397,14 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
*self.components.p4_port3_far_port3_line.get_state_vector(),
|
||||
*self.components.p4_port3_next_primary_line.get_state_vector(),
|
||||
*self.components.p4_port3_next_primary_chamber.get_state_vector(),
|
||||
*self.components.p4_port3_next_port3_line.get_state_vector(),
|
||||
*self.components.p4_port3_remote_resistance_node_line.get_state_vector(),
|
||||
*self.components.p4_port3_remote_orifice_line.get_state_vector(),
|
||||
]
|
||||
|
||||
def apply_state_vector(self, values: list[float]) -> None:
|
||||
if len(values) != 62:
|
||||
raise ValueError("PN3/P4 node chamber segment state vector requires sixty-two values")
|
||||
if len(values) != 70:
|
||||
raise ValueError("PN3/P4 node chamber segment state vector requires seventy values")
|
||||
self.components.inlet_line.set_state_vector(values[:2])
|
||||
self.components.volume.set_state_vector(values[2:4])
|
||||
self.components.outlet_line.set_state_vector(values[4:6])
|
||||
@@ -400,18 +420,22 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
self.components.p4_port1_far_port1_line.set_state_vector(values[26:28])
|
||||
self.components.p4_port1_next_primary_line.set_state_vector(values[28:30])
|
||||
self.components.p4_port1_next_primary_chamber.set_state_vector(values[30:32])
|
||||
self.components.p4_port1_remote_orifice_line.set_state_vector(values[32:36])
|
||||
self.components.p4_port3_line.set_state_vector(values[36:38])
|
||||
self.components.p4_port3_remote_primary_line.set_state_vector(values[38:40])
|
||||
self.components.p4_port3_remote_primary_chamber.set_state_vector(values[40:42])
|
||||
self.components.p4_port3_remote_port3_line.set_state_vector(values[42:44])
|
||||
self.components.p4_port3_far_primary_line.set_state_vector(values[44:46])
|
||||
self.components.p4_port3_far_primary_chamber.set_state_vector(values[46:48])
|
||||
self.components.p4_port3_far_port3_line.set_state_vector(values[48:50])
|
||||
self.components.p4_port3_next_primary_line.set_state_vector(values[50:52])
|
||||
self.components.p4_port3_next_primary_chamber.set_state_vector(values[52:54])
|
||||
self.components.p4_port3_remote_resistance_node_line.set_state_vector(values[54:58])
|
||||
self.components.p4_port3_remote_orifice_line.set_state_vector(values[58:])
|
||||
self.components.p4_port1_next_port1_line.set_state_vector(values[32:34])
|
||||
self.components.p4_bridge_primary_line.set_state_vector(values[34:36])
|
||||
self.components.p4_bridge_primary_chamber.set_state_vector(values[36:38])
|
||||
self.components.p4_port1_remote_orifice_line.set_state_vector(values[38:42])
|
||||
self.components.p4_port3_line.set_state_vector(values[42:44])
|
||||
self.components.p4_port3_remote_primary_line.set_state_vector(values[44:46])
|
||||
self.components.p4_port3_remote_primary_chamber.set_state_vector(values[46:48])
|
||||
self.components.p4_port3_remote_port3_line.set_state_vector(values[48:50])
|
||||
self.components.p4_port3_far_primary_line.set_state_vector(values[50:52])
|
||||
self.components.p4_port3_far_primary_chamber.set_state_vector(values[52:54])
|
||||
self.components.p4_port3_far_port3_line.set_state_vector(values[54:56])
|
||||
self.components.p4_port3_next_primary_line.set_state_vector(values[56:58])
|
||||
self.components.p4_port3_next_primary_chamber.set_state_vector(values[58:60])
|
||||
self.components.p4_port3_next_port3_line.set_state_vector(values[60:62])
|
||||
self.components.p4_port3_remote_resistance_node_line.set_state_vector(values[62:66])
|
||||
self.components.p4_port3_remote_orifice_line.set_state_vector(values[66:])
|
||||
|
||||
def snapshot(
|
||||
self,
|
||||
@@ -445,6 +469,9 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port1_next_primary_chamber = (
|
||||
self.components.p4_port1_next_primary_chamber.properties()
|
||||
)
|
||||
p4_port1_next_port1_line = self.components.p4_port1_next_port1_line.properties()
|
||||
p4_bridge_primary_line = self.components.p4_bridge_primary_line.properties()
|
||||
p4_bridge_primary_chamber = self.components.p4_bridge_primary_chamber.properties()
|
||||
p4_port1_remote_orifice_line_port_1 = (
|
||||
self.components.p4_port1_remote_orifice_line.properties_1()
|
||||
)
|
||||
@@ -470,6 +497,7 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port3_next_primary_chamber = (
|
||||
self.components.p4_port3_next_primary_chamber.properties()
|
||||
)
|
||||
p4_port3_next_port3_line = self.components.p4_port3_next_port3_line.properties()
|
||||
p4_port3_remote_orifice_line_port_1 = (
|
||||
self.components.p4_port3_remote_orifice_line.properties_1()
|
||||
)
|
||||
@@ -592,6 +620,24 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
port_1_temperature_k=p4_port1_next_primary_chamber.T,
|
||||
)
|
||||
)
|
||||
p4_port1_next_to_bridge_line_flow = (
|
||||
self.components.p4_port1_next_port1_line.port_mass_flow(
|
||||
port_pressure_pa=p4_port1_next_primary_line.p,
|
||||
port_temperature_k=p4_port1_next_primary_line.T,
|
||||
)
|
||||
)
|
||||
p4_bridge_to_port1_next_line_flow = (
|
||||
self.components.p4_port1_next_port1_line.port_mass_flow(
|
||||
port_pressure_pa=p4_bridge_primary_line.p,
|
||||
port_temperature_k=p4_bridge_primary_line.T,
|
||||
)
|
||||
)
|
||||
p4_bridge_chamber_to_line_flow = (
|
||||
self.components.p4_bridge_primary_line.resistance_mass_flow(
|
||||
port_1_pressure_pa=p4_bridge_primary_chamber.p,
|
||||
port_1_temperature_k=p4_bridge_primary_chamber.T,
|
||||
)
|
||||
)
|
||||
p4_port1_remote_node_to_orifice_line_flow = -self.components.p4_port1_remote_orifice_node.balance(
|
||||
port_2_temperature_k=p4_port1_remote_orifice_line_port_1.T,
|
||||
port_2_pressure_pa=p4_port1_remote_orifice_line_port_1.p,
|
||||
@@ -664,6 +710,18 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
port_1_temperature_k=p4_port3_next_primary_chamber.T,
|
||||
)
|
||||
)
|
||||
p4_bridge_to_port3_next_line_flow = (
|
||||
self.components.p4_port3_next_port3_line.port_mass_flow(
|
||||
port_pressure_pa=p4_bridge_primary_line.p,
|
||||
port_temperature_k=p4_bridge_primary_line.T,
|
||||
)
|
||||
)
|
||||
p4_port3_next_to_bridge_line_flow = (
|
||||
self.components.p4_port3_next_port3_line.port_mass_flow(
|
||||
port_pressure_pa=p4_port3_next_primary_line.p,
|
||||
port_temperature_k=p4_port3_next_primary_line.T,
|
||||
)
|
||||
)
|
||||
p4_port3_remote_node_to_resistance_flow = (
|
||||
self.components.p4_port3_remote_orifice_resistance.mass_flow(
|
||||
port_1_pressure_pa=p4_port3_remote_orifice_line_port_1.p,
|
||||
@@ -812,8 +870,12 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port1_next_balance = self.components.p4_port1_next_node.balance(
|
||||
port_2_temperature_k=p4_port1_next_primary_line.T,
|
||||
port_2_pressure_pa=p4_port1_next_primary_line.p,
|
||||
port_1_enthalpy_flow_w=0.0,
|
||||
port_1_mass_flow_g_s=0.0,
|
||||
port_1_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||
flow_kg_s=p4_port1_next_to_bridge_line_flow,
|
||||
node_h=p4_port1_next_primary_line.h,
|
||||
connected_h=p4_port1_next_port1_line.h,
|
||||
),
|
||||
port_1_mass_flow_g_s=-p4_port1_next_to_bridge_line_flow * 1.0e3,
|
||||
port_3_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||
flow_kg_s=p4_port1_next_node_to_line_flow,
|
||||
node_h=p4_port1_next_primary_line.h,
|
||||
@@ -885,14 +947,39 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
connected_h=p4_port3_far_port3_line.h,
|
||||
),
|
||||
port_1_mass_flow_g_s=-p4_port3_next_node_to_line_flow * 1.0e3,
|
||||
port_3_enthalpy_flow_w=0.0,
|
||||
port_3_mass_flow_g_s=0.0,
|
||||
port_3_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||
flow_kg_s=p4_port3_next_to_bridge_line_flow,
|
||||
node_h=p4_port3_next_primary_line.h,
|
||||
connected_h=p4_port3_next_port3_line.h,
|
||||
),
|
||||
port_3_mass_flow_g_s=-p4_port3_next_to_bridge_line_flow * 1.0e3,
|
||||
port_4_enthalpy_flow_w=0.0,
|
||||
port_4_mass_flow_g_s=0.0,
|
||||
)
|
||||
p4_port3_next_node_to_primary_line_flow = (
|
||||
p4_port3_next_balance.port_2_mass_flow_g_s * 1.0e-3
|
||||
)
|
||||
p4_bridge_balance = self.components.p4_bridge_node.balance(
|
||||
port_2_temperature_k=p4_bridge_primary_line.T,
|
||||
port_2_pressure_pa=p4_bridge_primary_line.p,
|
||||
port_1_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||
flow_kg_s=p4_bridge_to_port3_next_line_flow,
|
||||
node_h=p4_bridge_primary_line.h,
|
||||
connected_h=p4_port3_next_port3_line.h,
|
||||
),
|
||||
port_1_mass_flow_g_s=-p4_bridge_to_port3_next_line_flow * 1.0e3,
|
||||
port_3_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||
flow_kg_s=p4_bridge_to_port1_next_line_flow,
|
||||
node_h=p4_bridge_primary_line.h,
|
||||
connected_h=p4_port1_next_port1_line.h,
|
||||
),
|
||||
port_3_mass_flow_g_s=-p4_bridge_to_port1_next_line_flow * 1.0e3,
|
||||
port_4_enthalpy_flow_w=0.0,
|
||||
port_4_mass_flow_g_s=0.0,
|
||||
)
|
||||
p4_bridge_node_to_primary_line_flow = (
|
||||
p4_bridge_balance.port_2_mass_flow_g_s * 1.0e-3
|
||||
)
|
||||
|
||||
snapshot = TestMqlPn3P4NodeChamberSegmentSnapshot(
|
||||
inlet_line=inlet_line,
|
||||
@@ -912,6 +999,9 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port1_far_port1_line=p4_port1_far_port1_line,
|
||||
p4_port1_next_primary_line=p4_port1_next_primary_line,
|
||||
p4_port1_next_primary_chamber=p4_port1_next_primary_chamber,
|
||||
p4_port1_next_port1_line=p4_port1_next_port1_line,
|
||||
p4_bridge_primary_line=p4_bridge_primary_line,
|
||||
p4_bridge_primary_chamber=p4_bridge_primary_chamber,
|
||||
p4_port1_remote_orifice_line_port_1=p4_port1_remote_orifice_line_port_1,
|
||||
p4_port1_remote_orifice_line_port_2=p4_port1_remote_orifice_line_port_2,
|
||||
p4_port3_line=p4_port3_line,
|
||||
@@ -923,6 +1013,7 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port3_far_port3_line=p4_port3_far_port3_line,
|
||||
p4_port3_next_primary_line=p4_port3_next_primary_line,
|
||||
p4_port3_next_primary_chamber=p4_port3_next_primary_chamber,
|
||||
p4_port3_next_port3_line=p4_port3_next_port3_line,
|
||||
p4_port3_remote_orifice_line_port_1=p4_port3_remote_orifice_line_port_1,
|
||||
p4_port3_remote_orifice_line_port_2=p4_port3_remote_orifice_line_port_2,
|
||||
p4_port3_remote_resistance_node_line_port_1=(
|
||||
@@ -938,6 +1029,7 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port1_remote_balance=p4_port1_remote_balance,
|
||||
p4_port1_far_balance=p4_port1_far_balance,
|
||||
p4_port1_next_balance=p4_port1_next_balance,
|
||||
p4_bridge_balance=p4_bridge_balance,
|
||||
p4_port1_remote_orifice_node_balance=p4_port1_remote_orifice_node_balance,
|
||||
p4_port3_remote_balance=p4_port3_remote_balance,
|
||||
p4_port3_far_balance=p4_port3_far_balance,
|
||||
@@ -974,6 +1066,10 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port1_next_node_to_primary_line_flow=(
|
||||
p4_port1_next_node_to_primary_line_flow
|
||||
),
|
||||
p4_port1_next_to_bridge_line_flow=p4_port1_next_to_bridge_line_flow,
|
||||
p4_bridge_to_port1_next_line_flow=p4_bridge_to_port1_next_line_flow,
|
||||
p4_bridge_chamber_to_line_flow=p4_bridge_chamber_to_line_flow,
|
||||
p4_bridge_node_to_primary_line_flow=p4_bridge_node_to_primary_line_flow,
|
||||
p4_port1_remote_node_to_orifice_line_flow=(
|
||||
p4_port1_remote_node_to_orifice_line_flow
|
||||
),
|
||||
@@ -999,6 +1095,8 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port3_next_node_to_primary_line_flow=(
|
||||
p4_port3_next_node_to_primary_line_flow
|
||||
),
|
||||
p4_bridge_to_port3_next_line_flow=p4_bridge_to_port3_next_line_flow,
|
||||
p4_port3_next_to_bridge_line_flow=p4_port3_next_to_bridge_line_flow,
|
||||
p4_port3_remote_node_to_orifice_line_flow=(
|
||||
p4_port3_remote_node_to_orifice_line_flow
|
||||
),
|
||||
@@ -1232,6 +1330,27 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port1_next_primary_chamber.port_a.m_flow = -snapshot.p4_port1_next_chamber_to_line_flow
|
||||
p4_port1_next_primary_chamber.port_a.h_outflow = snapshot.p4_port1_next_primary_chamber.h
|
||||
|
||||
p4_port1_next_port1_line = self.components.p4_port1_next_port1_line
|
||||
p4_port1_next_port1_line.port_1.p = snapshot.p4_port1_next_primary_line.p
|
||||
p4_port1_next_port1_line.port_1.m_flow = snapshot.p4_port1_next_to_bridge_line_flow
|
||||
p4_port1_next_port1_line.port_1.h_outflow = snapshot.p4_port1_next_port1_line.h
|
||||
p4_port1_next_port1_line.port_2.p = snapshot.p4_bridge_primary_line.p
|
||||
p4_port1_next_port1_line.port_2.m_flow = snapshot.p4_bridge_to_port1_next_line_flow
|
||||
p4_port1_next_port1_line.port_2.h_outflow = snapshot.p4_port1_next_port1_line.h
|
||||
|
||||
p4_bridge_primary_line = self.components.p4_bridge_primary_line
|
||||
p4_bridge_primary_line.port_1.p = snapshot.p4_bridge_primary_chamber.p
|
||||
p4_bridge_primary_line.port_1.m_flow = snapshot.p4_bridge_chamber_to_line_flow
|
||||
p4_bridge_primary_line.port_1.h_outflow = snapshot.p4_bridge_primary_line.h
|
||||
p4_bridge_primary_line.port_2.p = snapshot.p4_bridge_primary_line.p
|
||||
p4_bridge_primary_line.port_2.m_flow = snapshot.p4_bridge_node_to_primary_line_flow
|
||||
p4_bridge_primary_line.port_2.h_outflow = snapshot.p4_bridge_primary_line.h
|
||||
|
||||
p4_bridge_primary_chamber = self.components.p4_bridge_primary_chamber
|
||||
p4_bridge_primary_chamber.port_a.p = snapshot.p4_bridge_primary_chamber.p
|
||||
p4_bridge_primary_chamber.port_a.m_flow = -snapshot.p4_bridge_chamber_to_line_flow
|
||||
p4_bridge_primary_chamber.port_a.h_outflow = snapshot.p4_bridge_primary_chamber.h
|
||||
|
||||
p4_port1_remote_orifice_line = self.components.p4_port1_remote_orifice_line
|
||||
p4_port1_remote_orifice_line.port_1.p = snapshot.p4_port1_remote_orifice_line_port_1.p
|
||||
p4_port1_remote_orifice_line.port_1.m_flow = snapshot.p4_port1_remote_node_to_orifice_line_flow
|
||||
@@ -1329,6 +1448,14 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port3_next_primary_chamber.port_a.m_flow = -snapshot.p4_port3_next_chamber_to_line_flow
|
||||
p4_port3_next_primary_chamber.port_a.h_outflow = snapshot.p4_port3_next_primary_chamber.h
|
||||
|
||||
p4_port3_next_port3_line = self.components.p4_port3_next_port3_line
|
||||
p4_port3_next_port3_line.port_1.p = snapshot.p4_bridge_primary_line.p
|
||||
p4_port3_next_port3_line.port_1.m_flow = snapshot.p4_bridge_to_port3_next_line_flow
|
||||
p4_port3_next_port3_line.port_1.h_outflow = snapshot.p4_port3_next_port3_line.h
|
||||
p4_port3_next_port3_line.port_2.p = snapshot.p4_port3_next_primary_line.p
|
||||
p4_port3_next_port3_line.port_2.m_flow = snapshot.p4_port3_next_to_bridge_line_flow
|
||||
p4_port3_next_port3_line.port_2.h_outflow = snapshot.p4_port3_next_port3_line.h
|
||||
|
||||
p4_port3_remote_orifice_line = self.components.p4_port3_remote_orifice_line
|
||||
p4_port3_remote_orifice_line.port_1.p = snapshot.p4_port3_remote_orifice_line_port_1.p
|
||||
p4_port3_remote_orifice_line.port_1.m_flow = snapshot.p4_port3_remote_node_to_orifice_line_flow
|
||||
@@ -1498,6 +1625,31 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
internal_h=snapshot.p4_port1_next_primary_chamber.h,
|
||||
)
|
||||
)
|
||||
p4_port1_next_port1_derivative = (
|
||||
self.components.p4_port1_next_port1_line.derivatives_from_connections(
|
||||
port_1_m_flow=snapshot.p4_port1_next_to_bridge_line_flow,
|
||||
connected_h_1=snapshot.p4_port1_next_primary_line.h,
|
||||
port_2_m_flow=snapshot.p4_bridge_to_port1_next_line_flow,
|
||||
connected_h_2=snapshot.p4_bridge_primary_line.h,
|
||||
)
|
||||
)
|
||||
p4_bridge_primary_derivative = (
|
||||
self.components.p4_bridge_primary_line.derivatives_from_connections(
|
||||
port_1_m_flow=snapshot.p4_bridge_chamber_to_line_flow,
|
||||
connected_h_1=snapshot.p4_bridge_primary_chamber.h,
|
||||
port_2_m_flow=snapshot.p4_bridge_node_to_primary_line_flow,
|
||||
connected_h_2=snapshot.p4_bridge_primary_line.h,
|
||||
)
|
||||
)
|
||||
p4_bridge_chamber_derivative = (
|
||||
self.components.p4_bridge_primary_chamber.derivatives_from_two_connections(
|
||||
port_a_m_flow=-snapshot.p4_bridge_chamber_to_line_flow,
|
||||
connected_h_a=snapshot.p4_bridge_primary_line.h,
|
||||
port_b_m_flow=0.0,
|
||||
connected_h_b=snapshot.p4_bridge_primary_chamber.h,
|
||||
internal_h=snapshot.p4_bridge_primary_chamber.h,
|
||||
)
|
||||
)
|
||||
p4_port1_remote_orifice_derivative_1, p4_port1_remote_orifice_derivative_2 = (
|
||||
self.components.p4_port1_remote_orifice_line.derivatives_from_connections(
|
||||
port_1_m_flow=snapshot.p4_port1_remote_node_to_orifice_line_flow,
|
||||
@@ -1579,6 +1731,14 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
internal_h=snapshot.p4_port3_next_primary_chamber.h,
|
||||
)
|
||||
)
|
||||
p4_port3_next_port3_derivative = (
|
||||
self.components.p4_port3_next_port3_line.derivatives_from_connections(
|
||||
port_1_m_flow=snapshot.p4_bridge_to_port3_next_line_flow,
|
||||
connected_h_1=snapshot.p4_bridge_primary_line.h,
|
||||
port_2_m_flow=snapshot.p4_port3_next_to_bridge_line_flow,
|
||||
connected_h_2=snapshot.p4_port3_next_primary_line.h,
|
||||
)
|
||||
)
|
||||
(
|
||||
p4_port3_remote_resistance_derivative_1,
|
||||
p4_port3_remote_resistance_derivative_2,
|
||||
@@ -1613,6 +1773,9 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
*p4_port1_far_port1_derivative.as_vector(),
|
||||
*p4_port1_next_primary_derivative.as_vector(),
|
||||
*p4_port1_next_chamber_derivative.as_vector(),
|
||||
*p4_port1_next_port1_derivative.as_vector(),
|
||||
*p4_bridge_primary_derivative.as_vector(),
|
||||
*p4_bridge_chamber_derivative.as_vector(),
|
||||
*p4_port1_remote_orifice_derivative_1.as_vector(),
|
||||
*p4_port1_remote_orifice_derivative_2.as_vector(),
|
||||
*p4_port3_derivative.as_vector(),
|
||||
@@ -1624,6 +1787,7 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
*p4_port3_far_port3_derivative.as_vector(),
|
||||
*p4_port3_next_primary_derivative.as_vector(),
|
||||
*p4_port3_next_chamber_derivative.as_vector(),
|
||||
*p4_port3_next_port3_derivative.as_vector(),
|
||||
*p4_port3_remote_resistance_derivative_1.as_vector(),
|
||||
*p4_port3_remote_resistance_derivative_2.as_vector(),
|
||||
*p4_port3_remote_orifice_derivative_1.as_vector(),
|
||||
|
||||
Reference in new issue
Block a user