My Project
Loading...
Searching...
No Matches
Opm::H2< Scalar > Class Template Reference

Properties of pure molecular hydrogen $H_2$. More...

#include <H2.hpp>

Inheritance diagram for Opm::H2< Scalar >:
Opm::Component< Scalar, H2< Scalar > >

Public Member Functions

const double brineSalinity
 
const float brineSalinity
 

Static Public Member Functions

static std::string name ()
 A human readable name for the $H_2$.
 
static constexpr Scalar molarMass ()
 The molar mass in $\mathrm{[kg/mol]}$ of molecular hydrogen.
 
static Scalar criticalTemperature ()
 Returns the critical temperature $\mathrm{[K]}$ of molecular hydrogen.
 
static Scalar criticalPressure ()
 Returns the critical pressure $\mathrm{[Pa]}$ of molecular hydrogen.
 
static Scalar criticalDensity ()
 Returns the critical density $\mathrm{[mol/cm^3]}$ of molecular hydrogen.
 
static Scalar tripleTemperature ()
 Returns the temperature $\mathrm{[K]}$ at molecular hydrogen's triple point.
 
static Scalar triplePressure ()
 Returns the pressure $\mathrm{[Pa]}$ of molecular hydrogen's triple point.
 
static Scalar tripleDensity ()
 Returns the density $\mathrm{[mol/cm^3]}$ of molecular hydrogen's triple point.
 
static Scalar criticalVolume ()
 Critical volume of $H_2$ [m2/kmol].
 
static Scalar acentricFactor ()
 Acentric factor of $H_2$.
 
template<class Evaluation >
static Evaluation vaporPressure (Evaluation temperature)
 The vapor pressure in $\mathrm{[Pa]}$ of pure molecular hydrogen at a given temperature.
 
template<class Evaluation >
static Evaluation gasDensity (Evaluation temperature, Evaluation pressure, bool extrapolate=false)
 The density $\mathrm{[kg/m^3]}$ of $H_2$ at a given pressure and temperature.
 
template<class Evaluation >
static Evaluation gasMolarDensity (Evaluation temperature, Evaluation pressure, bool extrapolate=false)
 The molar density of $H_2$ in $\mathrm{[mol/m^3]}$, depending on pressure and temperature.
 
static constexpr bool gasIsCompressible ()
 Returns true if the gas phase is assumed to be compressible.
 
static constexpr bool gasIsIdeal ()
 Returns true if the gas phase is assumed to be ideal.
 
template<class Evaluation >
static Evaluation gasPressure (Evaluation temperature, Evaluation density)
 The pressure of gaseous $H_2$ in $\mathrm{[Pa]}$ at a given density and temperature.
 
template<class Evaluation >
static Evaluation gasInternalEnergy (const Evaluation &temperature, const Evaluation &pressure, bool extrapolate=false)
 Specific internal energy of H2 [J/kg].
 
template<class Evaluation >
static const Evaluation gasEnthalpy (Evaluation temperature, Evaluation pressure, bool extrapolate=false)
 Specific enthalpy $\mathrm{[J/kg]}$ of pure hydrogen gas.
 
template<class Evaluation >
static Evaluation gasViscosity (const Evaluation &temperature, const Evaluation &pressure, bool extrapolate=false)
 The dynamic viscosity $\mathrm{[Pa*s]}$ of $H_2$ at a given pressure and temperature.
 
template<class Evaluation >
static const Evaluation gasHeatCapacity (Evaluation temperature, Evaluation pressure)
 Specific isobaric heat capacity $\mathrm{[J/(kg*K)]}$ of pure hydrogen gas.
 
template<class Evaluation >
static const Evaluation gasIsochoricHeatCapacity (Evaluation temperature, Evaluation pressure)
 Specific isochoric heat capacity $\mathrm{[J/(kg*K)]}$ of pure hydrogen gas.
 
template<class Evaluation >
static Evaluation reducedMolarDensity (const Evaluation &temperature, const Evaluation &pg, bool extrapolate=false)
 Calculate reduced density (rho/rho_crit) from pressure and temperature.
 
template<class Evaluation >
static Evaluation idealGasPartHelmholtz (const Evaluation &T_red, const Evaluation &rho_red)
 The ideal-gas part of Helmholtz energy.
 
template<class Evaluation >
static Evaluation derivIdealHelmholtzWrtRecipRedTemp (const Evaluation &T_red)
 Derivative of the ideal-gas part of Helmholtz energy wrt to reciprocal reduced temperature.
 
template<class Evaluation >
static Evaluation secDerivIdealHelmholtzWrtRecipRedTemp (const Evaluation &T_red)
 Second derivative of the ideal-gas part of Helmholtz energy wrt to reciprocal reduced temperature.
 
template<class Evaluation >
static Evaluation residualPartHelmholtz (const Evaluation &T_red, const Evaluation &rho_red)
 The residual part of Helmholtz energy.
 
template<class Evaluation >
static Evaluation derivResHelmholtzWrtRedRho (const Evaluation &T_red, const Evaluation &rho_red)
 Derivative of the residual part of Helmholtz energy wrt.
 
template<class Evaluation >
static Evaluation secDerivResHelmholtzWrtRedRho (const Evaluation &T_red, const Evaluation &rho_red)
 Second derivative of the residual part of Helmholtz energy wrt.
 
template<class Evaluation >
static Evaluation derivResHelmholtzWrtRecipRedTemp (const Evaluation &T_red, const Evaluation &rho_red)
 Derivative of the residual part of Helmholtz energy wrt.
 
template<class Evaluation >
static Evaluation secDerivResHelmholtzWrtRecipRedTemp (const Evaluation &T_red, const Evaluation &rho_red)
 Second derivative of the residual part of Helmholtz energy wrt.
 
template<class Evaluation >
static Evaluation secDerivResHelmholtzWrtRecipRedTempAndRedRho (const Evaluation &T_red, const Evaluation &rho_red)
 Second derivative of the residual part of Helmholtz energy first wrt.
 
- Static Public Member Functions inherited from Opm::Component< Scalar, H2< Scalar > >
static void init (Scalar, Scalar, unsigned, Scalar, Scalar, unsigned)
 A default routine for initialization, not needed for components and must not be called.
 
static bool gasIsCompressible ()
 Returns true iff the gas phase is assumed to be compressible.
 
static bool gasIsIdeal ()
 Returns true iff the gas phase is assumed to be ideal.
 
static bool liquidIsCompressible ()
 Returns true iff the liquid phase is assumed to be compressible.
 
static std::string_view name ()
 A human readable name for the component.
 
static Scalar molarMass ()
 The molar mass in $\mathrm{[kg]}$ of the component.
 
static Scalar criticalTemperature ()
 Returns the critical temperature in $\mathrm{[K]}$ of the component.
 
static Scalar criticalPressure ()
 Returns the critical pressure in $\mathrm{[Pa]}$ of the component.
 
static Scalar acentricFactor ()
 Returns the acentric factor of the component.
 
static Scalar criticalVolume ()
 Returns the critical volume in $\mathrm{[m2/kmol]}$ of the component.
 
static Scalar tripleTemperature ()
 Returns the temperature in $\mathrm{[K]}$ at the component's triple point.
 
static Scalar triplePressure ()
 Returns the pressure in $\mathrm{[Pa]}$ at the component's triple point.
 
static Evaluation vaporPressure (const Evaluation &)
 The vapor pressure in $\mathrm{[Pa]}$ of the component at a given temperature in $\mathrm{[K]}$.
 
static Evaluation gasDensity (const Evaluation &, const Evaluation &)
 The density in $\mathrm{[kg/m^3]}$ of the component at a given pressure in $\mathrm{[Pa]}$ and temperature in $\mathrm{[K]}$.
 
static Evaluation liquidDensity (const Evaluation &, const Evaluation &)
 The density $\mathrm{[kg/m^3]}$ of the liquid component at a given pressure in $\mathrm{[Pa]}$ and temperature in $\mathrm{[K]}$.
 
static Evaluation gasEnthalpy (const Evaluation &, const Evaluation &)
 Specific enthalpy $\mathrm{[J/kg]}$ of the pure component in gas.
 
static Evaluation liquidEnthalpy (const Evaluation &, const Evaluation &)
 Specific enthalpy $\mathrm{[J/kg]}$ of the pure component in liquid.
 
static Evaluation gasInternalEnergy (const Evaluation &, const Evaluation &)
 Specific internal energy $\mathrm{[J/kg]}$ of the pure component in gas.
 
static Evaluation liquidInternalEnergy (const Evaluation &, const Evaluation &)
 Specific internal energy $\mathrm{[J/kg]}$ of pure the pure component in liquid.
 
static Evaluation gasViscosity (const Evaluation &, const Evaluation &)
 The dynamic viscosity $\mathrm{[Pa*s]}$ of the pure component at a given pressure in $\mathrm{[Pa]}$ and temperature in $\mathrm{[K]}$.
 
static Evaluation liquidViscosity (const Evaluation &, const Evaluation &)
 The dynamic liquid viscosity $\mathrm{[Pa*s]}$ of the pure component.
 
static Evaluation gasThermalConductivity (const Evaluation &, const Evaluation &)
 Thermal conductivity of the component [W/(m^2 K/m)] as a gas.
 
static Evaluation liquidThermalConductivity (const Evaluation &, const Evaluation &)
 Thermal conductivity of the component [W/(m^2 K/m)] as a liquid.
 
static Evaluation gasHeatCapacity (const Evaluation &, const Evaluation &)
 Specific isobaric heat capacity of the component [J/kg] as a gas.
 
static Evaluation liquidHeatCapacity (const Evaluation &, const Evaluation &)
 Specific isobaric heat capacity of the component [J/kg] as a liquid.
 

Static Public Attributes

static const Scalar brineSalinity
 
- Static Public Attributes inherited from Opm::Component< Scalar, H2< Scalar > >
static const bool isTabulated
 

Additional Inherited Members

- Public Types inherited from Opm::Component< Scalar, H2< Scalar > >
typedef Scalar Scalar
 

Detailed Description

template<class Scalar>
class Opm::H2< Scalar >

Properties of pure molecular hydrogen $H_2$.

Most of the properties are calculated based on Leachman JW, Jacobsen RT, Penoncello SG, Lemmon EW. Fundamental equations of state for parahydrogen, normal hydrogen, and orthohydrogen. J Phys Chem Reference Data 2009;38:721e48. Their approach uses the fundamental Helmholtz free energy thermodynamic EOS, which is better suited for many gases such as H2. See also Span R, Lemmon EW, Jacobsen RT, Wagner W, Yokozeki A. A Reference Equation of State for the Thermodynamic Properties of Nitrogen for Temperatures from 63.151 to 1000 K and Pressures to 2200 MPa for explicit equations derived from the fundamental EOS formula.

OBS: All equation and table references here are taken from Leachman et al. (2009) unless otherwise stated!

Template Parameters
ScalarThe type used for scalar values

Member Function Documentation

◆ derivIdealHelmholtzWrtRecipRedTemp()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::derivIdealHelmholtzWrtRecipRedTemp ( const Evaluation &  T_red)
inlinestatic

Derivative of the ideal-gas part of Helmholtz energy wrt to reciprocal reduced temperature.

Parameters
T_redreduced temperature [-]

◆ derivResHelmholtzWrtRecipRedTemp()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::derivResHelmholtzWrtRecipRedTemp ( const Evaluation &  T_red,
const Evaluation &  rho_red 
)
inlinestatic

Derivative of the residual part of Helmholtz energy wrt.

reciprocal reduced temperature.

Parameters
T_redreduced temperature [-]
rho_redreduced density [-]

◆ derivResHelmholtzWrtRedRho()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::derivResHelmholtzWrtRedRho ( const Evaluation &  T_red,
const Evaluation &  rho_red 
)
inlinestatic

Derivative of the residual part of Helmholtz energy wrt.

reduced density.

Parameters
T_redreduced temperature [-]
rho_redreduced density [-]

◆ gasDensity()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::gasDensity ( Evaluation  temperature,
Evaluation  pressure,
bool  extrapolate = false 
)
inlinestatic

The density $\mathrm{[kg/m^3]}$ of $H_2$ at a given pressure and temperature.

Parameters
temperaturetemperature of component in $\mathrm{[K]}$
pressurepressure of component in $\mathrm{[Pa]}$

◆ gasEnthalpy()

template<class Scalar >
template<class Evaluation >
static const Evaluation Opm::H2< Scalar >::gasEnthalpy ( Evaluation  temperature,
Evaluation  pressure,
bool  extrapolate = false 
)
inlinestatic

Specific enthalpy $\mathrm{[J/kg]}$ of pure hydrogen gas.

Parameters
temperaturetemperature of component in $\mathrm{[K]}$
pressurepressure of component in $\mathrm{[Pa]}$

◆ gasHeatCapacity()

template<class Scalar >
template<class Evaluation >
static const Evaluation Opm::H2< Scalar >::gasHeatCapacity ( Evaluation  temperature,
Evaluation  pressure 
)
inlinestatic

Specific isobaric heat capacity $\mathrm{[J/(kg*K)]}$ of pure hydrogen gas.

This is equivalent to the partial derivative of the specific enthalpy to the temperature.

Parameters
temperaturetemperature of component in $\mathrm{[K]}$
pressurepressure of component in $\mathrm{[Pa]}$

◆ gasIsochoricHeatCapacity()

template<class Scalar >
template<class Evaluation >
static const Evaluation Opm::H2< Scalar >::gasIsochoricHeatCapacity ( Evaluation  temperature,
Evaluation  pressure 
)
inlinestatic

Specific isochoric heat capacity $\mathrm{[J/(kg*K)]}$ of pure hydrogen gas.

Parameters
temperaturetemperature of component in $\mathrm{[K]}$
pressurepressure of component in $\mathrm{[Pa]}$

◆ gasMolarDensity()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::gasMolarDensity ( Evaluation  temperature,
Evaluation  pressure,
bool  extrapolate = false 
)
inlinestatic

The molar density of $H_2$ in $\mathrm{[mol/m^3]}$, depending on pressure and temperature.

Parameters
temperatureThe temperature of the gas
pressureThe pressure of the gas

◆ gasPressure()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::gasPressure ( Evaluation  temperature,
Evaluation  density 
)
inlinestatic

The pressure of gaseous $H_2$ in $\mathrm{[Pa]}$ at a given density and temperature.

Parameters
temperaturetemperature of component in $\mathrm{[K]}$
densitydensity of component in $\mathrm{[kg/m^3]}$

◆ gasViscosity()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::gasViscosity ( const Evaluation &  temperature,
const Evaluation &  pressure,
bool  extrapolate = false 
)
inlinestatic

The dynamic viscosity $\mathrm{[Pa*s]}$ of $H_2$ at a given pressure and temperature.

Parameters
temperaturetemperature of component in $\mathrm{[K]}$
pressurepressure of component in $\mathrm{[Pa]}$

See: Muzney et al., J. Chem. Eng. Data 2013, 58, 4, 969–979 (and the corrections!)

◆ idealGasPartHelmholtz()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::idealGasPartHelmholtz ( const Evaluation &  T_red,
const Evaluation &  rho_red 
)
inlinestatic

The ideal-gas part of Helmholtz energy.

Parameters
T_redreduced temperature [-]
rho_redreduced density [-]

◆ reducedMolarDensity()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::reducedMolarDensity ( const Evaluation &  temperature,
const Evaluation &  pg,
bool  extrapolate = false 
)
inlinestatic

Calculate reduced density (rho/rho_crit) from pressure and temperature.

The conversion is done using the simplest root-finding algorithm, i.e. the bisection method.

Parameters
pggas phase pressure [Pa]
temperaturetemperature [K]

◆ residualPartHelmholtz()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::residualPartHelmholtz ( const Evaluation &  T_red,
const Evaluation &  rho_red 
)
inlinestatic

The residual part of Helmholtz energy.

Parameters
T_redreduced temperature [-]
rho_redreduced density [-]

◆ secDerivIdealHelmholtzWrtRecipRedTemp()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::secDerivIdealHelmholtzWrtRecipRedTemp ( const Evaluation &  T_red)
inlinestatic

Second derivative of the ideal-gas part of Helmholtz energy wrt to reciprocal reduced temperature.

Parameters
T_redreduced temperature [-]
rho_redreduced density [-]

◆ secDerivResHelmholtzWrtRecipRedTemp()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::secDerivResHelmholtzWrtRecipRedTemp ( const Evaluation &  T_red,
const Evaluation &  rho_red 
)
inlinestatic

Second derivative of the residual part of Helmholtz energy wrt.

reciprocal reduced temperature.

Parameters
T_redreduced temperature [-]
rho_redreduced density [-]

◆ secDerivResHelmholtzWrtRecipRedTempAndRedRho()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::secDerivResHelmholtzWrtRecipRedTempAndRedRho ( const Evaluation &  T_red,
const Evaluation &  rho_red 
)
inlinestatic

Second derivative of the residual part of Helmholtz energy first wrt.

reciprocal reduced temperature, and second wrt. reduced density (i.e. d^2 H / drho_red dT_red).

Parameters
T_redreduced temperature [-]
rho_redreduced density [-]

◆ secDerivResHelmholtzWrtRedRho()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::secDerivResHelmholtzWrtRedRho ( const Evaluation &  T_red,
const Evaluation &  rho_red 
)
inlinestatic

Second derivative of the residual part of Helmholtz energy wrt.

reduced density.

Parameters
T_redreduced temperature [-]
rho_redreduced density [-]

◆ vaporPressure()

template<class Scalar >
template<class Evaluation >
static Evaluation Opm::H2< Scalar >::vaporPressure ( Evaluation  temperature)
inlinestatic

The vapor pressure in $\mathrm{[Pa]}$ of pure molecular hydrogen at a given temperature.

Parameters
temperaturetemperature of component in $\mathrm{[K]}$

The documentation for this class was generated from the following file: