Loading...
Searching...
No Matches
Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases > Class Template Reference

Implements a "tailor-made" fluid state class for the black-oil model. More...

`#include <BlackOilFluidState.hpp>`

## Public Types

enum | { numPhases = FluidSystem::numPhases }
enum | { numComponents = FluidSystem::numComponents }
using | Scalar = ScalarT

## Public Member Functions

void | checkDefined () const
| Make sure that all attributes are defined.
template<class FluidState >
void | assign (const FluidState &fs)
| Retrieve all parameters from an arbitrary fluid state.
void | setPvtRegionIndex (unsigned newPvtRegionIdx)
| Set the index of the fluid region.
void | setPressure (unsigned phaseIdx, const Scalar &p)
| Set the pressure of a fluid phase [-].
void | setSaturation (unsigned phaseIdx, const Scalar &S)
| Set the saturation of a fluid phase [-].
void | setPc (unsigned phaseIdx, const Scalar &pc)
| Set the capillary pressure of a fluid phase [-].
void | setTotalSaturation (const Scalar &value)
| Set the total saturation used for sequential methods.
void | setTemperature (const Scalar &value)
| Set the temperature [K].
void | setEnthalpy (unsigned phaseIdx, const Scalar &value)
| Set the specific enthalpy [J/kg] of a given fluid phase.
void | setInvB (unsigned phaseIdx, const Scalar &b)
| \ brief Set the inverse formation volume factor of a fluid phase
void | setDensity (unsigned phaseIdx, const Scalar &rho)
| \ brief Set the density of a fluid phase
void | setRs (const Scalar &newRs)
| Set the gas dissolution factor [m^3/m^3] of the oil phase.
void | setRv (const Scalar &newRv)
| Set the oil vaporization factor [m^3/m^3] of the gas phase.
void | setRvw (const Scalar &newRvw)
| Set the water vaporization factor [m^3/m^3] of the gas phase.
void | setRsw (const Scalar &newRsw)
| Set the gas dissolution factor [m^3/m^3] of the water phase.
void | setSaltConcentration (const Scalar &newSaltConcentration)
| Set the salt concentration.
void | setSaltSaturation (const Scalar &newSaltSaturation)
| Set the solid salt saturation.
const Scalar & | pressure (unsigned phaseIdx) const
| Return the pressure of a fluid phase [Pa].
const Scalar & | saturation (unsigned phaseIdx) const
| Return the saturation of a fluid phase [-].
const Scalar & | pc (unsigned phaseIdx) const
| Return the capillary pressure of a fluid phase [-].
const Scalar & | totalSaturation () const
| Return the total saturation needed for sequential.
const Scalar & | temperature (unsigned) const
| Return the temperature [K].
const Scalar & | invB (unsigned phaseIdx) const
| Return the inverse formation volume factor of a fluid phase [-].
const Scalar & | Rs () const
| Return the gas dissolution factor of oil [m^3/m^3].
const Scalar & | Rv () const
| Return the oil vaporization factor of gas [m^3/m^3].
const Scalar & | Rvw () const
| Return the water vaporization factor of gas [m^3/m^3].
const Scalar & | Rsw () const
| Return the gas dissolution factor of water [m^3/m^3].
const Scalar & | saltConcentration () const
| Return the concentration of salt in water.
const Scalar & | saltSaturation () const
| Return the saturation of solid salt.
unsigned short | pvtRegionIndex () const
| Return the PVT region where the current fluid state is assumed to be part of.
Scalar | density (unsigned phaseIdx) const
| Return the density [kg/m^3] of a given fluid phase.
const Scalar & | enthalpy (unsigned phaseIdx) const
| Return the specific enthalpy [J/kg] of a given fluid phase.
Scalar | internalEnergy (unsigned phaseIdx) const
| Return the specific internal energy [J/kg] of a given fluid phase.
Scalar | molarDensity (unsigned phaseIdx) const
| Return the molar density of a fluid phase [mol/m^3].
Scalar | molarVolume (unsigned phaseIdx) const
| Return the molar volume of a fluid phase [m^3/mol].
Scalar | viscosity (unsigned phaseIdx) const
| Return the dynamic viscosity of a fluid phase [Pa s].
Scalar | massFraction (unsigned phaseIdx, unsigned compIdx) const
| Return the mass fraction of a component in a fluid phase [-].
Scalar | moleFraction (unsigned phaseIdx, unsigned compIdx) const
| Return the mole fraction of a component in a fluid phase [-].
Scalar | molarity (unsigned phaseIdx, unsigned compIdx) const
| Return the partial molar density of a component in a fluid phase [mol / m^3].
Scalar | averageMolarMass (unsigned phaseIdx) const
| Return the partial molar density of a fluid phase [kg / mol].
Scalar | fugacityCoefficient (unsigned phaseIdx, unsigned compIdx) const
| Return the fugacity coefficient of a component in a fluid phase [-].
Scalar | fugacity (unsigned phaseIdx, unsigned compIdx) const
| Return the fugacity of a component in a fluid phase [Pa].

## Detailed Description

template<class ScalarT, class FluidSystem, bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>
class Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >

Implements a "tailor-made" fluid state class for the black-oil model.

I.e., it uses exactly the same quantities which are used by the ECL blackoil model. Further quantities are computed "on the fly" and are accessing them is thus relatively slow.

## Member Function Documentation

## checkDefined()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

void Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::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.

## enthalpy()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

const Scalar & Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::enthalpy | ( | unsigned | phaseIdx | ) | const

inline

Return the specific enthalpy [J/kg] of a given fluid phase.

If the EnableEnergy property is not set to true, this method will throw an exception!

## internalEnergy()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

Scalar Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::internalEnergy | ( | unsigned | phaseIdx | ) | const

inline

Return the specific internal energy [J/kg] of a given fluid phase.

If the EnableEnergy property is not set to true, this method will throw an exception!

## invB()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

const Scalar & Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::invB | ( | unsigned | phaseIdx | ) | const

inline

Return the inverse formation volume factor of a fluid phase [-].

This factor expresses the change of density of a pure phase due to increased pressure and temperature at reservoir conditions compared to surface conditions.

## molarVolume()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

Scalar Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::molarVolume | ( | unsigned | phaseIdx | ) | const

inline

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

This is equivalent to the inverse of the molar density.

## Rs()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

const Scalar & Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::Rs | ( |  | ) | const

inline

Return the gas dissolution factor of oil [m^3/m^3].

I.e., the amount of gas which is present in the oil phase in terms of cubic meters of gas at surface conditions per cubic meter of liquid oil at surface conditions. This method is specific to the black-oil model.

## Rsw()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

const Scalar & Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::Rsw | ( |  | ) | const

inline

Return the gas dissolution factor of water [m^3/m^3].

I.e., the amount of gas which is present in the water phase in terms of cubic meters of gas at surface conditions per cubic meter of water at surface conditions. This method is specific to the black-oil model.

## Rv()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

const Scalar & Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::Rv | ( |  | ) | const

inline

Return the oil vaporization factor of gas [m^3/m^3].

I.e., the amount of oil which is present in the gas phase in terms of cubic meters of liquid oil at surface conditions per cubic meter of gas at surface conditions. This method is specific to the black-oil model.

## Rvw()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

const Scalar & Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::Rvw | ( |  | ) | const

inline

Return the water vaporization factor of gas [m^3/m^3].

I.e., the amount of water which is present in the gas phase in terms of cubic meters of liquid water at surface conditions per cubic meter of gas at surface conditions. This method is specific to the black-oil model.

## setEnthalpy()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

void Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::setEnthalpy | ( | unsigned | phaseIdx,
|  | const Scalar & | value
| ) |  |

inline

Set the specific enthalpy [J/kg] of a given fluid phase.

If the enableEnergy template argument is not set to true, this method will throw an exception!

## setPvtRegionIndex()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

void Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::setPvtRegionIndex | ( | unsigned | newPvtRegionIdx | ) |

inline

Set the index of the fluid region.

This determines which tables are used to compute the quantities that are computed on the fly.

## setRs()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

void Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::setRs | ( | const Scalar & | newRs | ) |

inline

Set the gas dissolution factor [m^3/m^3] of the oil phase.

This quantity is very specific to the black-oil model.

## setRsw()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

void Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::setRsw | ( | const Scalar & | newRsw | ) |

inline

Set the gas dissolution factor [m^3/m^3] of the water phase.

This quantity is very specific to the black-oil model.

## setRv()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

void Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::setRv | ( | const Scalar & | newRv | ) |

inline

Set the oil vaporization factor [m^3/m^3] of the gas phase.

This quantity is very specific to the black-oil model.

## setRvw()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

void Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::setRvw | ( | const Scalar & | newRvw | ) |

inline

Set the water vaporization factor [m^3/m^3] of the gas phase.

This quantity is very specific to the black-oil model.

## setTemperature()

template<class ScalarT , class FluidSystem , bool enableTemperature = false, bool enableEnergy = false, bool enableDissolution = true, bool enableVapwat = false, bool enableBrine = false, bool enableSaltPrecipitation = false, bool enableDissolutionInWater = false, unsigned numStoragePhases = FluidSystem::numPhases>

void Opm::BlackOilFluidState< ScalarT, FluidSystem, enableTemperature, enableEnergy, enableDissolution, enableVapwat, enableBrine, enableSaltPrecipitation, enableDissolutionInWater, numStoragePhases >::setTemperature | ( | const Scalar & | value | ) |

inline

Set the temperature [K].

If neither the enableTemperature nor the enableEnergy template arguments are set to true, this method will throw an exception!

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

- opm/material/fluidstates/BlackOilFluidState.hpp