接入test_mql pn_node3_10入口平衡
This commit is contained in:
1 parent
bdbac6fbb5
commit
acee83fe53
2 files changed
+37
-21
No files matched your search
@@ -388,7 +388,7 @@ class TestMqlPn3P4NodeChamberSegmentSnapshot:
|
|||||||
p4_port1_next_orifice_resistance_node_to_line_flow: float
|
p4_port1_next_orifice_resistance_node_to_line_flow: float
|
||||||
p4_port1_next_orifice_resistance_line_center_flow: float
|
p4_port1_next_orifice_resistance_line_center_flow: float
|
||||||
p4_port1_next_orifice_resistance_to_p4_flow: float
|
p4_port1_next_orifice_resistance_to_p4_flow: float
|
||||||
p4_port1_next_orifice_resistance_chamber_inlet_boundary_to_line_flow: float
|
p4_port1_next_orifice_resistance_chamber_inlet_node_to_line_flow: float
|
||||||
p4_port1_next_orifice_resistance_chamber_inlet_line_to_chamber_flow: float
|
p4_port1_next_orifice_resistance_chamber_inlet_line_to_chamber_flow: float
|
||||||
p4_port1_next_orifice_resistance_chamber_outlet_node_to_line_flow: float
|
p4_port1_next_orifice_resistance_chamber_outlet_node_to_line_flow: float
|
||||||
p4_port1_next_orifice_resistance_chamber_outlet_line_to_chamber_flow: float
|
p4_port1_next_orifice_resistance_chamber_outlet_line_to_chamber_flow: float
|
||||||
@@ -830,11 +830,24 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
port_1_temperature_k=p4_bridge_primary_chamber.T,
|
port_1_temperature_k=p4_bridge_primary_chamber.T,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
p4_port1_next_orifice_resistance_chamber_inlet_node_to_line_flow = (
|
||||||
|
self.components.p4_port1_next_orifice_resistance_chamber_inlet_line.resistance_mass_flow(
|
||||||
|
port_1_pressure_pa=p4_port1_remote_orifice_line_port_1.p,
|
||||||
|
port_1_temperature_k=p4_port1_remote_orifice_line_port_1.T,
|
||||||
|
)
|
||||||
|
)
|
||||||
p4_port1_remote_node_to_orifice_line_flow = -self.components.p4_port1_remote_orifice_node.balance(
|
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_temperature_k=p4_port1_remote_orifice_line_port_1.T,
|
||||||
port_2_pressure_pa=p4_port1_remote_orifice_line_port_1.p,
|
port_2_pressure_pa=p4_port1_remote_orifice_line_port_1.p,
|
||||||
port_1_enthalpy_flow_w=0.0,
|
port_1_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||||
port_1_mass_flow_g_s=0.0,
|
flow_kg_s=p4_port1_next_orifice_resistance_chamber_inlet_node_to_line_flow,
|
||||||
|
node_h=p4_port1_remote_orifice_line_port_1.h,
|
||||||
|
connected_h=p4_port1_next_orifice_resistance_chamber_inlet_line.h,
|
||||||
|
),
|
||||||
|
port_1_mass_flow_g_s=(
|
||||||
|
p4_port1_next_orifice_resistance_chamber_inlet_node_to_line_flow
|
||||||
|
* 1.0e3
|
||||||
|
),
|
||||||
port_3_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
port_3_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||||
flow_kg_s=-node_to_resistance_flow,
|
flow_kg_s=-node_to_resistance_flow,
|
||||||
node_h=p4_port1_remote_orifice_line_port_1.h,
|
node_h=p4_port1_remote_orifice_line_port_1.h,
|
||||||
@@ -1010,12 +1023,6 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
port_2_temperature_k=p4_port1_next_orifice_line_port_1.T,
|
port_2_temperature_k=p4_port1_next_orifice_line_port_1.T,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
p4_port1_next_orifice_resistance_chamber_inlet_boundary_to_line_flow = (
|
|
||||||
self.components.p4_port1_next_orifice_resistance_chamber_inlet_line.resistance_mass_flow(
|
|
||||||
port_1_pressure_pa=resistance_boundary.p,
|
|
||||||
port_1_temperature_k=resistance_boundary.T,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
p4_port1_next_orifice_resistance_chamber_inlet_line_to_chamber_flow = (
|
p4_port1_next_orifice_resistance_chamber_inlet_line_to_chamber_flow = (
|
||||||
self._line_to_chamber_flow(
|
self._line_to_chamber_flow(
|
||||||
line=p4_port1_next_orifice_resistance_chamber_inlet_line,
|
line=p4_port1_next_orifice_resistance_chamber_inlet_line,
|
||||||
@@ -1259,8 +1266,15 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
self.components.p4_port1_remote_orifice_node.balance(
|
self.components.p4_port1_remote_orifice_node.balance(
|
||||||
port_2_temperature_k=p4_port1_remote_orifice_line_port_1.T,
|
port_2_temperature_k=p4_port1_remote_orifice_line_port_1.T,
|
||||||
port_2_pressure_pa=p4_port1_remote_orifice_line_port_1.p,
|
port_2_pressure_pa=p4_port1_remote_orifice_line_port_1.p,
|
||||||
port_1_enthalpy_flow_w=0.0,
|
port_1_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||||
port_1_mass_flow_g_s=0.0,
|
flow_kg_s=p4_port1_next_orifice_resistance_chamber_inlet_node_to_line_flow,
|
||||||
|
node_h=p4_port1_remote_orifice_line_port_1.h,
|
||||||
|
connected_h=p4_port1_next_orifice_resistance_chamber_inlet_line.h,
|
||||||
|
),
|
||||||
|
port_1_mass_flow_g_s=(
|
||||||
|
p4_port1_next_orifice_resistance_chamber_inlet_node_to_line_flow
|
||||||
|
* 1.0e3
|
||||||
|
),
|
||||||
port_3_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
port_3_enthalpy_flow_w=self._enthalpy_flow_from_node(
|
||||||
flow_kg_s=-node_to_resistance_flow,
|
flow_kg_s=-node_to_resistance_flow,
|
||||||
node_h=p4_port1_remote_orifice_line_port_1.h,
|
node_h=p4_port1_remote_orifice_line_port_1.h,
|
||||||
@@ -1581,8 +1595,8 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
p4_port1_next_orifice_resistance_to_p4_flow=(
|
p4_port1_next_orifice_resistance_to_p4_flow=(
|
||||||
p4_port1_next_orifice_resistance_to_p4_flow
|
p4_port1_next_orifice_resistance_to_p4_flow
|
||||||
),
|
),
|
||||||
p4_port1_next_orifice_resistance_chamber_inlet_boundary_to_line_flow=(
|
p4_port1_next_orifice_resistance_chamber_inlet_node_to_line_flow=(
|
||||||
p4_port1_next_orifice_resistance_chamber_inlet_boundary_to_line_flow
|
p4_port1_next_orifice_resistance_chamber_inlet_node_to_line_flow
|
||||||
),
|
),
|
||||||
p4_port1_next_orifice_resistance_chamber_inlet_line_to_chamber_flow=(
|
p4_port1_next_orifice_resistance_chamber_inlet_line_to_chamber_flow=(
|
||||||
p4_port1_next_orifice_resistance_chamber_inlet_line_to_chamber_flow
|
p4_port1_next_orifice_resistance_chamber_inlet_line_to_chamber_flow
|
||||||
@@ -1986,9 +2000,9 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
line_properties=(
|
line_properties=(
|
||||||
snapshot.p4_port1_next_orifice_resistance_chamber_inlet_line
|
snapshot.p4_port1_next_orifice_resistance_chamber_inlet_line
|
||||||
),
|
),
|
||||||
node_properties=snapshot.resistance_boundary,
|
node_properties=snapshot.p4_port1_remote_orifice_line_port_1,
|
||||||
node_to_line_flow=(
|
node_to_line_flow=(
|
||||||
snapshot.p4_port1_next_orifice_resistance_chamber_inlet_boundary_to_line_flow
|
snapshot.p4_port1_next_orifice_resistance_chamber_inlet_node_to_line_flow
|
||||||
),
|
),
|
||||||
line_to_chamber_flow=(
|
line_to_chamber_flow=(
|
||||||
snapshot.p4_port1_next_orifice_resistance_chamber_inlet_line_to_chamber_flow
|
snapshot.p4_port1_next_orifice_resistance_chamber_inlet_line_to_chamber_flow
|
||||||
@@ -2731,9 +2745,9 @@ class TestMqlPn3P4NodeChamberSegmentClosure:
|
|||||||
p4_port1_next_orifice_resistance_chamber_inlet_derivative = (
|
p4_port1_next_orifice_resistance_chamber_inlet_derivative = (
|
||||||
self.components.p4_port1_next_orifice_resistance_chamber_inlet_line.derivatives_from_connections(
|
self.components.p4_port1_next_orifice_resistance_chamber_inlet_line.derivatives_from_connections(
|
||||||
port_1_m_flow=(
|
port_1_m_flow=(
|
||||||
snapshot.p4_port1_next_orifice_resistance_chamber_inlet_boundary_to_line_flow
|
snapshot.p4_port1_next_orifice_resistance_chamber_inlet_node_to_line_flow
|
||||||
),
|
),
|
||||||
connected_h_1=snapshot.resistance_boundary.h,
|
connected_h_1=snapshot.p4_port1_remote_orifice_line_port_1.h,
|
||||||
port_2_m_flow=(
|
port_2_m_flow=(
|
||||||
-snapshot.p4_port1_next_orifice_resistance_chamber_inlet_line_to_chamber_flow
|
-snapshot.p4_port1_next_orifice_resistance_chamber_inlet_line_to_chamber_flow
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -906,8 +906,10 @@ class TestMqlPn3P4NodeChamberSegmentTests(unittest.TestCase):
|
|||||||
delta=1.0e-12,
|
delta=1.0e-12,
|
||||||
)
|
)
|
||||||
self.assertAlmostEqual(
|
self.assertAlmostEqual(
|
||||||
snapshot.p4_port1_remote_node_to_orifice_line_flow,
|
snapshot.p4_port1_remote_node_to_orifice_line_flow
|
||||||
snapshot.node_to_resistance_flow,
|
+ snapshot.p4_port1_next_orifice_resistance_chamber_inlet_node_to_line_flow
|
||||||
|
- snapshot.node_to_resistance_flow,
|
||||||
|
0.0,
|
||||||
delta=1.0e-12,
|
delta=1.0e-12,
|
||||||
)
|
)
|
||||||
self.assertAlmostEqual(
|
self.assertAlmostEqual(
|
||||||
@@ -1041,7 +1043,7 @@ class TestMqlPn3P4NodeChamberSegmentTests(unittest.TestCase):
|
|||||||
self.assertAlmostEqual(
|
self.assertAlmostEqual(
|
||||||
p4_port1_next_orifice_resistance_chamber_mass_sum,
|
p4_port1_next_orifice_resistance_chamber_mass_sum,
|
||||||
(
|
(
|
||||||
snapshot.p4_port1_next_orifice_resistance_chamber_inlet_boundary_to_line_flow
|
snapshot.p4_port1_next_orifice_resistance_chamber_inlet_node_to_line_flow
|
||||||
+ snapshot.p4_port1_next_orifice_resistance_chamber_outlet_node_to_line_flow
|
+ snapshot.p4_port1_next_orifice_resistance_chamber_outlet_node_to_line_flow
|
||||||
),
|
),
|
||||||
delta=1.0e-12,
|
delta=1.0e-12,
|
||||||
@@ -1049,7 +1051,7 @@ class TestMqlPn3P4NodeChamberSegmentTests(unittest.TestCase):
|
|||||||
mass_derivative_sum = sum(rhs[index] for index in range(0, 112, 2))
|
mass_derivative_sum = sum(rhs[index] for index in range(0, 112, 2))
|
||||||
self.assertAlmostEqual(
|
self.assertAlmostEqual(
|
||||||
mass_derivative_sum,
|
mass_derivative_sum,
|
||||||
snapshot.p4_port1_next_orifice_resistance_chamber_inlet_boundary_to_line_flow,
|
0.0,
|
||||||
delta=1.0e-12,
|
delta=1.0e-12,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user