Loading...
Searching...
No Matches
Unit.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_UNIT_HPP
#define OPM_UNIT_HPP
#include "Component.hpp"
#include <string_view>
namespace Opm
{
template <class Scalar>
class Unit : public Component<Scalar, Unit<Scalar> >
{
public:
static std::string_view name()
{ return "Unit"; }
static Scalar molarMass()
{ return 1.0; }
static Scalar criticalTemperature()
{ return 1.0; }
static Scalar criticalPressure()
{ return 1.0; }
static Scalar tripleTemperature()
{ return 1.0; }
static Scalar triplePressure()
{ return 1.0; }
template <class Evaluation>
static Evaluation vaporPressure(const Evaluation& /* temperature */)
{ return 1.0; }
static bool liquidIsCompressible()
{ return false; }
static bool gasIsCompressible()
{ return false; }
static bool gasIsIdeal()
{ return false; }
template <class Evaluation>
static Evaluation liquidDensity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ return 1.0; }
template <class Evaluation>
static Evaluation liquidViscosity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ return 1.0; }
template <class Evaluation>
static Evaluation gasDensity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ return 1.0; }
template <class Evaluation>
static Evaluation gasViscosity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ return 1.0; }
template <class Evaluation>
static Evaluation gasEnthalpy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ return 1.0; }
template <class Evaluation>
static Evaluation liquidEnthalpy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ return 1.0; }
template <class Evaluation>
static Evaluation gasInternalEnergy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ return 1.0; }
template <class Evaluation>
static Evaluation liquidInternalEnergy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ return 1.0; }
template <class Evaluation>
static Evaluation gasThermalConductivity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ return 1.0; }
template <class Evaluation>
static Evaluation liquidThermalConductivity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ return 1.0; }
template <class Evaluation>
static Evaluation gasHeatCapacity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ return 1.0; }
template <class Evaluation>
static Evaluation liquidHeatCapacity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ return 1.0; }
};
} // namespace Opm
#endif
Component.hpp
Abstract base class of a pure chemical species.
Opm::Component
Abstract base class of a pure chemical species.
Definition Component.hpp:44
Opm::Unit
A component where all quantities are fixed at 1.0.
Definition Unit.hpp:48
Opm::Unit::gasThermalConductivity
static Evaluation gasThermalConductivity(const Evaluation &, const Evaluation &)
Thermal conductivity of the component [W/(m^2 K/m)] as a gas.
Definition Unit.hpp:173
Opm::Unit::triplePressure
static Scalar triplePressure()
Returns the pressure in at the component's triple point.
Definition Unit.hpp:84
Opm::Unit::gasHeatCapacity
static Evaluation gasHeatCapacity(const Evaluation &, const Evaluation &)
Specific isobaric heat capacity of the component [J/kg] as a gas.
Definition Unit.hpp:187
Opm::Unit::liquidViscosity
static Evaluation liquidViscosity(const Evaluation &, const Evaluation &)
The dynamic liquid viscosity of the pure component.
Definition Unit.hpp:123
Opm::Unit::gasEnthalpy
static Evaluation gasEnthalpy(const Evaluation &, const Evaluation &)
Specific enthalpy of the pure component in gas.
Definition Unit.hpp:145
Opm::Unit::gasIsCompressible
static bool gasIsCompressible()
Returns true iff the gas phase is assumed to be compressible.
Definition Unit.hpp:103
Opm::Unit::name
static std::string_view name()
A human readable name for the component.
Definition Unit.hpp:54
Opm::Unit::tripleTemperature
static Scalar tripleTemperature()
Returns the temperature in at the component's triple point.
Definition Unit.hpp:78
Opm::Unit::liquidInternalEnergy
static Evaluation liquidInternalEnergy(const Evaluation &, const Evaluation &)
Specific internal energy of pure the pure component in liquid.
Definition Unit.hpp:166
Opm::Unit::gasInternalEnergy
static Evaluation gasInternalEnergy(const Evaluation &, const Evaluation &)
Specific internal energy of the pure component in gas.
Definition Unit.hpp:159
Opm::Unit::molarMass
static Scalar molarMass()
The molar mass in of the component.
Definition Unit.hpp:60
Opm::Unit::liquidDensity
static Evaluation liquidDensity(const Evaluation &, const Evaluation &)
The density of the liquid component at a given pressure in and temperature in .
Definition Unit.hpp:116
Opm::Unit::gasDensity
static Evaluation gasDensity(const Evaluation &, const Evaluation &)
The density in of the component at a given pressure in and temperature in .
Definition Unit.hpp:130
Opm::Unit::gasIsIdeal
static bool gasIsIdeal()
Returns true iff the gas phase is assumed to be ideal.
Definition Unit.hpp:109
Opm::Unit::criticalTemperature
static Scalar criticalTemperature()
Returns the critical temperature in of the component.
Definition Unit.hpp:66
Opm::Unit::liquidHeatCapacity
static Evaluation liquidHeatCapacity(const Evaluation &, const Evaluation &)
Specific isobaric heat capacity of the component [J/kg] as a liquid.
Definition Unit.hpp:194
Opm::Unit::gasViscosity
static Evaluation gasViscosity(const Evaluation &, const Evaluation &)
The dynamic viscosity of the pure component at a given pressure in and temperature in .
Definition Unit.hpp:137
Opm::Unit::vaporPressure
static Evaluation vaporPressure(const Evaluation &)
The vapor pressure in of the component at a given temperature in .
Definition Unit.hpp:91
Opm::Unit::criticalPressure
static Scalar criticalPressure()
Returns the critical pressure in of the component.
Definition Unit.hpp:72
Opm::Unit::liquidEnthalpy
static Evaluation liquidEnthalpy(const Evaluation &, const Evaluation &)
Specific enthalpy of the pure component in liquid.
Definition Unit.hpp:152
Opm::Unit::liquidIsCompressible
static bool liquidIsCompressible()
Returns true iff the liquid phase is assumed to be compressible.
Definition Unit.hpp:97
Opm::Unit::liquidThermalConductivity
static Evaluation liquidThermalConductivity(const Evaluation &, const Evaluation &)
Thermal conductivity of the component [W/(m^2 K/m)] as a liquid.
Definition Unit.hpp:180
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30