接入test_mql PNVO阶跃控制与流量诊断

This commit is contained in:
huojiarong committed 2026-07-21 07:28:28 +00:00
1 parent 65f6d6dd87
commit 7c68caed27
7 files changed
+298 -24

No files matched your search

+37
View File
@@ -199,6 +199,8 @@ class TestMqlPn3NodeChamberSegmentTests(unittest.TestCase):
state = closure.initial_state_vector()
state[4] *= 0.99
state[5] *= 0.99
self.assertAlmostEqual(closure.components.node_orifice.opening, 0.0)
closure.components.node_orifice.opening = 1.0
snapshot = closure.snapshot(state)
rhs = closure.rhs(state)
@@ -710,6 +712,39 @@ class TestMqlPn3P4NodeChamberSegmentTests(unittest.TestCase):
+ diagnostic.boundary_work_w,
)
def test_full_state_closure_applies_step_controls_to_variable_orifices(self) -> None:
closure = self.system.full_state_closure_from_spec(
self.spec,
inlet_node_pressure_pa=15.31e6,
resistance_boundary_pressure_pa=15.29e6,
)
state = closure.initial_state_vector()
closed_snapshot = closure.snapshot_at(0.0, state).pneumatic
open_snapshot = closure.snapshot_at(0.04, state).pneumatic
self.assertAlmostEqual(
closed_snapshot.p4_port3_remote_node_to_primary_line_flow,
0.0,
)
self.assertGreater(
open_snapshot.p4_port3_remote_node_to_primary_line_flow,
0.0,
)
self.assertAlmostEqual(
self.system.pneumatic_assembly.variable_orifices[
"pn_morifice_1"
].opening,
1.0,
)
closure.snapshot_at(0.0, state)
self.assertAlmostEqual(
self.system.pneumatic_assembly.variable_orifices[
"pn_morifice_1"
].opening,
0.0,
)
def test_simulates_full_state_key_data_paths_for_amesim_comparison(self) -> None:
data_paths = (
"press@pn_c1_8",
@@ -1105,6 +1140,8 @@ class TestMqlPn3P4NodeChamberSegmentTests(unittest.TestCase):
resistance_boundary_pressure_pa=15.29e6,
)
self.assertAlmostEqual(closure.components.node_orifice.opening, 0.0)
closure.components.node_orifice.opening = 1.0
snapshot = closure.snapshot()
rhs = closure.rhs(closure.initial_state_vector())