修正test_mql节点焓流诊断口径
This commit is contained in:
1 parent
1602e0dc51
commit
a219cddc0b
3 files changed
+725
-5
No files matched your search
@@ -1785,6 +1785,17 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
connected_h=connected_h,
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _enthalpy_flow_for_node_port(
|
||||
*,
|
||||
flow_kg_s: float,
|
||||
node_h: float,
|
||||
connected_h: float,
|
||||
port_mass_flow_kg_s: float,
|
||||
) -> float:
|
||||
upstream_h = node_h if flow_kg_s >= 0.0 else connected_h
|
||||
return port_mass_flow_kg_s * upstream_h
|
||||
|
||||
def _two_state_orifice_line_flows(
|
||||
self,
|
||||
*,
|
||||
@@ -1886,16 +1897,18 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
return node.balance(
|
||||
port_2_temperature_k=primary_properties.T,
|
||||
port_2_pressure_pa=primary_properties.p,
|
||||
port_1_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||
port_1_enthalpy_flow_w=self._enthalpy_flow_for_node_port(
|
||||
flow_kg_s=port_1.flow_kg_s,
|
||||
node_h=port_1.node_h,
|
||||
connected_h=port_1.connected_h,
|
||||
port_mass_flow_kg_s=port_1.port_mass_flow_kg_s,
|
||||
),
|
||||
port_1_mass_flow_g_s=port_1.port_mass_flow_kg_s * 1.0e3,
|
||||
port_3_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||
port_3_enthalpy_flow_w=self._enthalpy_flow_for_node_port(
|
||||
flow_kg_s=port_3.flow_kg_s,
|
||||
node_h=port_3.node_h,
|
||||
connected_h=port_3.connected_h,
|
||||
port_mass_flow_kg_s=port_3.port_mass_flow_kg_s,
|
||||
),
|
||||
port_3_mass_flow_g_s=port_3.port_mass_flow_kg_s * 1.0e3,
|
||||
)
|
||||
@@ -1912,22 +1925,25 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
||||
return node.balance(
|
||||
port_2_temperature_k=primary_properties.T,
|
||||
port_2_pressure_pa=primary_properties.p,
|
||||
port_1_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||
port_1_enthalpy_flow_w=self._enthalpy_flow_for_node_port(
|
||||
flow_kg_s=port_1.flow_kg_s,
|
||||
node_h=port_1.node_h,
|
||||
connected_h=port_1.connected_h,
|
||||
port_mass_flow_kg_s=port_1.port_mass_flow_kg_s,
|
||||
),
|
||||
port_1_mass_flow_g_s=port_1.port_mass_flow_kg_s * 1.0e3,
|
||||
port_3_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||
port_3_enthalpy_flow_w=self._enthalpy_flow_for_node_port(
|
||||
flow_kg_s=port_3.flow_kg_s,
|
||||
node_h=port_3.node_h,
|
||||
connected_h=port_3.connected_h,
|
||||
port_mass_flow_kg_s=port_3.port_mass_flow_kg_s,
|
||||
),
|
||||
port_3_mass_flow_g_s=port_3.port_mass_flow_kg_s * 1.0e3,
|
||||
port_4_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||
port_4_enthalpy_flow_w=self._enthalpy_flow_for_node_port(
|
||||
flow_kg_s=port_4.flow_kg_s,
|
||||
node_h=port_4.node_h,
|
||||
connected_h=port_4.connected_h,
|
||||
port_mass_flow_kg_s=port_4.port_mass_flow_kg_s,
|
||||
),
|
||||
port_4_mass_flow_g_s=port_4.port_mass_flow_kg_s * 1.0e3,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user