抽象test_mql双状态连接线闭包逻辑
This commit is contained in:
1 parent
13f37bfd0f
commit
cf33d445a2
1 file changed
+148
-104
@@ -1944,6 +1944,38 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
connected_h_2=port_2_properties.h,
|
connected_h_2=port_2_properties.h,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _write_two_state_connection_line(
|
||||||
|
*,
|
||||||
|
line: AmesimPnl0003Pipe,
|
||||||
|
port_1_properties: ThermodynamicProperties,
|
||||||
|
port_1_flow: float,
|
||||||
|
port_2_properties: ThermodynamicProperties,
|
||||||
|
port_2_flow: float,
|
||||||
|
) -> None:
|
||||||
|
line.port_1.p = port_1_properties.p
|
||||||
|
line.port_1.m_flow = port_1_flow
|
||||||
|
line.port_1.h_outflow = port_1_properties.h
|
||||||
|
line.port_2.p = port_2_properties.p
|
||||||
|
line.port_2.m_flow = port_2_flow
|
||||||
|
line.port_2.h_outflow = port_2_properties.h
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _two_state_connection_line_derivatives(
|
||||||
|
*,
|
||||||
|
line: AmesimPnl0003Pipe,
|
||||||
|
port_1_properties: ThermodynamicProperties,
|
||||||
|
port_1_flow: float,
|
||||||
|
port_2_connected_properties: ThermodynamicProperties,
|
||||||
|
port_2_flow: float,
|
||||||
|
) -> tuple[VolumeState, VolumeState]:
|
||||||
|
return line.derivatives_from_connections(
|
||||||
|
port_1_m_flow=port_1_flow,
|
||||||
|
connected_h_1=port_1_properties.h,
|
||||||
|
port_2_m_flow=port_2_flow,
|
||||||
|
connected_h_2=port_2_connected_properties.h,
|
||||||
|
)
|
||||||
|
|
||||||
def _write_port_states(
|
def _write_port_states(
|
||||||
self,
|
self,
|
||||||
snapshot: TestMqlPn3P4NodeChamberSegmentSnapshot,
|
snapshot: TestMqlPn3P4NodeChamberSegmentSnapshot,
|
||||||
@@ -1966,13 +1998,13 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
outlet_orifice=self.components.outlet_orifice,
|
outlet_orifice=self.components.outlet_orifice,
|
||||||
)
|
)
|
||||||
|
|
||||||
node_line = self.components.node_line
|
self._write_two_state_connection_line(
|
||||||
node_line.port_1.p = snapshot.node_line_port_1.p
|
line=self.components.node_line,
|
||||||
node_line.port_1.m_flow = snapshot.node_to_pnl0003_flow
|
port_1_properties=snapshot.node_line_port_1,
|
||||||
node_line.port_1.h_outflow = snapshot.node_line_port_1.h
|
port_1_flow=snapshot.node_to_pnl0003_flow,
|
||||||
node_line.port_2.p = snapshot.node_line_port_2.p
|
port_2_properties=snapshot.node_line_port_2,
|
||||||
node_line.port_2.m_flow = -snapshot.pnl0003_to_p4_flow
|
port_2_flow=-snapshot.pnl0003_to_p4_flow,
|
||||||
node_line.port_2.h_outflow = snapshot.node_line_port_2.h
|
)
|
||||||
|
|
||||||
node_orifice = self.components.node_orifice
|
node_orifice = self.components.node_orifice
|
||||||
node_orifice.port_a.p = snapshot.node_line_port_2.p
|
node_orifice.port_a.p = snapshot.node_line_port_2.p
|
||||||
@@ -2062,13 +2094,13 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
port_2_flow=snapshot.p4_bridge_to_port1_next_line_flow,
|
port_2_flow=snapshot.p4_bridge_to_port1_next_line_flow,
|
||||||
)
|
)
|
||||||
|
|
||||||
p4_port1_next_orifice_line = self.components.p4_port1_next_orifice_line
|
self._write_two_state_connection_line(
|
||||||
p4_port1_next_orifice_line.port_1.p = snapshot.p4_port1_next_orifice_line_port_1.p
|
line=self.components.p4_port1_next_orifice_line,
|
||||||
p4_port1_next_orifice_line.port_1.m_flow = snapshot.p4_port1_next_orifice_node_to_line_flow
|
port_1_properties=snapshot.p4_port1_next_orifice_line_port_1,
|
||||||
p4_port1_next_orifice_line.port_1.h_outflow = snapshot.p4_port1_next_orifice_line_port_1.h
|
port_1_flow=snapshot.p4_port1_next_orifice_node_to_line_flow,
|
||||||
p4_port1_next_orifice_line.port_2.p = snapshot.p4_port1_next_orifice_line_port_2.p
|
port_2_properties=snapshot.p4_port1_next_orifice_line_port_2,
|
||||||
p4_port1_next_orifice_line.port_2.m_flow = -snapshot.p4_port1_next_orifice_to_output_line_flow
|
port_2_flow=-snapshot.p4_port1_next_orifice_to_output_line_flow,
|
||||||
p4_port1_next_orifice_line.port_2.h_outflow = snapshot.p4_port1_next_orifice_line_port_2.h
|
)
|
||||||
|
|
||||||
p4_port1_next_orifice = self.components.p4_port1_next_orifice
|
p4_port1_next_orifice = self.components.p4_port1_next_orifice
|
||||||
p4_port1_next_orifice.port_a.p = snapshot.p4_port1_next_orifice_line_port_2.p
|
p4_port1_next_orifice.port_a.p = snapshot.p4_port1_next_orifice_line_port_2.p
|
||||||
@@ -2094,13 +2126,13 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
p4_port1_next_orifice_resistance.port_2.m_flow = -snapshot.p4_port1_next_orifice_resistance_node_to_next_flow
|
p4_port1_next_orifice_resistance.port_2.m_flow = -snapshot.p4_port1_next_orifice_resistance_node_to_next_flow
|
||||||
p4_port1_next_orifice_resistance.port_2.h_outflow = snapshot.p4_port1_next_orifice_line_port_1.h
|
p4_port1_next_orifice_resistance.port_2.h_outflow = snapshot.p4_port1_next_orifice_line_port_1.h
|
||||||
|
|
||||||
p4_port1_next_orifice_resistance_line = self.components.p4_port1_next_orifice_resistance_line
|
self._write_two_state_connection_line(
|
||||||
p4_port1_next_orifice_resistance_line.port_1.p = snapshot.p4_port1_next_orifice_resistance_line_port_1.p
|
line=self.components.p4_port1_next_orifice_resistance_line,
|
||||||
p4_port1_next_orifice_resistance_line.port_1.m_flow = snapshot.p4_port1_next_orifice_resistance_node_to_line_flow
|
port_1_properties=snapshot.p4_port1_next_orifice_resistance_line_port_1,
|
||||||
p4_port1_next_orifice_resistance_line.port_1.h_outflow = snapshot.p4_port1_next_orifice_resistance_line_port_1.h
|
port_1_flow=snapshot.p4_port1_next_orifice_resistance_node_to_line_flow,
|
||||||
p4_port1_next_orifice_resistance_line.port_2.p = snapshot.p4_port1_next_orifice_resistance_line_port_2.p
|
port_2_properties=snapshot.p4_port1_next_orifice_resistance_line_port_2,
|
||||||
p4_port1_next_orifice_resistance_line.port_2.m_flow = -snapshot.p4_port1_next_orifice_resistance_to_p4_flow
|
port_2_flow=-snapshot.p4_port1_next_orifice_resistance_to_p4_flow,
|
||||||
p4_port1_next_orifice_resistance_line.port_2.h_outflow = snapshot.p4_port1_next_orifice_resistance_line_port_2.h
|
)
|
||||||
|
|
||||||
p4_port1_next_orifice_resistance_orifice = self.components.p4_port1_next_orifice_resistance_orifice
|
p4_port1_next_orifice_resistance_orifice = self.components.p4_port1_next_orifice_resistance_orifice
|
||||||
p4_port1_next_orifice_resistance_orifice.port_a.p = snapshot.p4_port1_next_orifice_resistance_line_port_2.p
|
p4_port1_next_orifice_resistance_orifice.port_a.p = snapshot.p4_port1_next_orifice_resistance_line_port_2.p
|
||||||
@@ -2157,13 +2189,13 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
node_to_line_flow=snapshot.p4_bridge_node_to_primary_line_flow,
|
node_to_line_flow=snapshot.p4_bridge_node_to_primary_line_flow,
|
||||||
)
|
)
|
||||||
|
|
||||||
p4_port1_remote_orifice_line = self.components.p4_port1_remote_orifice_line
|
self._write_two_state_connection_line(
|
||||||
p4_port1_remote_orifice_line.port_1.p = snapshot.p4_port1_remote_orifice_line_port_1.p
|
line=self.components.p4_port1_remote_orifice_line,
|
||||||
p4_port1_remote_orifice_line.port_1.m_flow = snapshot.p4_port1_remote_node_to_orifice_line_flow
|
port_1_properties=snapshot.p4_port1_remote_orifice_line_port_1,
|
||||||
p4_port1_remote_orifice_line.port_1.h_outflow = snapshot.p4_port1_remote_orifice_line_port_1.h
|
port_1_flow=snapshot.p4_port1_remote_node_to_orifice_line_flow,
|
||||||
p4_port1_remote_orifice_line.port_2.p = snapshot.p4_port1_remote_orifice_line_port_2.p
|
port_2_properties=snapshot.p4_port1_remote_orifice_line_port_2,
|
||||||
p4_port1_remote_orifice_line.port_2.m_flow = -snapshot.p4_port1_remote_orifice_to_node_flow
|
port_2_flow=-snapshot.p4_port1_remote_orifice_to_node_flow,
|
||||||
p4_port1_remote_orifice_line.port_2.h_outflow = snapshot.p4_port1_remote_orifice_line_port_2.h
|
)
|
||||||
|
|
||||||
p4_port1_remote_orifice = self.components.p4_port1_remote_orifice
|
p4_port1_remote_orifice = self.components.p4_port1_remote_orifice
|
||||||
p4_port1_remote_orifice.port_a.p = snapshot.p4_port1_remote_orifice_line_port_2.p
|
p4_port1_remote_orifice.port_a.p = snapshot.p4_port1_remote_orifice_line_port_2.p
|
||||||
@@ -2236,13 +2268,13 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
port_2_flow=snapshot.p4_port3_next_to_bridge_line_flow,
|
port_2_flow=snapshot.p4_port3_next_to_bridge_line_flow,
|
||||||
)
|
)
|
||||||
|
|
||||||
p4_port3_next_orifice_line = self.components.p4_port3_next_orifice_line
|
self._write_two_state_connection_line(
|
||||||
p4_port3_next_orifice_line.port_1.p = snapshot.p4_port3_next_orifice_line_port_1.p
|
line=self.components.p4_port3_next_orifice_line,
|
||||||
p4_port3_next_orifice_line.port_1.m_flow = snapshot.p4_port3_next_orifice_node_to_line_flow
|
port_1_properties=snapshot.p4_port3_next_orifice_line_port_1,
|
||||||
p4_port3_next_orifice_line.port_1.h_outflow = snapshot.p4_port3_next_orifice_line_port_1.h
|
port_1_flow=snapshot.p4_port3_next_orifice_node_to_line_flow,
|
||||||
p4_port3_next_orifice_line.port_2.p = snapshot.p4_port3_next_orifice_line_port_2.p
|
port_2_properties=snapshot.p4_port3_next_orifice_line_port_2,
|
||||||
p4_port3_next_orifice_line.port_2.m_flow = -snapshot.p4_port3_next_orifice_to_output_line_flow
|
port_2_flow=-snapshot.p4_port3_next_orifice_to_output_line_flow,
|
||||||
p4_port3_next_orifice_line.port_2.h_outflow = snapshot.p4_port3_next_orifice_line_port_2.h
|
)
|
||||||
|
|
||||||
p4_port3_next_orifice = self.components.p4_port3_next_orifice
|
p4_port3_next_orifice = self.components.p4_port3_next_orifice
|
||||||
p4_port3_next_orifice.port_a.p = snapshot.p4_port3_next_orifice_line_port_2.p
|
p4_port3_next_orifice.port_a.p = snapshot.p4_port3_next_orifice_line_port_2.p
|
||||||
@@ -2294,13 +2326,13 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
p4_port3_next_orifice_resistance.port_2.m_flow = -snapshot.p4_port3_next_resistance_node_to_next_flow
|
p4_port3_next_orifice_resistance.port_2.m_flow = -snapshot.p4_port3_next_resistance_node_to_next_flow
|
||||||
p4_port3_next_orifice_resistance.port_2.h_outflow = snapshot.p4_port3_next_orifice_line_port_1.h
|
p4_port3_next_orifice_resistance.port_2.h_outflow = snapshot.p4_port3_next_orifice_line_port_1.h
|
||||||
|
|
||||||
p4_port3_next_resistance_node_line = self.components.p4_port3_next_resistance_node_line
|
self._write_two_state_connection_line(
|
||||||
p4_port3_next_resistance_node_line.port_1.p = snapshot.p4_port3_next_resistance_node_line_port_1.p
|
line=self.components.p4_port3_next_resistance_node_line,
|
||||||
p4_port3_next_resistance_node_line.port_1.m_flow = snapshot.p4_port3_next_resistance_node_to_line_flow
|
port_1_properties=snapshot.p4_port3_next_resistance_node_line_port_1,
|
||||||
p4_port3_next_resistance_node_line.port_1.h_outflow = snapshot.p4_port3_next_resistance_node_line_port_1.h
|
port_1_flow=snapshot.p4_port3_next_resistance_node_to_line_flow,
|
||||||
p4_port3_next_resistance_node_line.port_2.p = snapshot.p4_port3_next_resistance_node_line_port_2.p
|
port_2_properties=snapshot.p4_port3_next_resistance_node_line_port_2,
|
||||||
p4_port3_next_resistance_node_line.port_2.m_flow = -snapshot.p4_port3_next_resistance_to_output_line_flow
|
port_2_flow=-snapshot.p4_port3_next_resistance_to_output_line_flow,
|
||||||
p4_port3_next_resistance_node_line.port_2.h_outflow = snapshot.p4_port3_next_resistance_node_line_port_2.h
|
)
|
||||||
|
|
||||||
p4_port3_next_resistance_orifice = self.components.p4_port3_next_resistance_orifice
|
p4_port3_next_resistance_orifice = self.components.p4_port3_next_resistance_orifice
|
||||||
p4_port3_next_resistance_orifice.port_a.p = snapshot.p4_port3_next_resistance_node_line_port_2.p
|
p4_port3_next_resistance_orifice.port_a.p = snapshot.p4_port3_next_resistance_node_line_port_2.p
|
||||||
@@ -2352,13 +2384,13 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
p4_port3_remote_orifice_line = self.components.p4_port3_remote_orifice_line
|
self._write_two_state_connection_line(
|
||||||
p4_port3_remote_orifice_line.port_1.p = snapshot.p4_port3_remote_orifice_line_port_1.p
|
line=self.components.p4_port3_remote_orifice_line,
|
||||||
p4_port3_remote_orifice_line.port_1.m_flow = snapshot.p4_port3_remote_node_to_orifice_line_flow
|
port_1_properties=snapshot.p4_port3_remote_orifice_line_port_1,
|
||||||
p4_port3_remote_orifice_line.port_1.h_outflow = snapshot.p4_port3_remote_orifice_line_port_1.h
|
port_1_flow=snapshot.p4_port3_remote_node_to_orifice_line_flow,
|
||||||
p4_port3_remote_orifice_line.port_2.p = snapshot.p4_port3_remote_orifice_line_port_2.p
|
port_2_properties=snapshot.p4_port3_remote_orifice_line_port_2,
|
||||||
p4_port3_remote_orifice_line.port_2.m_flow = -snapshot.p4_port3_remote_orifice_to_node_flow
|
port_2_flow=-snapshot.p4_port3_remote_orifice_to_node_flow,
|
||||||
p4_port3_remote_orifice_line.port_2.h_outflow = snapshot.p4_port3_remote_orifice_line_port_2.h
|
)
|
||||||
|
|
||||||
p4_port3_remote_orifice_resistance = self.components.p4_port3_remote_orifice_resistance
|
p4_port3_remote_orifice_resistance = self.components.p4_port3_remote_orifice_resistance
|
||||||
p4_port3_remote_orifice_resistance.port_1.p = snapshot.p4_port3_remote_orifice_line_port_1.p
|
p4_port3_remote_orifice_resistance.port_1.p = snapshot.p4_port3_remote_orifice_line_port_1.p
|
||||||
@@ -2368,13 +2400,13 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
p4_port3_remote_orifice_resistance.port_2.m_flow = -snapshot.p4_port3_remote_node_to_resistance_flow
|
p4_port3_remote_orifice_resistance.port_2.m_flow = -snapshot.p4_port3_remote_node_to_resistance_flow
|
||||||
p4_port3_remote_orifice_resistance.port_2.h_outflow = snapshot.p4_port3_remote_resistance_node_line_port_1.h
|
p4_port3_remote_orifice_resistance.port_2.h_outflow = snapshot.p4_port3_remote_resistance_node_line_port_1.h
|
||||||
|
|
||||||
p4_port3_remote_resistance_node_line = self.components.p4_port3_remote_resistance_node_line
|
self._write_two_state_connection_line(
|
||||||
p4_port3_remote_resistance_node_line.port_1.p = snapshot.p4_port3_remote_resistance_node_line_port_1.p
|
line=self.components.p4_port3_remote_resistance_node_line,
|
||||||
p4_port3_remote_resistance_node_line.port_1.m_flow = snapshot.p4_port3_remote_resistance_node_to_line_flow
|
port_1_properties=snapshot.p4_port3_remote_resistance_node_line_port_1,
|
||||||
p4_port3_remote_resistance_node_line.port_1.h_outflow = snapshot.p4_port3_remote_resistance_node_line_port_1.h
|
port_1_flow=snapshot.p4_port3_remote_resistance_node_to_line_flow,
|
||||||
p4_port3_remote_resistance_node_line.port_2.p = snapshot.p4_port3_remote_resistance_node_line_port_2.p
|
port_2_properties=snapshot.p4_port3_remote_resistance_node_line_port_2,
|
||||||
p4_port3_remote_resistance_node_line.port_2.m_flow = -snapshot.p4_port3_remote_resistance_to_output_line_flow
|
port_2_flow=-snapshot.p4_port3_remote_resistance_to_output_line_flow,
|
||||||
p4_port3_remote_resistance_node_line.port_2.h_outflow = snapshot.p4_port3_remote_resistance_node_line_port_2.h
|
)
|
||||||
|
|
||||||
p4_port3_remote_resistance_orifice = self.components.p4_port3_remote_resistance_orifice
|
p4_port3_remote_resistance_orifice = self.components.p4_port3_remote_resistance_orifice
|
||||||
p4_port3_remote_resistance_orifice.port_a.p = snapshot.p4_port3_remote_resistance_node_line_port_2.p
|
p4_port3_remote_resistance_orifice.port_a.p = snapshot.p4_port3_remote_resistance_node_line_port_2.p
|
||||||
@@ -2431,13 +2463,15 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
),
|
),
|
||||||
internal_h=snapshot.chamber.h,
|
internal_h=snapshot.chamber.h,
|
||||||
)
|
)
|
||||||
node_line_derivative_1, node_line_derivative_2 = (
|
(
|
||||||
self.components.node_line.derivatives_from_connections(
|
node_line_derivative_1,
|
||||||
port_1_m_flow=snapshot.node_to_pnl0003_flow,
|
node_line_derivative_2,
|
||||||
connected_h_1=snapshot.node_line_port_1.h,
|
) = self._two_state_connection_line_derivatives(
|
||||||
port_2_m_flow=-snapshot.pnl0003_to_p4_flow,
|
line=self.components.node_line,
|
||||||
connected_h_2=snapshot.p4_primary_line.h,
|
port_1_properties=snapshot.node_line_port_1,
|
||||||
)
|
port_1_flow=snapshot.node_to_pnl0003_flow,
|
||||||
|
port_2_connected_properties=snapshot.p4_primary_line,
|
||||||
|
port_2_flow=-snapshot.pnl0003_to_p4_flow,
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
p4_primary_derivative,
|
p4_primary_derivative,
|
||||||
@@ -2522,13 +2556,15 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
chamber_to_line_flow=snapshot.p4_bridge_chamber_to_line_flow,
|
chamber_to_line_flow=snapshot.p4_bridge_chamber_to_line_flow,
|
||||||
node_to_line_flow=snapshot.p4_bridge_node_to_primary_line_flow,
|
node_to_line_flow=snapshot.p4_bridge_node_to_primary_line_flow,
|
||||||
)
|
)
|
||||||
p4_port1_remote_orifice_derivative_1, p4_port1_remote_orifice_derivative_2 = (
|
(
|
||||||
self.components.p4_port1_remote_orifice_line.derivatives_from_connections(
|
p4_port1_remote_orifice_derivative_1,
|
||||||
port_1_m_flow=snapshot.p4_port1_remote_node_to_orifice_line_flow,
|
p4_port1_remote_orifice_derivative_2,
|
||||||
connected_h_1=snapshot.p4_port1_remote_orifice_line_port_1.h,
|
) = self._two_state_connection_line_derivatives(
|
||||||
port_2_m_flow=-snapshot.p4_port1_remote_orifice_to_node_flow,
|
line=self.components.p4_port1_remote_orifice_line,
|
||||||
connected_h_2=snapshot.p4_port1_remote_primary_line.h,
|
port_1_properties=snapshot.p4_port1_remote_orifice_line_port_1,
|
||||||
)
|
port_1_flow=snapshot.p4_port1_remote_node_to_orifice_line_flow,
|
||||||
|
port_2_connected_properties=snapshot.p4_port1_remote_primary_line,
|
||||||
|
port_2_flow=-snapshot.p4_port1_remote_orifice_to_node_flow,
|
||||||
)
|
)
|
||||||
p4_port3_derivative = self._connection_line_derivative(
|
p4_port3_derivative = self._connection_line_derivative(
|
||||||
line=self.components.p4_port3_line,
|
line=self.components.p4_port3_line,
|
||||||
@@ -2594,11 +2630,12 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
(
|
(
|
||||||
p4_port3_remote_resistance_derivative_1,
|
p4_port3_remote_resistance_derivative_1,
|
||||||
p4_port3_remote_resistance_derivative_2,
|
p4_port3_remote_resistance_derivative_2,
|
||||||
) = self.components.p4_port3_remote_resistance_node_line.derivatives_from_connections(
|
) = self._two_state_connection_line_derivatives(
|
||||||
port_1_m_flow=snapshot.p4_port3_remote_resistance_node_to_line_flow,
|
line=self.components.p4_port3_remote_resistance_node_line,
|
||||||
connected_h_1=snapshot.p4_port3_remote_resistance_node_line_port_1.h,
|
port_1_properties=snapshot.p4_port3_remote_resistance_node_line_port_1,
|
||||||
port_2_m_flow=-snapshot.p4_port3_remote_resistance_to_output_line_flow,
|
port_1_flow=snapshot.p4_port3_remote_resistance_node_to_line_flow,
|
||||||
connected_h_2=snapshot.p4_port3_remote_resistance_output_line.h,
|
port_2_connected_properties=snapshot.p4_port3_remote_resistance_output_line,
|
||||||
|
port_2_flow=-snapshot.p4_port3_remote_resistance_to_output_line_flow,
|
||||||
)
|
)
|
||||||
p4_port3_remote_resistance_output_derivative = (
|
p4_port3_remote_resistance_output_derivative = (
|
||||||
self.components.p4_port3_remote_resistance_output_line.derivatives_from_connections(
|
self.components.p4_port3_remote_resistance_output_line.derivatives_from_connections(
|
||||||
@@ -2608,21 +2645,25 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
connected_h_2=snapshot.p4_port3_far_primary_line.h,
|
connected_h_2=snapshot.p4_port3_far_primary_line.h,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
p4_port3_remote_orifice_derivative_1, p4_port3_remote_orifice_derivative_2 = (
|
(
|
||||||
self.components.p4_port3_remote_orifice_line.derivatives_from_connections(
|
p4_port3_remote_orifice_derivative_1,
|
||||||
port_1_m_flow=snapshot.p4_port3_remote_node_to_orifice_line_flow,
|
p4_port3_remote_orifice_derivative_2,
|
||||||
connected_h_1=snapshot.p4_port3_remote_orifice_line_port_1.h,
|
) = self._two_state_connection_line_derivatives(
|
||||||
port_2_m_flow=-snapshot.p4_port3_remote_orifice_to_node_flow,
|
line=self.components.p4_port3_remote_orifice_line,
|
||||||
connected_h_2=snapshot.p4_port3_remote_primary_line.h,
|
port_1_properties=snapshot.p4_port3_remote_orifice_line_port_1,
|
||||||
)
|
port_1_flow=snapshot.p4_port3_remote_node_to_orifice_line_flow,
|
||||||
|
port_2_connected_properties=snapshot.p4_port3_remote_primary_line,
|
||||||
|
port_2_flow=-snapshot.p4_port3_remote_orifice_to_node_flow,
|
||||||
)
|
)
|
||||||
p4_port3_next_orifice_derivative_1, p4_port3_next_orifice_derivative_2 = (
|
(
|
||||||
self.components.p4_port3_next_orifice_line.derivatives_from_connections(
|
p4_port3_next_orifice_derivative_1,
|
||||||
port_1_m_flow=snapshot.p4_port3_next_orifice_node_to_line_flow,
|
p4_port3_next_orifice_derivative_2,
|
||||||
connected_h_1=snapshot.p4_port3_next_orifice_line_port_1.h,
|
) = self._two_state_connection_line_derivatives(
|
||||||
port_2_m_flow=-snapshot.p4_port3_next_orifice_to_output_line_flow,
|
line=self.components.p4_port3_next_orifice_line,
|
||||||
connected_h_2=snapshot.p4_port3_next_orifice_output_line.h,
|
port_1_properties=snapshot.p4_port3_next_orifice_line_port_1,
|
||||||
)
|
port_1_flow=snapshot.p4_port3_next_orifice_node_to_line_flow,
|
||||||
|
port_2_connected_properties=snapshot.p4_port3_next_orifice_output_line,
|
||||||
|
port_2_flow=-snapshot.p4_port3_next_orifice_to_output_line_flow,
|
||||||
)
|
)
|
||||||
p4_port3_next_orifice_output_derivative = (
|
p4_port3_next_orifice_output_derivative = (
|
||||||
self.components.p4_port3_next_orifice_output_line.derivatives_from_connections(
|
self.components.p4_port3_next_orifice_output_line.derivatives_from_connections(
|
||||||
@@ -2664,11 +2705,12 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
(
|
(
|
||||||
p4_port3_next_resistance_derivative_1,
|
p4_port3_next_resistance_derivative_1,
|
||||||
p4_port3_next_resistance_derivative_2,
|
p4_port3_next_resistance_derivative_2,
|
||||||
) = self.components.p4_port3_next_resistance_node_line.derivatives_from_connections(
|
) = self._two_state_connection_line_derivatives(
|
||||||
port_1_m_flow=snapshot.p4_port3_next_resistance_node_to_line_flow,
|
line=self.components.p4_port3_next_resistance_node_line,
|
||||||
connected_h_1=snapshot.p4_port3_next_resistance_node_line_port_1.h,
|
port_1_properties=snapshot.p4_port3_next_resistance_node_line_port_1,
|
||||||
port_2_m_flow=-snapshot.p4_port3_next_resistance_to_output_line_flow,
|
port_1_flow=snapshot.p4_port3_next_resistance_node_to_line_flow,
|
||||||
connected_h_2=snapshot.p4_port3_next_resistance_output_line.h,
|
port_2_connected_properties=snapshot.p4_port3_next_resistance_output_line,
|
||||||
|
port_2_flow=-snapshot.p4_port3_next_resistance_to_output_line_flow,
|
||||||
)
|
)
|
||||||
p4_port3_next_resistance_output_derivative = (
|
p4_port3_next_resistance_output_derivative = (
|
||||||
self.components.p4_port3_next_resistance_output_line.derivatives_from_connections(
|
self.components.p4_port3_next_resistance_output_line.derivatives_from_connections(
|
||||||
@@ -2712,11 +2754,12 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
(
|
(
|
||||||
p4_port1_next_orifice_derivative_1,
|
p4_port1_next_orifice_derivative_1,
|
||||||
p4_port1_next_orifice_derivative_2,
|
p4_port1_next_orifice_derivative_2,
|
||||||
) = self.components.p4_port1_next_orifice_line.derivatives_from_connections(
|
) = self._two_state_connection_line_derivatives(
|
||||||
port_1_m_flow=snapshot.p4_port1_next_orifice_node_to_line_flow,
|
line=self.components.p4_port1_next_orifice_line,
|
||||||
connected_h_1=snapshot.p4_port1_next_orifice_line_port_1.h,
|
port_1_properties=snapshot.p4_port1_next_orifice_line_port_1,
|
||||||
port_2_m_flow=-snapshot.p4_port1_next_orifice_to_output_line_flow,
|
port_1_flow=snapshot.p4_port1_next_orifice_node_to_line_flow,
|
||||||
connected_h_2=snapshot.p4_port1_next_orifice_output_line.h,
|
port_2_connected_properties=snapshot.p4_port1_next_orifice_output_line,
|
||||||
|
port_2_flow=-snapshot.p4_port1_next_orifice_to_output_line_flow,
|
||||||
)
|
)
|
||||||
p4_port1_next_orifice_output_derivative = (
|
p4_port1_next_orifice_output_derivative = (
|
||||||
self.components.p4_port1_next_orifice_output_line.derivatives_from_connections(
|
self.components.p4_port1_next_orifice_output_line.derivatives_from_connections(
|
||||||
@@ -2729,11 +2772,12 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
(
|
(
|
||||||
p4_port1_next_orifice_resistance_derivative_1,
|
p4_port1_next_orifice_resistance_derivative_1,
|
||||||
p4_port1_next_orifice_resistance_derivative_2,
|
p4_port1_next_orifice_resistance_derivative_2,
|
||||||
) = self.components.p4_port1_next_orifice_resistance_line.derivatives_from_connections(
|
) = self._two_state_connection_line_derivatives(
|
||||||
port_1_m_flow=snapshot.p4_port1_next_orifice_resistance_node_to_line_flow,
|
line=self.components.p4_port1_next_orifice_resistance_line,
|
||||||
connected_h_1=snapshot.p4_port1_next_orifice_resistance_line_port_1.h,
|
port_1_properties=snapshot.p4_port1_next_orifice_resistance_line_port_1,
|
||||||
port_2_m_flow=-snapshot.p4_port1_next_orifice_resistance_to_p4_flow,
|
port_1_flow=snapshot.p4_port1_next_orifice_resistance_node_to_line_flow,
|
||||||
connected_h_2=snapshot.p4_port1_far_primary_line.h,
|
port_2_connected_properties=snapshot.p4_port1_far_primary_line,
|
||||||
|
port_2_flow=-snapshot.p4_port1_next_orifice_resistance_to_p4_flow,
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
p4_port1_next_orifice_resistance_chamber_inlet_derivative,
|
p4_port1_next_orifice_resistance_chamber_inlet_derivative,
|
||||||
|
|||||||
Reference in new issue
Block a user