Loading...
Searching...
No Matches
Component.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_COMPONENT_HPP
#define OPM_COMPONENT_HPP
#include <stdexcept>
#include <string_view>
namespace Opm {
template <class ScalarT, class Implementation>
class Component
{
public:
typedef ScalarT Scalar;
static constexpr bool isTabulated = false;
static void init(Scalar /* tempMin */, Scalar /* tempMax */, unsigned /* nTemp */,
Scalar /* pressMin */, Scalar /* pressMax */, unsigned /* nPress */)
{ }
static bool gasIsCompressible()
{ throw std::runtime_error("Not implemented: Component::gasIsCompressible()"); }
static bool gasIsIdeal()
{ throw std::runtime_error("Not implemented: Component::gasIsIdeal()"); }
static bool liquidIsCompressible()
{ throw std::runtime_error("Not implemented: Component::liquidIsCompressible()"); }
static std::string_view name()
{ throw std::runtime_error("Not implemented: Component::name()"); }
static Scalar molarMass()
{ throw std::runtime_error("Not implemented: Component::molarMass()"); }
static Scalar criticalTemperature()
{ throw std::runtime_error("Not implemented: Component::criticalTemperature()"); }
static Scalar criticalPressure()
{ throw std::runtime_error("Not implemented: Component::criticalPressure()"); }
static Scalar acentricFactor()
{ throw std::runtime_error("Not implemented: acentricFactor of the component"); }
static Scalar criticalVolume()
{ throw std::runtime_error("Not implemented: criticalVolume of the compoenent"); }
static Scalar tripleTemperature()
{ throw std::runtime_error("Not implemented: Component::tripleTemperature()"); }
static Scalar triplePressure()
{ throw std::runtime_error("Not implemented: Component::triplePressure()"); }
template <class Evaluation>
static Evaluation vaporPressure(const Evaluation& /* temperature */)
{ throw std::runtime_error("Not implemented: Component::vaporPressure()"); }
template <class Evaluation>
static Evaluation gasDensity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ throw std::runtime_error("Not implemented: Component::gasDensity()"); }
template <class Evaluation>
static Evaluation liquidDensity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ throw std::runtime_error("Not implemented: Component::liquidDensity()"); }
template <class Evaluation>
static Evaluation gasEnthalpy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ throw std::runtime_error("Not implemented: Component::gasEnthalpy()"); }
template <class Evaluation>
static Evaluation liquidEnthalpy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ throw std::runtime_error("Not implemented: Component::liquidEnthalpy()"); }
template <class Evaluation>
static Evaluation gasInternalEnergy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ throw std::runtime_error("Not implemented: Component::gasInternalEnergy()"); }
template <class Evaluation>
static Evaluation liquidInternalEnergy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ throw std::runtime_error("Not implemented: Component::liquidInternalEnergy()"); }
template <class Evaluation>
static Evaluation gasViscosity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ throw std::runtime_error("Not implemented: Component::gasViscosity()"); }
template <class Evaluation>
static Evaluation liquidViscosity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ throw std::runtime_error("Not implemented: Component::liquidViscosity()"); }
template <class Evaluation>
static Evaluation gasThermalConductivity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ throw std::runtime_error("Not implemented: Component::gasThermalConductivity()"); }
template <class Evaluation>
static Evaluation liquidThermalConductivity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ throw std::runtime_error("Not implemented: Component::liquidThermalConductivity()"); }
template <class Evaluation>
static Evaluation gasHeatCapacity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ throw std::runtime_error("Not implemented: Component::gasHeatCapacity()"); }
template <class Evaluation>
static Evaluation liquidHeatCapacity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
{ throw std::runtime_error("Not implemented: Component::liquidHeatCapacity()"); }
};
} // namespace Opm
#endif
Opm::Component
Abstract base class of a pure chemical species.
Definition Component.hpp:44
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::acentricFactor
static Scalar acentricFactor()
Returns the acentric factor of the component.
Definition Component.hpp:112
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::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::liquidViscosity
static Evaluation liquidViscosity(const Evaluation &, const Evaluation &)
The dynamic liquid viscosity of the pure component.
Definition Component.hpp:221
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::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::criticalVolume
static Scalar criticalVolume()
Returns the critical volume in of the component.
Definition Component.hpp:118
Opm::Component::init
static void init(Scalar, Scalar, unsigned, Scalar, Scalar, unsigned)
A default routine for initialization, not needed for components and must not be called.
Definition Component.hpp:62
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::Component::liquidInternalEnergy
static Evaluation liquidInternalEnergy(const Evaluation &, const Evaluation &)
Specific internal energy of pure the pure component in liquid.
Definition Component.hpp:200
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30