接入test_mql P4环网剩余管路
This commit is contained in:
1 parent
8c8b4f26e9
commit
f74b414b24
3 files changed
+388
-22
No files matched your search
@@ -207,6 +207,10 @@ class TestMqlPn3P4NodeChamberSegmentComponents:
|
||||
p4_port1_far_node: TestMqlPneumaticNode4
|
||||
p4_port1_far_primary_line: AmesimPnl0001Pipe
|
||||
p4_port1_far_primary_chamber: AmesimPneumaticVolume
|
||||
p4_port1_far_port1_line: AmesimPnl0002Pipe
|
||||
p4_port1_next_node: TestMqlPneumaticNode4
|
||||
p4_port1_next_primary_line: AmesimPnl0001Pipe
|
||||
p4_port1_next_primary_chamber: AmesimPneumaticVolume
|
||||
p4_port1_remote_orifice: AmesimPneumaticOrifice
|
||||
p4_port1_remote_orifice_line: AmesimPnl0003Pipe
|
||||
p4_port1_remote_orifice_node: TestMqlPneumaticNode3
|
||||
@@ -218,6 +222,10 @@ class TestMqlPn3P4NodeChamberSegmentComponents:
|
||||
p4_port3_far_node: TestMqlPneumaticNode4
|
||||
p4_port3_far_primary_line: AmesimPnl0001Pipe
|
||||
p4_port3_far_primary_chamber: AmesimPneumaticVolume
|
||||
p4_port3_far_port3_line: AmesimPnl0002Pipe
|
||||
p4_port3_next_node: TestMqlPneumaticNode4
|
||||
p4_port3_next_primary_line: AmesimPnl0001Pipe
|
||||
p4_port3_next_primary_chamber: AmesimPneumaticVolume
|
||||
p4_port3_remote_orifice: AmesimPneumaticOrifice
|
||||
p4_port3_remote_orifice_line: AmesimPnl0003Pipe
|
||||
p4_port3_remote_orifice_node: TestMqlPneumaticNode3
|
||||
@@ -244,6 +252,9 @@ class TestMqlPn3P4NodeChamberSegmentSnapshot:
|
||||
p4_port1_remote_port1_line: ThermodynamicProperties
|
||||
p4_port1_far_primary_line: ThermodynamicProperties
|
||||
p4_port1_far_primary_chamber: ThermodynamicProperties
|
||||
p4_port1_far_port1_line: ThermodynamicProperties
|
||||
p4_port1_next_primary_line: ThermodynamicProperties
|
||||
p4_port1_next_primary_chamber: ThermodynamicProperties
|
||||
p4_port1_remote_orifice_line_port_1: ThermodynamicProperties
|
||||
p4_port1_remote_orifice_line_port_2: ThermodynamicProperties
|
||||
p4_port3_line: ThermodynamicProperties
|
||||
@@ -252,6 +263,9 @@ class TestMqlPn3P4NodeChamberSegmentSnapshot:
|
||||
p4_port3_remote_port3_line: ThermodynamicProperties
|
||||
p4_port3_far_primary_line: ThermodynamicProperties
|
||||
p4_port3_far_primary_chamber: ThermodynamicProperties
|
||||
p4_port3_far_port3_line: ThermodynamicProperties
|
||||
p4_port3_next_primary_line: ThermodynamicProperties
|
||||
p4_port3_next_primary_chamber: ThermodynamicProperties
|
||||
p4_port3_remote_orifice_line_port_1: ThermodynamicProperties
|
||||
p4_port3_remote_orifice_line_port_2: ThermodynamicProperties
|
||||
inlet_node: ThermodynamicProperties
|
||||
@@ -260,9 +274,11 @@ class TestMqlPn3P4NodeChamberSegmentSnapshot:
|
||||
p4_balance: TestMqlPneumaticNode4Balance
|
||||
p4_port1_remote_balance: TestMqlPneumaticNode4Balance
|
||||
p4_port1_far_balance: TestMqlPneumaticNode4Balance
|
||||
p4_port1_next_balance: TestMqlPneumaticNode4Balance
|
||||
p4_port1_remote_orifice_node_balance: TestMqlPneumaticNode3Balance
|
||||
p4_port3_remote_balance: TestMqlPneumaticNode4Balance
|
||||
p4_port3_far_balance: TestMqlPneumaticNode4Balance
|
||||
p4_port3_next_balance: TestMqlPneumaticNode4Balance
|
||||
p4_port3_remote_orifice_node_balance: TestMqlPneumaticNode3Balance
|
||||
inlet_node_to_line_flow: float
|
||||
inlet_line_to_chamber_flow: float
|
||||
@@ -282,6 +298,10 @@ class TestMqlPn3P4NodeChamberSegmentSnapshot:
|
||||
p4_port1_far_node_to_line_flow: float
|
||||
p4_port1_far_chamber_to_line_flow: float
|
||||
p4_port1_far_node_to_primary_line_flow: float
|
||||
p4_port1_far_to_next_line_flow: float
|
||||
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_remote_node_to_orifice_line_flow: float
|
||||
p4_port1_remote_orifice_line_center_flow: float
|
||||
p4_port1_remote_orifice_to_node_flow: float
|
||||
@@ -293,6 +313,10 @@ class TestMqlPn3P4NodeChamberSegmentSnapshot:
|
||||
p4_port3_far_node_to_line_flow: float
|
||||
p4_port3_far_chamber_to_line_flow: float
|
||||
p4_port3_far_node_to_primary_line_flow: float
|
||||
p4_port3_far_to_next_line_flow: float
|
||||
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_port3_remote_node_to_orifice_line_flow: float
|
||||
p4_port3_remote_node_to_resistance_flow: float
|
||||
p4_port3_remote_orifice_line_center_flow: float
|
||||
@@ -332,6 +356,9 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
*self.components.p4_port1_remote_port1_line.get_state_vector(),
|
||||
*self.components.p4_port1_far_primary_line.get_state_vector(),
|
||||
*self.components.p4_port1_far_primary_chamber.get_state_vector(),
|
||||
*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_remote_orifice_line.get_state_vector(),
|
||||
*self.components.p4_port3_line.get_state_vector(),
|
||||
*self.components.p4_port3_remote_primary_line.get_state_vector(),
|
||||
@@ -339,12 +366,15 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
*self.components.p4_port3_remote_port3_line.get_state_vector(),
|
||||
*self.components.p4_port3_far_primary_line.get_state_vector(),
|
||||
*self.components.p4_port3_far_primary_chamber.get_state_vector(),
|
||||
*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_remote_orifice_line.get_state_vector(),
|
||||
]
|
||||
|
||||
def apply_state_vector(self, values: list[float]) -> None:
|
||||
if len(values) != 46:
|
||||
raise ValueError("PN3/P4 node chamber segment state vector requires forty-six values")
|
||||
if len(values) != 58:
|
||||
raise ValueError("PN3/P4 node chamber segment state vector requires fifty-eight 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])
|
||||
@@ -357,14 +387,20 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
self.components.p4_port1_remote_port1_line.set_state_vector(values[20:22])
|
||||
self.components.p4_port1_far_primary_line.set_state_vector(values[22:24])
|
||||
self.components.p4_port1_far_primary_chamber.set_state_vector(values[24:26])
|
||||
self.components.p4_port1_remote_orifice_line.set_state_vector(values[26:30])
|
||||
self.components.p4_port3_line.set_state_vector(values[30:32])
|
||||
self.components.p4_port3_remote_primary_line.set_state_vector(values[32:34])
|
||||
self.components.p4_port3_remote_primary_chamber.set_state_vector(values[34:36])
|
||||
self.components.p4_port3_remote_port3_line.set_state_vector(values[36:38])
|
||||
self.components.p4_port3_far_primary_line.set_state_vector(values[38:40])
|
||||
self.components.p4_port3_far_primary_chamber.set_state_vector(values[40:42])
|
||||
self.components.p4_port3_remote_orifice_line.set_state_vector(values[42:])
|
||||
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_orifice_line.set_state_vector(values[54:])
|
||||
|
||||
def snapshot(
|
||||
self,
|
||||
@@ -393,6 +429,11 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port1_far_primary_chamber = (
|
||||
self.components.p4_port1_far_primary_chamber.properties()
|
||||
)
|
||||
p4_port1_far_port1_line = self.components.p4_port1_far_port1_line.properties()
|
||||
p4_port1_next_primary_line = self.components.p4_port1_next_primary_line.properties()
|
||||
p4_port1_next_primary_chamber = (
|
||||
self.components.p4_port1_next_primary_chamber.properties()
|
||||
)
|
||||
p4_port1_remote_orifice_line_port_1 = (
|
||||
self.components.p4_port1_remote_orifice_line.properties_1()
|
||||
)
|
||||
@@ -413,6 +454,11 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port3_far_primary_chamber = (
|
||||
self.components.p4_port3_far_primary_chamber.properties()
|
||||
)
|
||||
p4_port3_far_port3_line = self.components.p4_port3_far_port3_line.properties()
|
||||
p4_port3_next_primary_line = self.components.p4_port3_next_primary_line.properties()
|
||||
p4_port3_next_primary_chamber = (
|
||||
self.components.p4_port3_next_primary_chamber.properties()
|
||||
)
|
||||
p4_port3_remote_orifice_line_port_1 = (
|
||||
self.components.p4_port3_remote_orifice_line.properties_1()
|
||||
)
|
||||
@@ -511,6 +557,24 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
port_1_temperature_k=p4_port1_far_primary_chamber.T,
|
||||
)
|
||||
)
|
||||
p4_port1_far_to_next_line_flow = (
|
||||
self.components.p4_port1_far_port1_line.port_mass_flow(
|
||||
port_pressure_pa=p4_port1_far_primary_line.p,
|
||||
port_temperature_k=p4_port1_far_primary_line.T,
|
||||
)
|
||||
)
|
||||
p4_port1_next_node_to_line_flow = (
|
||||
self.components.p4_port1_far_port1_line.port_mass_flow(
|
||||
port_pressure_pa=p4_port1_next_primary_line.p,
|
||||
port_temperature_k=p4_port1_next_primary_line.T,
|
||||
)
|
||||
)
|
||||
p4_port1_next_chamber_to_line_flow = (
|
||||
self.components.p4_port1_next_primary_line.resistance_mass_flow(
|
||||
port_1_pressure_pa=p4_port1_next_primary_chamber.p,
|
||||
port_1_temperature_k=p4_port1_next_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,
|
||||
@@ -565,6 +629,24 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
port_1_temperature_k=p4_port3_far_primary_chamber.T,
|
||||
)
|
||||
)
|
||||
p4_port3_far_to_next_line_flow = (
|
||||
self.components.p4_port3_far_port3_line.port_mass_flow(
|
||||
port_pressure_pa=p4_port3_far_primary_line.p,
|
||||
port_temperature_k=p4_port3_far_primary_line.T,
|
||||
)
|
||||
)
|
||||
p4_port3_next_node_to_line_flow = (
|
||||
self.components.p4_port3_far_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_next_chamber_to_line_flow = (
|
||||
self.components.p4_port3_next_primary_line.resistance_mass_flow(
|
||||
port_1_pressure_pa=p4_port3_next_primary_chamber.p,
|
||||
port_1_temperature_k=p4_port3_next_primary_chamber.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,
|
||||
@@ -667,8 +749,12 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port1_far_balance = self.components.p4_port1_far_node.balance(
|
||||
port_2_temperature_k=p4_port1_far_primary_line.T,
|
||||
port_2_pressure_pa=p4_port1_far_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_far_to_next_line_flow,
|
||||
node_h=p4_port1_far_primary_line.h,
|
||||
connected_h=p4_port1_far_port1_line.h,
|
||||
),
|
||||
port_1_mass_flow_g_s=-p4_port1_far_to_next_line_flow * 1.0e3,
|
||||
port_3_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||
flow_kg_s=p4_port1_far_node_to_line_flow,
|
||||
node_h=p4_port1_far_primary_line.h,
|
||||
@@ -681,6 +767,23 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port1_far_node_to_primary_line_flow = (
|
||||
p4_port1_far_balance.port_2_mass_flow_g_s * 1.0e-3
|
||||
)
|
||||
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_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,
|
||||
connected_h=p4_port1_far_port1_line.h,
|
||||
),
|
||||
port_3_mass_flow_g_s=-p4_port1_next_node_to_line_flow * 1.0e3,
|
||||
port_4_enthalpy_flow_w=0.0,
|
||||
port_4_mass_flow_g_s=0.0,
|
||||
)
|
||||
p4_port1_next_node_to_primary_line_flow = (
|
||||
p4_port1_next_balance.port_2_mass_flow_g_s * 1.0e-3
|
||||
)
|
||||
p4_port3_remote_balance = self.components.p4_port3_remote_node.balance(
|
||||
port_2_temperature_k=p4_port3_remote_primary_line.T,
|
||||
port_2_pressure_pa=p4_port3_remote_primary_line.p,
|
||||
@@ -715,14 +818,35 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
connected_h=p4_port3_remote_port3_line.h,
|
||||
),
|
||||
port_1_mass_flow_g_s=-p4_port3_far_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_far_to_next_line_flow,
|
||||
node_h=p4_port3_far_primary_line.h,
|
||||
connected_h=p4_port3_far_port3_line.h,
|
||||
),
|
||||
port_3_mass_flow_g_s=-p4_port3_far_to_next_line_flow * 1.0e3,
|
||||
port_4_enthalpy_flow_w=0.0,
|
||||
port_4_mass_flow_g_s=0.0,
|
||||
)
|
||||
p4_port3_far_node_to_primary_line_flow = (
|
||||
p4_port3_far_balance.port_2_mass_flow_g_s * 1.0e-3
|
||||
)
|
||||
p4_port3_next_balance = self.components.p4_port3_next_node.balance(
|
||||
port_2_temperature_k=p4_port3_next_primary_line.T,
|
||||
port_2_pressure_pa=p4_port3_next_primary_line.p,
|
||||
port_1_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||
flow_kg_s=p4_port3_next_node_to_line_flow,
|
||||
node_h=p4_port3_next_primary_line.h,
|
||||
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_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
|
||||
)
|
||||
|
||||
snapshot = TestMqlPn3P4NodeChamberSegmentSnapshot(
|
||||
inlet_line=inlet_line,
|
||||
@@ -739,6 +863,9 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port1_remote_port1_line=p4_port1_remote_port1_line,
|
||||
p4_port1_far_primary_line=p4_port1_far_primary_line,
|
||||
p4_port1_far_primary_chamber=p4_port1_far_primary_chamber,
|
||||
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_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,
|
||||
@@ -747,6 +874,9 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port3_remote_port3_line=p4_port3_remote_port3_line,
|
||||
p4_port3_far_primary_line=p4_port3_far_primary_line,
|
||||
p4_port3_far_primary_chamber=p4_port3_far_primary_chamber,
|
||||
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_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,
|
||||
inlet_node=inlet_node,
|
||||
@@ -755,9 +885,11 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_balance=p4_balance,
|
||||
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_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,
|
||||
p4_port3_next_balance=p4_port3_next_balance,
|
||||
p4_port3_remote_orifice_node_balance=p4_port3_remote_orifice_node_balance,
|
||||
inlet_node_to_line_flow=inlet_node_to_line_flow,
|
||||
inlet_line_to_chamber_flow=inlet_line_to_chamber_flow,
|
||||
@@ -781,6 +913,12 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port1_far_node_to_primary_line_flow=(
|
||||
p4_port1_far_node_to_primary_line_flow
|
||||
),
|
||||
p4_port1_far_to_next_line_flow=p4_port1_far_to_next_line_flow,
|
||||
p4_port1_next_node_to_line_flow=p4_port1_next_node_to_line_flow,
|
||||
p4_port1_next_chamber_to_line_flow=p4_port1_next_chamber_to_line_flow,
|
||||
p4_port1_next_node_to_primary_line_flow=(
|
||||
p4_port1_next_node_to_primary_line_flow
|
||||
),
|
||||
p4_port1_remote_node_to_orifice_line_flow=(
|
||||
p4_port1_remote_node_to_orifice_line_flow
|
||||
),
|
||||
@@ -800,6 +938,12 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port3_far_node_to_primary_line_flow=(
|
||||
p4_port3_far_node_to_primary_line_flow
|
||||
),
|
||||
p4_port3_far_to_next_line_flow=p4_port3_far_to_next_line_flow,
|
||||
p4_port3_next_node_to_line_flow=p4_port3_next_node_to_line_flow,
|
||||
p4_port3_next_chamber_to_line_flow=p4_port3_next_chamber_to_line_flow,
|
||||
p4_port3_next_node_to_primary_line_flow=(
|
||||
p4_port3_next_node_to_primary_line_flow
|
||||
),
|
||||
p4_port3_remote_node_to_orifice_line_flow=(
|
||||
p4_port3_remote_node_to_orifice_line_flow
|
||||
),
|
||||
@@ -1003,6 +1147,27 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port1_far_primary_chamber.port_a.m_flow = -snapshot.p4_port1_far_chamber_to_line_flow
|
||||
p4_port1_far_primary_chamber.port_a.h_outflow = snapshot.p4_port1_far_primary_chamber.h
|
||||
|
||||
p4_port1_far_port1_line = self.components.p4_port1_far_port1_line
|
||||
p4_port1_far_port1_line.port_1.p = snapshot.p4_port1_far_primary_line.p
|
||||
p4_port1_far_port1_line.port_1.m_flow = snapshot.p4_port1_far_to_next_line_flow
|
||||
p4_port1_far_port1_line.port_1.h_outflow = snapshot.p4_port1_far_port1_line.h
|
||||
p4_port1_far_port1_line.port_2.p = snapshot.p4_port1_next_primary_line.p
|
||||
p4_port1_far_port1_line.port_2.m_flow = snapshot.p4_port1_next_node_to_line_flow
|
||||
p4_port1_far_port1_line.port_2.h_outflow = snapshot.p4_port1_far_port1_line.h
|
||||
|
||||
p4_port1_next_primary_line = self.components.p4_port1_next_primary_line
|
||||
p4_port1_next_primary_line.port_1.p = snapshot.p4_port1_next_primary_chamber.p
|
||||
p4_port1_next_primary_line.port_1.m_flow = snapshot.p4_port1_next_chamber_to_line_flow
|
||||
p4_port1_next_primary_line.port_1.h_outflow = snapshot.p4_port1_next_primary_line.h
|
||||
p4_port1_next_primary_line.port_2.p = snapshot.p4_port1_next_primary_line.p
|
||||
p4_port1_next_primary_line.port_2.m_flow = snapshot.p4_port1_next_node_to_primary_line_flow
|
||||
p4_port1_next_primary_line.port_2.h_outflow = snapshot.p4_port1_next_primary_line.h
|
||||
|
||||
p4_port1_next_primary_chamber = self.components.p4_port1_next_primary_chamber
|
||||
p4_port1_next_primary_chamber.port_a.p = snapshot.p4_port1_next_primary_chamber.p
|
||||
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_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
|
||||
@@ -1079,6 +1244,27 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
p4_port3_far_primary_chamber.port_a.m_flow = -snapshot.p4_port3_far_chamber_to_line_flow
|
||||
p4_port3_far_primary_chamber.port_a.h_outflow = snapshot.p4_port3_far_primary_chamber.h
|
||||
|
||||
p4_port3_far_port3_line = self.components.p4_port3_far_port3_line
|
||||
p4_port3_far_port3_line.port_1.p = snapshot.p4_port3_next_primary_line.p
|
||||
p4_port3_far_port3_line.port_1.m_flow = snapshot.p4_port3_next_node_to_line_flow
|
||||
p4_port3_far_port3_line.port_1.h_outflow = snapshot.p4_port3_far_port3_line.h
|
||||
p4_port3_far_port3_line.port_2.p = snapshot.p4_port3_far_primary_line.p
|
||||
p4_port3_far_port3_line.port_2.m_flow = snapshot.p4_port3_far_to_next_line_flow
|
||||
p4_port3_far_port3_line.port_2.h_outflow = snapshot.p4_port3_far_port3_line.h
|
||||
|
||||
p4_port3_next_primary_line = self.components.p4_port3_next_primary_line
|
||||
p4_port3_next_primary_line.port_1.p = snapshot.p4_port3_next_primary_chamber.p
|
||||
p4_port3_next_primary_line.port_1.m_flow = snapshot.p4_port3_next_chamber_to_line_flow
|
||||
p4_port3_next_primary_line.port_1.h_outflow = snapshot.p4_port3_next_primary_line.h
|
||||
p4_port3_next_primary_line.port_2.p = snapshot.p4_port3_next_primary_line.p
|
||||
p4_port3_next_primary_line.port_2.m_flow = snapshot.p4_port3_next_node_to_primary_line_flow
|
||||
p4_port3_next_primary_line.port_2.h_outflow = snapshot.p4_port3_next_primary_line.h
|
||||
|
||||
p4_port3_next_primary_chamber = self.components.p4_port3_next_primary_chamber
|
||||
p4_port3_next_primary_chamber.port_a.p = snapshot.p4_port3_next_primary_chamber.p
|
||||
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_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
|
||||
@@ -1207,6 +1393,31 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
internal_h=snapshot.p4_port1_far_primary_chamber.h,
|
||||
)
|
||||
)
|
||||
p4_port1_far_port1_derivative = (
|
||||
self.components.p4_port1_far_port1_line.derivatives_from_connections(
|
||||
port_1_m_flow=snapshot.p4_port1_far_to_next_line_flow,
|
||||
connected_h_1=snapshot.p4_port1_far_primary_line.h,
|
||||
port_2_m_flow=snapshot.p4_port1_next_node_to_line_flow,
|
||||
connected_h_2=snapshot.p4_port1_next_primary_line.h,
|
||||
)
|
||||
)
|
||||
p4_port1_next_primary_derivative = (
|
||||
self.components.p4_port1_next_primary_line.derivatives_from_connections(
|
||||
port_1_m_flow=snapshot.p4_port1_next_chamber_to_line_flow,
|
||||
connected_h_1=snapshot.p4_port1_next_primary_chamber.h,
|
||||
port_2_m_flow=snapshot.p4_port1_next_node_to_primary_line_flow,
|
||||
connected_h_2=snapshot.p4_port1_next_primary_line.h,
|
||||
)
|
||||
)
|
||||
p4_port1_next_chamber_derivative = (
|
||||
self.components.p4_port1_next_primary_chamber.derivatives_from_two_connections(
|
||||
port_a_m_flow=-snapshot.p4_port1_next_chamber_to_line_flow,
|
||||
connected_h_a=snapshot.p4_port1_next_primary_line.h,
|
||||
port_b_m_flow=0.0,
|
||||
connected_h_b=snapshot.p4_port1_next_primary_chamber.h,
|
||||
internal_h=snapshot.p4_port1_next_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,
|
||||
@@ -1263,6 +1474,31 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
internal_h=snapshot.p4_port3_far_primary_chamber.h,
|
||||
)
|
||||
)
|
||||
p4_port3_far_port3_derivative = (
|
||||
self.components.p4_port3_far_port3_line.derivatives_from_connections(
|
||||
port_1_m_flow=snapshot.p4_port3_next_node_to_line_flow,
|
||||
connected_h_1=snapshot.p4_port3_next_primary_line.h,
|
||||
port_2_m_flow=snapshot.p4_port3_far_to_next_line_flow,
|
||||
connected_h_2=snapshot.p4_port3_far_primary_line.h,
|
||||
)
|
||||
)
|
||||
p4_port3_next_primary_derivative = (
|
||||
self.components.p4_port3_next_primary_line.derivatives_from_connections(
|
||||
port_1_m_flow=snapshot.p4_port3_next_chamber_to_line_flow,
|
||||
connected_h_1=snapshot.p4_port3_next_primary_chamber.h,
|
||||
port_2_m_flow=snapshot.p4_port3_next_node_to_primary_line_flow,
|
||||
connected_h_2=snapshot.p4_port3_next_primary_line.h,
|
||||
)
|
||||
)
|
||||
p4_port3_next_chamber_derivative = (
|
||||
self.components.p4_port3_next_primary_chamber.derivatives_from_two_connections(
|
||||
port_a_m_flow=-snapshot.p4_port3_next_chamber_to_line_flow,
|
||||
connected_h_a=snapshot.p4_port3_next_primary_line.h,
|
||||
port_b_m_flow=0.0,
|
||||
connected_h_b=snapshot.p4_port3_next_primary_chamber.h,
|
||||
internal_h=snapshot.p4_port3_next_primary_chamber.h,
|
||||
)
|
||||
)
|
||||
p4_port3_remote_orifice_derivative_1, p4_port3_remote_orifice_derivative_2 = (
|
||||
self.components.p4_port3_remote_orifice_line.derivatives_from_connections(
|
||||
port_1_m_flow=snapshot.p4_port3_remote_node_to_orifice_line_flow,
|
||||
@@ -1285,6 +1521,9 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
*p4_port1_remote_port1_derivative.as_vector(),
|
||||
*p4_port1_far_primary_derivative.as_vector(),
|
||||
*p4_port1_far_chamber_derivative.as_vector(),
|
||||
*p4_port1_far_port1_derivative.as_vector(),
|
||||
*p4_port1_next_primary_derivative.as_vector(),
|
||||
*p4_port1_next_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(),
|
||||
@@ -1293,6 +1532,9 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
*p4_port3_remote_port3_derivative.as_vector(),
|
||||
*p4_port3_far_primary_derivative.as_vector(),
|
||||
*p4_port3_far_chamber_derivative.as_vector(),
|
||||
*p4_port3_far_port3_derivative.as_vector(),
|
||||
*p4_port3_next_primary_derivative.as_vector(),
|
||||
*p4_port3_next_chamber_derivative.as_vector(),
|
||||
*p4_port3_remote_orifice_derivative_1.as_vector(),
|
||||
*p4_port3_remote_orifice_derivative_2.as_vector(),
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user