fix(cryo_tank): use helium-only CoolProp pressure model
This commit is contained in:
1 parent
4a22ef1334
commit
610ae39ee4
9 files changed
+126
-197
No files matched your search
@@ -6,7 +6,6 @@ sys.path.insert(0, "src")
|
||||
|
||||
from cryo_tank.properties import (
|
||||
ln2_rho, ln2_h, ln2_u, ln2_T_from_u,
|
||||
n2_vapor_u, n2_sat_pressure,
|
||||
he_u, he_h, he_cp, he_cv,
|
||||
)
|
||||
from cryo_tank.config import P_WORKING
|
||||
@@ -34,24 +33,12 @@ class TestLN2Properties:
|
||||
assert abs(T_recovered - T_orig) < 0.01
|
||||
|
||||
|
||||
class TestN2VaporProperties:
|
||||
"""N2 vapor properties."""
|
||||
|
||||
def test_n2_sat_pressure_at_78K(self):
|
||||
P_sat = n2_sat_pressure(78.0)
|
||||
assert 0.10e6 < P_sat < 0.12e6 # ~0.1093 MPa
|
||||
|
||||
def test_n2_vapor_internal_energy_at_78K(self):
|
||||
u = n2_vapor_u(78.0)
|
||||
assert 50000 < u < 60000 # ~55547 J/kg
|
||||
|
||||
|
||||
class TestHeliumProperties:
|
||||
"""Helium (ideal gas) properties."""
|
||||
"""Helium properties."""
|
||||
|
||||
def test_he_cp_near_5196(self):
|
||||
cp = he_cp()
|
||||
assert abs(cp - 5196.2) < 10 # monatomic ideal gas
|
||||
assert abs(cp - 5196.2) < 10
|
||||
|
||||
def test_he_cv_near_3117(self):
|
||||
cv = he_cv()
|
||||
|
||||
@@ -69,10 +69,9 @@ class TestInitialState:
|
||||
assert abs(info['T_liq'] - T_INIT) < 0.1
|
||||
assert abs(info['T_ull'] - T_INIT) < 1.0
|
||||
|
||||
def test_initial_pressure_components_sum_to_P_working(self):
|
||||
def test_initial_pressure_is_provided_entirely_by_helium(self):
|
||||
tank = _make_tank()
|
||||
y0 = tank.initial_state()
|
||||
info = tank.derive(y0)
|
||||
P_N2 = info['P_N2']
|
||||
P_He = info['P_He']
|
||||
assert abs(P_N2 + P_He - P_WORKING) / P_WORKING < 1e-6
|
||||
assert abs(P_He - P_WORKING) / P_WORKING < 1e-12
|
||||
Reference in new issue
Block a user