Opm::PressureOverlayFluidState< FluidState > Class Template Reference

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

#include <PressureOverlayFluidState.hpp>

Public Types

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

Public Member Functions

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

Protected Attributes

const FluidState * fs_
 
std::array< Scalar, numPhasespressure_
 

Detailed Description

template<class FluidState>
class Opm::PressureOverlayFluidState< FluidState >

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

Member Typedef Documentation

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

Member Enumeration Documentation

template<class FluidState >
anonymous enum
Enumerator
numPhases 
template<class FluidState >
anonymous enum
Enumerator
numComponents 

Constructor & Destructor Documentation

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

Constructor.

The overlay fluid state copies the pressures from the argument, so it initially behaves exactly like the underlying fluid state.

References Opm::PressureOverlayFluidState< FluidState >::numPhases, and Opm::PressureOverlayFluidState< FluidState >::pressure_.

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

Member Function Documentation

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::averageMolarMass ( unsigned  phaseIdx) const
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::PressureOverlayFluidState< FluidState >::fs_.

template<class FluidState >
void Opm::PressureOverlayFluidState< 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 Valgrind::CheckDefined(), and Opm::PressureOverlayFluidState< FluidState >::pressure_.

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::density ( unsigned  phaseIdx) const
inline

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

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

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::enthalpy ( unsigned  phaseIdx) const
inline

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

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

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::fugacity ( unsigned  phaseIdx,
unsigned  compIdx 
) const
inline

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

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

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::fugacityCoefficient ( unsigned  phaseIdx,
unsigned  compIdx 
) const
inline

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

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

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::internalEnergy ( unsigned  phaseIdx) const
inline

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

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

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::massFraction ( unsigned  phaseIdx,
unsigned  compIdx 
) const
inline

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

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

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::molarDensity ( unsigned  phaseIdx) const
inline

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

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

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::molarity ( unsigned  phaseIdx,
unsigned  compIdx 
) const
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::PressureOverlayFluidState< FluidState >::fs_.

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::molarVolume ( unsigned  phaseIdx) const
inline

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

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

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::moleFraction ( unsigned  phaseIdx,
unsigned  compIdx 
) const
inline

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

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

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::pressure ( unsigned  phaseIdx) const
inline

The pressure of a fluid phase [Pa].

References Opm::PressureOverlayFluidState< FluidState >::pressure_.

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::saturation ( unsigned  phaseIdx) const
inline

Returns the saturation of a phase [].

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

template<class FluidState >
void Opm::PressureOverlayFluidState< FluidState >::setPressure ( unsigned  phaseIdx,
Scalar  value 
)
inline

Set the pressure [Pa] of a fluid phase.

References Opm::PressureOverlayFluidState< FluidState >::pressure_.

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::temperature ( unsigned  phaseIdx) const
inline

The temperature of a fluid phase [K].

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

template<class FluidState >
Scalar Opm::PressureOverlayFluidState< FluidState >::viscosity ( unsigned  phaseIdx) const
inline

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

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

Member Data Documentation


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