Capacity tests#
Test h2ss.capacity
functions.
References#
- tests.test_capacity.test_corrected_cavern_volume()[source]#
Test
h2ss.capacity.corrected_cavern_volume
- tests.test_capacity.test_temperature_cavern_mid_point()[source]#
Test
h2ss.capacity.temperature_cavern_mid_point
- tests.test_capacity.test_density_hydrogen_gas()[source]#
Test
h2ss.capacity.density_hydrogen_gas
Notes#
Use Eqn. (3) of [1] to derive the density and compare it with the density obtained from the
h2ss.capacity.density_hydrogen_gas
function. The values should be approximately the same (rounded to one decimal place). PyFluids [2] is used to just derive the compressibility factor, \(Z\), for the former. Thepyproject.toml
configuration file has been set such that the default units are SI units.\[\rho = \frac{p \, M}{Z \, R \, T}\]where \(M\) is the molar mass of hydrogen gas [kg mol⁻¹], \(R\) is the universal gas constant [J K⁻¹ mol⁻¹], \(p\) is the pressure [Pa], \(T\) is the temperature [K], and \(\rho\) is the hydrogen gas density [kg m⁻³].