接入test_mql pneumatic_69传输焓RHS
This commit is contained in:
1 parent
f8af99ace1
commit
021ea63a2b
6 files changed
+96
-24
No files matched your search
@@ -1913,6 +1913,17 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
port_3_mass_flow_g_s=port_3.port_mass_flow_kg_s * 1.0e3,
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _p4_node_port_2_connected_h(
|
||||
*,
|
||||
balance: TestMqlPneumaticNode4Balance,
|
||||
fallback_h: float,
|
||||
) -> float:
|
||||
mass_flow_kg_s = balance.port_2_mass_flow_g_s * 1.0e-3
|
||||
if abs(mass_flow_kg_s) <= 1.0e-12:
|
||||
return fallback_h
|
||||
return balance.port_2_enthalpy_flow_w / mass_flow_kg_s
|
||||
|
||||
def _p4_node_balance(
|
||||
self,
|
||||
*,
|
||||
@@ -2073,12 +2084,20 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
chamber_properties: ThermodynamicProperties,
|
||||
chamber_to_line_flow: float,
|
||||
node_to_line_flow: float,
|
||||
node_connected_h: float | None = None,
|
||||
) -> tuple[VolumeState, VolumeState]:
|
||||
line_derivative = line.derivatives_from_connections(
|
||||
derivative_method = (
|
||||
line.derivatives_from_connections
|
||||
if node_connected_h is None
|
||||
else line.derivatives_from_transport_enthalpy_connections
|
||||
)
|
||||
line_derivative = derivative_method(
|
||||
port_1_m_flow=chamber_to_line_flow,
|
||||
connected_h_1=chamber_properties.h,
|
||||
port_2_m_flow=node_to_line_flow,
|
||||
connected_h_2=line_properties.h,
|
||||
connected_h_2=(
|
||||
line_properties.h if node_connected_h is None else node_connected_h
|
||||
),
|
||||
)
|
||||
chamber_derivative = chamber.derivatives_from_two_connections(
|
||||
port_a_m_flow=-chamber_to_line_flow,
|
||||
@@ -2791,6 +2810,10 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
chamber_properties=snapshot.p4_port3_remote_primary_chamber,
|
||||
chamber_to_line_flow=snapshot.p4_port3_remote_chamber_to_line_flow,
|
||||
node_to_line_flow=snapshot.p4_port3_remote_node_to_primary_line_flow,
|
||||
node_connected_h=self._p4_node_port_2_connected_h(
|
||||
balance=snapshot.p4_port3_remote_balance,
|
||||
fallback_h=snapshot.p4_port3_remote_primary_line.h,
|
||||
),
|
||||
)
|
||||
p4_port3_remote_port3_derivative = self._connection_line_derivative(
|
||||
line=self.components.p4_port3_remote_port3_line,
|
||||
|
||||
Reference in new issue
Block a user