Opm::TemperatureOverlayFluidState< FluidState > Class Template Reference

This is a fluid state which allows to set the fluid temperatures and takes all other quantities from an other fluid state. More...

#include <TemperatureOverlayFluidState.hpp>

Public Types

enum  { numPhases = FluidState::numPhases }
 
enum  { numComponents = FluidState::numComponents }
 
typedef FluidState::Scalar Scalar
 

Public Member Functions

 TemperatureOverlayFluidState (const FluidState &fs)
 Constructor. More...
 
 TemperatureOverlayFluidState (Scalar T, const FluidState &fs)
 
 TemperatureOverlayFluidState (const TemperatureOverlayFluidState &fs)
 
TemperatureOverlayFluidStateoperator= (const TemperatureOverlayFluidState &fs)
 
auto saturation (unsigned phaseIdx) const -> decltype(std::declval< FluidState >().saturation(phaseIdx))
 Returns the saturation of a phase []. More...
 
auto moleFraction (unsigned phaseIdx, unsigned compIdx) const -> decltype(std::declval< FluidState >().moleFraction(phaseIdx, compIdx))
 The mole fraction of a component in a phase []. More...
 
auto massFraction (unsigned phaseIdx, unsigned compIdx) const -> decltype(std::declval< FluidState >().massFraction(phaseIdx, compIdx))
 The mass fraction of a component in a phase []. More...
 
auto averageMolarMass (unsigned phaseIdx) const -> decltype(std::declval< FluidState >().averageMolarMass(phaseIdx))
 The average molar mass of a fluid phase [kg/mol]. More...
 
auto molarity (unsigned phaseIdx, unsigned compIdx) const -> decltype(std::declval< FluidState >().molarity(phaseIdx, compIdx))
 The molar concentration of a component in a phase [mol/m^3]. More...
 
auto fugacity (unsigned phaseIdx, unsigned compIdx) const -> decltype(std::declval< FluidState >().fugacity(phaseIdx, compIdx))
 The fugacity of a component in a phase [Pa]. More...
 
auto fugacityCoefficient (unsigned phaseIdx, unsigned compIdx) const -> decltype(std::declval< FluidState >().fugacityCoefficient(phaseIdx, compIdx))
 The fugacity coefficient of a component in a phase []. More...
 
auto molarVolume (unsigned phaseIdx) const -> decltype(std::declval< FluidState >().molarVolume(phaseIdx))
 The molar volume of a fluid phase [m^3/mol]. More...
 
auto density (unsigned phaseIdx) const -> decltype(std::declval< FluidState >().density(phaseIdx))
 The mass density of a fluid phase [kg/m^3]. More...
 
auto molarDensity (unsigned phaseIdx) const -> decltype(std::declval< FluidState >().molarDensity(phaseIdx))
 The molar density of a fluid phase [mol/m^3]. More...
 
const Scalartemperature (unsigned) const
 The temperature of a fluid phase [K]. More...
 
auto pressure (unsigned phaseIdx) const -> decltype(std::declval< FluidState >().pressure(phaseIdx))
 The pressure of a fluid phase [Pa]. More...
 
auto enthalpy (unsigned phaseIdx) const -> decltype(std::declval< FluidState >().enthalpy(phaseIdx))
 The specific enthalpy of a fluid phase [J/kg]. More...
 
auto internalEnergy (unsigned phaseIdx) const -> decltype(std::declval< FluidState >().internalEnergy(phaseIdx))
 The specific internal energy of a fluid phase [J/kg]. More...
 
auto viscosity (unsigned phaseIdx) const -> decltype(std::declval< FluidState >().viscosity(phaseIdx))
 The dynamic viscosity of a fluid phase [Pa s]. More...
 
void setTemperature (const Scalar &value)
 Set the temperature [K] of a fluid phase. More...
 
void checkDefined () const
 Make sure that all attributes are defined. More...
 

Protected Attributes

const FluidState * fs_
 
Scalar temperature_
 

Detailed Description

template<class FluidState>
class Opm::TemperatureOverlayFluidState< FluidState >

This is a fluid state which allows to set the fluid temperatures and takes all other quantities from an other fluid state.

Member Typedef Documentation

◆ Scalar

template<class FluidState >
typedef FluidState::Scalar Opm::TemperatureOverlayFluidState< FluidState >::Scalar

Member Enumeration Documentation

◆ anonymous enum

template<class FluidState >
anonymous enum
Enumerator
numPhases 

◆ anonymous enum

template<class FluidState >
anonymous enum
Enumerator
numComponents 

Constructor & Destructor Documentation

◆ TemperatureOverlayFluidState() [1/3]

template<class FluidState >
Opm::TemperatureOverlayFluidState< FluidState >::TemperatureOverlayFluidState ( const FluidState &  fs)
inline

Constructor.

The overlay fluid state copies the temperature from the first fluid phase of the argument, so it initially behaves exactly like the underlying fluid state, provided that the underlying fluid state is in thermal equilibrium.

References Opm::TemperatureOverlayFluidState< FluidState >::temperature_.

◆ TemperatureOverlayFluidState() [2/3]

template<class FluidState >
Opm::TemperatureOverlayFluidState< FluidState >::TemperatureOverlayFluidState ( Scalar  T,
const FluidState &  fs 
)
inline

◆ TemperatureOverlayFluidState() [3/3]

template<class FluidState >
Opm::TemperatureOverlayFluidState< FluidState >::TemperatureOverlayFluidState ( const TemperatureOverlayFluidState< FluidState > &  fs)
inline

Member Function Documentation

◆ averageMolarMass()

template<class FluidState >
auto Opm::TemperatureOverlayFluidState< FluidState >::averageMolarMass ( unsigned  phaseIdx) const -> decltype(std::declval<FluidState>().averageMolarMass(phaseIdx))
inline

The average molar mass of a fluid phase [kg/mol].

The average mass is the mean molar mass of a molecule of the fluid at current composition. It is defined as the sum of the component's molar masses weighted by the current mole fraction:

\[ \bar M_\alpha = \sum_\kappa M^\kappa x_\alpha^\kappa \]

References Opm::TemperatureOverlayFluidState< FluidState >::fs_.

◆ checkDefined()

template<class FluidState >
void Opm::TemperatureOverlayFluidState< FluidState >::checkDefined ( ) const
inline

Make sure that all attributes are defined.

This method does not do anything if the program is not run under valgrind. If it is, then valgrind will print an error message if some attributes of the object have not been properly defined.

References Opm::Valgrind::CheckDefined(), and Opm::TemperatureOverlayFluidState< FluidState >::temperature_.

◆ density()

template<class FluidState >
auto Opm::TemperatureOverlayFluidState< FluidState >::density ( unsigned  phaseIdx) const -> decltype(std::declval<FluidState>().density(phaseIdx))
inline

The mass density of a fluid phase [kg/m^3].

References Opm::TemperatureOverlayFluidState< FluidState >::fs_.

◆ enthalpy()

template<class FluidState >
auto Opm::TemperatureOverlayFluidState< FluidState >::enthalpy ( unsigned  phaseIdx) const -> decltype(std::declval<FluidState>().enthalpy(phaseIdx))
inline

The specific enthalpy of a fluid phase [J/kg].

References Opm::TemperatureOverlayFluidState< FluidState >::fs_.

◆ fugacity()

template<class FluidState >
auto Opm::TemperatureOverlayFluidState< FluidState >::fugacity ( unsigned  phaseIdx,
unsigned  compIdx 
) const -> decltype(std::declval<FluidState>().fugacity(phaseIdx, compIdx))
inline

The fugacity of a component in a phase [Pa].

References Opm::TemperatureOverlayFluidState< FluidState >::fs_.

◆ fugacityCoefficient()

template<class FluidState >
auto Opm::TemperatureOverlayFluidState< FluidState >::fugacityCoefficient ( unsigned  phaseIdx,
unsigned  compIdx 
) const -> decltype(std::declval<FluidState>().fugacityCoefficient(phaseIdx, compIdx))
inline

The fugacity coefficient of a component in a phase [].

References Opm::TemperatureOverlayFluidState< FluidState >::fs_.

◆ internalEnergy()

template<class FluidState >
auto Opm::TemperatureOverlayFluidState< FluidState >::internalEnergy ( unsigned  phaseIdx) const -> decltype(std::declval<FluidState>().internalEnergy(phaseIdx))
inline

The specific internal energy of a fluid phase [J/kg].

References Opm::TemperatureOverlayFluidState< FluidState >::fs_.

◆ massFraction()

template<class FluidState >
auto Opm::TemperatureOverlayFluidState< FluidState >::massFraction ( unsigned  phaseIdx,
unsigned  compIdx 
) const -> decltype(std::declval<FluidState>().massFraction(phaseIdx, compIdx))
inline

The mass fraction of a component in a phase [].

References Opm::TemperatureOverlayFluidState< FluidState >::fs_.

◆ molarDensity()

template<class FluidState >
auto Opm::TemperatureOverlayFluidState< FluidState >::molarDensity ( unsigned  phaseIdx) const -> decltype(std::declval<FluidState>().molarDensity(phaseIdx))
inline

The molar density of a fluid phase [mol/m^3].

References Opm::TemperatureOverlayFluidState< FluidState >::fs_.

◆ molarity()

template<class FluidState >
auto Opm::TemperatureOverlayFluidState< FluidState >::molarity ( unsigned  phaseIdx,
unsigned  compIdx 
) const -> decltype(std::declval<FluidState>().molarity(phaseIdx, compIdx))
inline

The molar concentration of a component in a phase [mol/m^3].

This quantity is usually called "molar concentration" or just "concentration", but there are many other (though less common) measures for concentration.

http://en.wikipedia.org/wiki/Concentration

References Opm::TemperatureOverlayFluidState< FluidState >::fs_.

◆ molarVolume()

template<class FluidState >
auto Opm::TemperatureOverlayFluidState< FluidState >::molarVolume ( unsigned  phaseIdx) const -> decltype(std::declval<FluidState>().molarVolume(phaseIdx))
inline

The molar volume of a fluid phase [m^3/mol].

References Opm::TemperatureOverlayFluidState< FluidState >::fs_.

◆ moleFraction()

template<class FluidState >
auto Opm::TemperatureOverlayFluidState< FluidState >::moleFraction ( unsigned  phaseIdx,
unsigned  compIdx 
) const -> decltype(std::declval<FluidState>().moleFraction(phaseIdx, compIdx))
inline

The mole fraction of a component in a phase [].

References Opm::TemperatureOverlayFluidState< FluidState >::fs_.

◆ operator=()

◆ pressure()

template<class FluidState >
auto Opm::TemperatureOverlayFluidState< FluidState >::pressure ( unsigned  phaseIdx) const -> decltype(std::declval<FluidState>().pressure(phaseIdx))
inline

The pressure of a fluid phase [Pa].

References Opm::TemperatureOverlayFluidState< FluidState >::fs_.

◆ saturation()

template<class FluidState >
auto Opm::TemperatureOverlayFluidState< FluidState >::saturation ( unsigned  phaseIdx) const -> decltype(std::declval<FluidState>().saturation(phaseIdx))
inline

Returns the saturation of a phase [].

References Opm::TemperatureOverlayFluidState< FluidState >::fs_.

◆ setTemperature()

template<class FluidState >
void Opm::TemperatureOverlayFluidState< FluidState >::setTemperature ( const Scalar value)
inline

Set the temperature [K] of a fluid phase.

References Opm::TemperatureOverlayFluidState< FluidState >::temperature_.

◆ temperature()

template<class FluidState >
const Scalar & Opm::TemperatureOverlayFluidState< FluidState >::temperature ( unsigned  ) const
inline

The temperature of a fluid phase [K].

References Opm::TemperatureOverlayFluidState< FluidState >::temperature_.

◆ viscosity()

template<class FluidState >
auto Opm::TemperatureOverlayFluidState< FluidState >::viscosity ( unsigned  phaseIdx) const -> decltype(std::declval<FluidState>().viscosity(phaseIdx))
inline

The dynamic viscosity of a fluid phase [Pa s].

References Opm::TemperatureOverlayFluidState< FluidState >::fs_.

Member Data Documentation

◆ fs_

◆ temperature_


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