修正test_mql事件窗口插值诊断

This commit is contained in:
huojiarong committed 2026-07-26 14:48:38 +00:00
1 parent 331435e78a
commit 01b606df30
5 files changed
+103 -3

No files matched your search

+11
View File
@@ -55,6 +55,17 @@ class AmesimPneumaticComponentsTest(unittest.TestCase):
delta=0.1,
)
def test_pressure_transport_enthalpy_restores_absolute_energy_offset(self) -> None:
gas = HELIUM_PNEUMATIC_GAS
pressure = 13_839_965.0
temperature = 287.7322
self.assertAlmostEqual(
gas.pressure_transport_enthalpy(pressure, temperature),
gas.pressure_reference_enthalpy(pressure, temperature)
+ gas.cp * 298.15,
)
def test_reference_temperature_from_enthalpy_rejects_non_positive_cp(self) -> None:
gas = AmesimPneumaticGas(cp=0.0, cv=3116.0)