Loading...
Searching...
No Matches
GasPhase.hpp
Go to the documentation of this file.
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
Consult the COPYING file in the top-level source directory of this
module for the precise wording of the license and the list of
copyright holders.
*/
#ifndef OPM_GAS_PHASE_HPP
#define OPM_GAS_PHASE_HPP
#include <string_view>
namespace Opm {
template <class Scalar, class ComponentT>
class GasPhase
{
public:
typedef ComponentT Component;
static std::string_view name()
{ return Component::name(); }
static bool isLiquid()
{ return false; }
static bool isCompressible()
{ return Component::gasIsCompressible(); }
static bool isIdealGas()
{ return Component::gasIsIdeal(); }
static Scalar molarMass()
{ return Component::molarMass(); }
static Scalar criticalTemperature()
{ return Component::criticalTemperature(); }
static Scalar criticalPressure()
{ return Component::criticalPressure(); }
static Scalar tripleTemperature()
{ return Component::tripleTemperature(); }
static Scalar triplePressure()
{ return Component::triplePressure(); }
template <class Evaluation>
static Evaluation vaporPressure(const Evaluation& temperature)
{ return Component::vaporPressure(temperature); }
template <class Evaluation>
static Evaluation density(const Evaluation& temperature, const Evaluation& pressure)
{ return Component::gasDensity(temperature, pressure); }
template <class Evaluation>
static Evaluation pressure(const Evaluation& temperature, const Evaluation& density)
{ return Component::gasPressure(temperature, density); }
template <class Evaluation>
static Evaluation enthalpy(const Evaluation& temperature, const Evaluation& pressure)
{ return Component::gasEnthalpy(temperature, pressure); }
template <class Evaluation>
static Evaluation internalEnergy(const Evaluation& temperature, const Evaluation& pressure)
{ return Component::gasInternalEnergy(temperature, pressure); }
template <class Evaluation>
static Evaluation viscosity(const Evaluation& temperature, const Evaluation& pressure)
{ return Component::gasViscosity(temperature, pressure); }
template <class Evaluation>
static Evaluation thermalConductivity(const Evaluation& temperature, const Evaluation& pressure)
{ return Component::gasThermalConductivity(temperature, pressure); }
template <class Evaluation>
static Evaluation heatCapacity(const Evaluation& temperature, const Evaluation& pressure)
{ return Component::gasHeatCapacity(temperature, pressure); }
};
} // namespace Opm
#endif
Opm::Component::name
static std::string_view name()
A human readable name for the component.
Definition Component.hpp:87
Opm::Component::tripleTemperature
static Scalar tripleTemperature()
Returns the temperature in at the component's triple point.
Definition Component.hpp:124
Opm::Component::gasIsCompressible
static bool gasIsCompressible()
Returns true iff the gas phase is assumed to be compressible.
Definition Component.hpp:69
Opm::Component::gasThermalConductivity
static Evaluation gasThermalConductivity(const Evaluation &, const Evaluation &)
Thermal conductivity of the component [W/(m^2 K/m)] as a gas.
Definition Component.hpp:228
Opm::Component::molarMass
static Scalar molarMass()
The molar mass in of the component.
Definition Component.hpp:93
Opm::Component::criticalPressure
static Scalar criticalPressure()
Returns the critical pressure in of the component.
Definition Component.hpp:105
Opm::Component::criticalTemperature
static Scalar criticalTemperature()
Returns the critical temperature in of the component.
Definition Component.hpp:99
Opm::Component::gasHeatCapacity
static Evaluation gasHeatCapacity(const Evaluation &, const Evaluation &)
Specific isobaric heat capacity of the component [J/kg] as a gas.
Definition Component.hpp:242
Opm::Component::gasInternalEnergy
static Evaluation gasInternalEnergy(const Evaluation &, const Evaluation &)
Specific internal energy of the pure component in gas.
Definition Component.hpp:190
Opm::Component::gasEnthalpy
static Evaluation gasEnthalpy(const Evaluation &, const Evaluation &)
Specific enthalpy of the pure component in gas.
Definition Component.hpp:170
Opm::Component::vaporPressure
static Evaluation vaporPressure(const Evaluation &)
The vapor pressure in of the component at a given temperature in .
Definition Component.hpp:140
Opm::Component::triplePressure
static Scalar triplePressure()
Returns the pressure in at the component's triple point.
Definition Component.hpp:130
Opm::Component::gasIsIdeal
static bool gasIsIdeal()
Returns true iff the gas phase is assumed to be ideal.
Definition Component.hpp:75
Opm::Component::gasViscosity
static Evaluation gasViscosity(const Evaluation &, const Evaluation &)
The dynamic viscosity of the pure component at a given pressure in and temperature in .
Definition Component.hpp:211
Opm::Component::gasDensity
static Evaluation gasDensity(const Evaluation &, const Evaluation &)
The density in of the component at a given pressure in and temperature in .
Definition Component.hpp:150
Opm::GasPhase
Represents the gas phase of a single (pseudo-) component.
Definition GasPhase.hpp:40
Opm::GasPhase::isIdealGas
static bool isIdealGas()
Returns true iff the fluid is assumed to be an ideal gas.
Definition GasPhase.hpp:68
Opm::GasPhase::heatCapacity
static Evaluation heatCapacity(const Evaluation &temperature, const Evaluation &pressure)
Specific isobaric heat capacity of the fluid [J/kg].
Definition GasPhase.hpp:172
Opm::GasPhase::triplePressure
static Scalar triplePressure()
Returns the pressure at the component's triple point.
Definition GasPhase.hpp:98
Opm::GasPhase::thermalConductivity
static Evaluation thermalConductivity(const Evaluation &temperature, const Evaluation &pressure)
Thermal conductivity of the fluid [W/(m^2 K/m)].
Definition GasPhase.hpp:163
Opm::GasPhase::criticalTemperature
static Scalar criticalTemperature()
Returns the critical temperature of the component.
Definition GasPhase.hpp:80
Opm::GasPhase::name
static std::string_view name()
A human readable name for the component.
Definition GasPhase.hpp:50
Opm::GasPhase::pressure
static Evaluation pressure(const Evaluation &temperature, const Evaluation &density)
The pressure [Pa] of the component at a given density and temperature.
Definition GasPhase.hpp:127
Opm::GasPhase::internalEnergy
static Evaluation internalEnergy(const Evaluation &temperature, const Evaluation &pressure)
Specific internal energy [J/kg] the pure component as a gas.
Definition GasPhase.hpp:145
Opm::GasPhase::isLiquid
static bool isLiquid()
Returs whether the fluid is a liquid.
Definition GasPhase.hpp:56
Opm::GasPhase::molarMass
static Scalar molarMass()
The mass in [kg] of one mole of the component.
Definition GasPhase.hpp:74
Opm::GasPhase::tripleTemperature
static Scalar tripleTemperature()
Returns the temperature at the component's triple point.
Definition GasPhase.hpp:92
Opm::GasPhase::vaporPressure
static Evaluation vaporPressure(const Evaluation &temperature)
The vapor pressure in [N/m^2] of the component at a given temperature.
Definition GasPhase.hpp:108
Opm::GasPhase::isCompressible
static bool isCompressible()
Returns true iff the fluid is assumed to be compressible.
Definition GasPhase.hpp:62
Opm::GasPhase::enthalpy
static Evaluation enthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy [J/kg] the pure component as a gas.
Definition GasPhase.hpp:136
Opm::GasPhase::viscosity
static Evaluation viscosity(const Evaluation &temperature, const Evaluation &pressure)
The dynamic viscosity [Pa s] of the pure component at a given pressure and temperature.
Definition GasPhase.hpp:154
Opm::GasPhase::Component
ComponentT Component
The type of the phase's underlying (pseudo-) component.
Definition GasPhase.hpp:45
Opm::GasPhase::criticalPressure
static Scalar criticalPressure()
Returns the critical pressure of the component.
Definition GasPhase.hpp:86
Opm::GasPhase::density
static Evaluation density(const Evaluation &temperature, const Evaluation &pressure)
The density [kg/m^3] of the component at a given pressure and temperature.
Definition GasPhase.hpp:117
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30