接入AMESim help文档与PNVO流量诊断

This commit is contained in:
huojiarong committed 2026-07-22 08:56:04 +00:00
1 parent f0f8f40c7a
commit 84d1675292
17 files changed
+450 -7

No files matched your search

@@ -11,9 +11,11 @@ from PythonModels.scripts.run_test_mql_full_state_comparison import (
TestMqlFullStateComparisonExecutionConfig,
TestMqlFullStateComparisonPathConfig,
TestMqlFullStateComparisonScriptConfig,
TestMqlPnl0001PressureLossCalibrationDiagnostic,
TestMqlPnvoEventBoundaryDiagnostic,
TestMqlPnvoEventWindowDiagnostic,
TestMqlPnvoEventWindowSampleDiagnostic,
TestMqlPnvoFlowParameterDiagnostic,
TestMqlPnvoEventWindowSegmentDiagnostic,
format_test_mql_full_state_comparison_summary,
format_test_mql_pnvo_event_boundary_summary,
@@ -241,6 +243,45 @@ class RunTestMqlFullStateComparisonScriptTests(unittest.TestCase):
energy_derivative_w=-20000.0,
),
),
pnl0001_pressure_loss_diagnostics=(
TestMqlPnl0001PressureLossCalibrationDiagnostic(
line_alias="pneumatic_69",
chamber_alias="pn_c1_8",
time_s=0.05,
amesim_cm=0.0159,
amesim_dm1_g_s=419.9,
amesim_mass_flow_magnitude_kg_s=0.4199,
amesim_line_gauge_pressure_pa=1484689.6,
amesim_chamber_gauge_pressure_pa=187060.0,
amesim_line_temperature_k=296.1,
amesim_pressure_drop_pa=1297629.6,
current_darcy_pressure_drop_pa=422633.2,
pressure_drop_multiplier=3.07,
amesim_linear_conductance_kg_s_sqrt_k_per_pa=5.56e-6,
python_linear_conductance_kg_s_sqrt_k_per_pa=1.06e-5,
python_to_amesim_linear_conductance_ratio=1.91,
),
),
pnvo_flow_parameter_diagnostics=(
TestMqlPnvoFlowParameterDiagnostic(
orifice_alias="pn_morifice_1",
time_s=0.05,
amesim_cm=0.0158,
amesim_dm2_g_s=456.8,
amesim_opening=1.0,
amesim_gas_velocity_m_s=885.9,
python_opening=1.0,
python_flow_coefficient=0.45,
python_effective_area_m2=78.5e-6,
python_line_pressure_pa=15310000.0,
python_boundary_pressure_pa=1586000.0,
python_upstream_pressure_pa=15310000.0,
python_upstream_temperature_k=293.15,
python_mass_flow_kg_s=0.4637,
python_cm=0.0147,
python_to_amesim_cm_ratio=0.93,
),
),
)
diagnostic = TestMqlPnvoEventWindowDiagnostic(
orifice_alias="pn_morifice_1",
@@ -275,6 +316,17 @@ class RunTestMqlFullStateComparisonScriptTests(unittest.TestCase):
self.assertIn("rhs=8154", summary)
self.assertIn("rhs@pneumatic_69", summary)
self.assertIn("dm_dt=-0.0222", summary)
self.assertIn("pressure_loss@pneumatic_69", summary)
self.assertIn("cm=0.0159", summary)
self.assertIn("dp_multiplier=3.07", summary)
self.assertIn("amesim_linear_k=5.56e-06", summary)
self.assertIn("python_linear_k=1.06e-05", summary)
self.assertIn("linear_k_ratio=1.91", summary)
self.assertIn("flow_parameter@pn_morifice_1", summary)
self.assertIn("amesim_cm=0.0158", summary)
self.assertIn("python_cm=0.0147", summary)
self.assertIn("cm_ratio=0.93", summary)
self.assertIn("amesim_gasvel=885.9", summary)
self.assertIn("Final comparison:", summary)
self.assertTrue(summary.endswith("\n"))