Loading...
Searching...
No Matches
LiquidPhase.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_LIQUID_PHASE_HPP
#define OPM_LIQUID_PHASE_HPP
#include <string_view>
namespace Opm {
template <class Scalar, class ComponentT>
class LiquidPhase
{
public:
typedef ComponentT Component;
static std::string_view name()
{ return Component::name(); }
static bool isLiquid()
{ return true; }
static bool isCompressible()
{ return Component::liquidIsCompressible(); }
static bool isIdealGas()
{ return false; /* we're a liquid! */ }
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::liquidDensity(temperature, pressure); }
template <class Evaluation>
static Evaluation pressure(const Evaluation& temperature, const Evaluation& density)
{ return Component::liquidPressure(temperature, density); }
template <class Evaluation>
static const Evaluation enthalpy(const Evaluation& temperature, const Evaluation& pressure)
{ return Component::liquidEnthalpy(temperature, pressure); }
template <class Evaluation>
static const Evaluation internalEnergy(const Evaluation& temperature, const Evaluation& pressure)
{ return Component::liquidInternalEnergy(temperature, pressure); }
template <class Evaluation>
static Evaluation viscosity(const Evaluation& temperature, const Evaluation& pressure)
{ return Component::liquidViscosity(temperature, pressure); }
template <class Evaluation>
static Evaluation thermalConductivity(const Evaluation& temperature, const Evaluation& pressure)
{ return Component::liquidThermalConductivity(temperature, pressure); }
template <class Evaluation>
static Evaluation heatCapacity(const Evaluation& temperature, const Evaluation& pressure)
{ return Component::liquidHeatCapacity(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::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::liquidHeatCapacity
static Evaluation liquidHeatCapacity(const Evaluation &, const Evaluation &)
Specific isobaric heat capacity of the component [J/kg] as a liquid.
Definition Component.hpp:249
Opm::Component::liquidThermalConductivity
static Evaluation liquidThermalConductivity(const Evaluation &, const Evaluation &)
Thermal conductivity of the component [W/(m^2 K/m)] as a liquid.
Definition Component.hpp:235
Opm::Component::criticalTemperature
static Scalar criticalTemperature()
Returns the critical temperature in of the component.
Definition Component.hpp:99
Opm::Component::liquidViscosity
static Evaluation liquidViscosity(const Evaluation &, const Evaluation &)
The dynamic liquid viscosity of the pure component.
Definition Component.hpp:221
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::liquidIsCompressible
static bool liquidIsCompressible()
Returns true iff the liquid phase is assumed to be compressible.
Definition Component.hpp:81
Opm::Component::liquidDensity
static Evaluation liquidDensity(const Evaluation &, const Evaluation &)
The density of the liquid component at a given pressure in and temperature in .
Definition Component.hpp:160
Opm::Component::triplePressure
static Scalar triplePressure()
Returns the pressure in at the component's triple point.
Definition Component.hpp:130
Opm::Component::liquidEnthalpy
static Evaluation liquidEnthalpy(const Evaluation &, const Evaluation &)
Specific enthalpy of the pure component in liquid.
Definition Component.hpp:180
Opm::Component::liquidInternalEnergy
static Evaluation liquidInternalEnergy(const Evaluation &, const Evaluation &)
Specific internal energy of pure the pure component in liquid.
Definition Component.hpp:200
Opm::LiquidPhase
Represents the liquid phase of a single (pseudo-) component.
Definition LiquidPhase.hpp:40
Opm::LiquidPhase::criticalTemperature
static Scalar criticalTemperature()
Returns the critical temperature of the component.
Definition LiquidPhase.hpp:66
Opm::LiquidPhase::vaporPressure
static Evaluation vaporPressure(const Evaluation &temperature)
The vapor pressure in [N/m^2] of the component at a given temperature.
Definition LiquidPhase.hpp:83
Opm::LiquidPhase::internalEnergy
static const Evaluation internalEnergy(const Evaluation &temperature, const Evaluation &pressure)
Specific internal energy [J/kg] the pure component as a gas.
Definition LiquidPhase.hpp:103
Opm::LiquidPhase::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 LiquidPhase.hpp:108
Opm::LiquidPhase::criticalPressure
static Scalar criticalPressure()
Returns the critical pressure of the component.
Definition LiquidPhase.hpp:70
Opm::LiquidPhase::tripleTemperature
static Scalar tripleTemperature()
Returns the temperature at the component's triple point.
Definition LiquidPhase.hpp:74
Opm::LiquidPhase::Component
ComponentT Component
The type of the phase's underlying (pseudo-) component.
Definition LiquidPhase.hpp:43
Opm::LiquidPhase::name
static std::string_view name()
A human readable name for the component.
Definition LiquidPhase.hpp:46
Opm::LiquidPhase::molarMass
static Scalar molarMass()
The mass in [kg] of one mole of the component.
Definition LiquidPhase.hpp:62
Opm::LiquidPhase::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 LiquidPhase.hpp:88
Opm::LiquidPhase::triplePressure
static Scalar triplePressure()
Returns the pressure at the component's triple point.
Definition LiquidPhase.hpp:78
Opm::LiquidPhase::enthalpy
static const Evaluation enthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy [J/kg] the pure component as a gas.
Definition LiquidPhase.hpp:98
Opm::LiquidPhase::isIdealGas
static bool isIdealGas()
Returns true iff the fluid is assumed to be an ideal gas.
Definition LiquidPhase.hpp:58
Opm::LiquidPhase::thermalConductivity
static Evaluation thermalConductivity(const Evaluation &temperature, const Evaluation &pressure)
Thermal conductivity of the fluid [W/(m^2 K/m)].
Definition LiquidPhase.hpp:113
Opm::LiquidPhase::heatCapacity
static Evaluation heatCapacity(const Evaluation &temperature, const Evaluation &pressure)
Specific isobaric heat capacity of the fluid [J/kg].
Definition LiquidPhase.hpp:118
Opm::LiquidPhase::isLiquid
static bool isLiquid()
Returs whether the fluid is a liquid.
Definition LiquidPhase.hpp:50
Opm::LiquidPhase::pressure
static Evaluation pressure(const Evaluation &temperature, const Evaluation &density)
The pressure [Pa] of the component at a given density and temperature.
Definition LiquidPhase.hpp:93
Opm::LiquidPhase::isCompressible
static bool isCompressible()
Returns true iff the fluid is assumed to be compressible.
Definition LiquidPhase.hpp:54
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30