Loading...
Searching...
No Matches
Opm::SaturationOverlayFluidState< FluidState > Class Template Reference

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

`#include <SaturationOverlayFluidState.hpp>`

## Public Types

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

## Public Member Functions

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

## Protected Attributes

const FluidState * | fs_
std::array< Scalar, numPhases > | saturation_

## Detailed Description

template<class FluidState>
class Opm::SaturationOverlayFluidState< FluidState >

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

## Constructor & Destructor Documentation

## SaturationOverlayFluidState()

template<class FluidState >

Opm::SaturationOverlayFluidState< FluidState >::SaturationOverlayFluidState | ( | const FluidState & | fs | ) |

inline explicit

Constructor.

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

## Member Function Documentation

## averageMolarMass()

template<class FluidState >

auto Opm::SaturationOverlayFluidState< 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:

## checkDefined()

template<class FluidState >

void Opm::SaturationOverlayFluidState< 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.

## molarity()

template<class FluidState >

auto Opm::SaturationOverlayFluidState< 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

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

- opm/material/fluidstates/SaturationOverlayFluidState.hpp