对齐Amesim氦气PR物性与PNVO流量

This commit is contained in:
huojiarong committed 2026-08-03 15:34:33 +00:00
1 parent 18d9802f03
commit 046aa49814
13 files changed
+730 -73

No files matched your search

+34 -3
View File
@@ -19,6 +19,11 @@ class PengRobinsonTest(unittest.TestCase):
density = HELIUM_PR.density(pressure, temperature)
self.assertGreater(HELIUM_PR.compressibility_factor(pressure, temperature), 1.0)
self.assertAlmostEqual(
density,
24.114225444477153,
delta=1.0e-12,
)
self.assertAlmostEqual(
HELIUM_PR.pressure_from_density(temperature, density),
pressure,
@@ -28,17 +33,43 @@ class PengRobinsonTest(unittest.TestCase):
def test_helium_residual_enthalpy_is_small_at_atmosphere(self) -> None:
self.assertAlmostEqual(
HELIUM_PR.residual_specific_enthalpy(101_300.0, 298.15),
17.834,
25.3556466754,
delta=0.01,
)
def test_helium_residual_enthalpy_captures_high_pressure_departure(self) -> None:
self.assertAlmostEqual(
HELIUM_PR.residual_specific_enthalpy(13_839_965.0, 287.7322),
11953.9,
12788.0457342,
delta=0.1,
)
def test_residual_isochoric_heat_capacity_is_internal_energy_derivative(
self,
) -> None:
temperature = 292.3997890954483
density = 24.02697515640726
temperature_step = 1.0e-3
numerical_derivative = (
HELIUM_PR.residual_specific_internal_energy_at_density(
temperature + temperature_step,
density,
)
- HELIUM_PR.residual_specific_internal_energy_at_density(
temperature - temperature_step,
density,
)
) / (2.0 * temperature_step)
self.assertAlmostEqual(
HELIUM_PR.residual_isochoric_heat_capacity_at_density(
temperature,
density,
),
numerical_derivative,
delta=1.0e-6,
)
def test_air_reference_remains_available_for_other_models(self) -> None:
z = AIR_PR.compressibility_factor(101_325.0, 300.0)
density = AIR_PR.density(101_325.0, 300.0)
@@ -60,7 +91,7 @@ class PengRobinsonTest(unittest.TestCase):
molar_mass=0.004002602,
critical_temperature=5.1953,
critical_pressure=227_460.0,
acentric_factor=-0.385,
acentric_factor=-0.382,
)
self.assertAlmostEqual(fluid.specific_gas_constant, 2077.3, delta=0.5)