|
opm-common
|
Implements a "tailor-made" fluid state class for the black-oil model. More...
#include <BlackOilFluidState.hpp>
Public Types | |
| using | FluidSystem = FluidSystemT |
| using | ValueType = ValueT |
Public Member Functions | |
| OPM_HOST_DEVICE | BlackOilFluidState (const FluidSystem &fluidSystem) |
| Construct a fluid state object. | |
| template<class OtherFluidSystemType> | |
| auto | withOtherFluidSystem (const OtherFluidSystemType &other) const |
| OPM_HOST_DEVICE | BlackOilFluidState () |
| Construct a fluid state object. | |
| void | checkDefined () const |
| Make sure that all attributes are defined. | |
| template<class FluidState> | |
| OPM_HOST_DEVICE void | assign (const FluidState &fs) |
| Retrieve all parameters from an arbitrary fluid state. | |
| OPM_HOST_DEVICE void | setPvtRegionIndex (unsigned newPvtRegionIdx) |
| Set the index of the fluid region. | |
| OPM_HOST_DEVICE void | setPressure (unsigned phaseIdx, const ValueType &p) |
| Set the pressure of a fluid phase [-]. | |
| OPM_HOST_DEVICE void | setSaturation (unsigned phaseIdx, const ValueType &S) |
| Set the saturation of a fluid phase [-]. | |
| OPM_HOST_DEVICE void | setTotalSaturation (const ValueType &value) |
| Set the total saturation used for sequential methods. | |
| OPM_HOST_DEVICE void | setTemperature (const ValueType &value) |
| Set the temperature [K]. | |
| OPM_HOST_DEVICE void | setEnthalpy (unsigned phaseIdx, const ValueType &value) |
| Set the specific enthalpy [J/kg] of a given fluid phase. | |
| OPM_HOST_DEVICE void | setInvB (unsigned phaseIdx, const ValueType &b) |
| \ brief Set the inverse formation volume factor of a fluid phase | |
| OPM_HOST_DEVICE void | setDensity (unsigned phaseIdx, const ValueType &rho) |
| \ brief Set the density of a fluid phase | |
| OPM_HOST_DEVICE void | setRs (const ValueType &newRs) |
| Set the gas dissolution factor [m^3/m^3] of the oil phase. | |
| OPM_HOST_DEVICE void | setRv (const ValueType &newRv) |
| Set the oil vaporization factor [m^3/m^3] of the gas phase. | |
| OPM_HOST_DEVICE void | setRvw (const ValueType &newRvw) |
| Set the water vaporization factor [m^3/m^3] of the gas phase. | |
| OPM_HOST_DEVICE void | setRsw (const ValueType &newRsw) |
| Set the gas dissolution factor [m^3/m^3] of the water phase. | |
| OPM_HOST_DEVICE void | setSaltConcentration (const ValueType &newSaltConcentration) |
| Set the salt concentration. | |
| OPM_HOST_DEVICE void | setSaltSaturation (const ValueType &newSaltSaturation) |
| Set the solid salt saturation. | |
| OPM_HOST_DEVICE void | setSolventSaturation (const ValueType &newSolventSaturation) |
| Set the solvent saturation. | |
| OPM_HOST_DEVICE void | setSolventDensity (const ValueType &newSolventDensity) |
| Set the solvent density [kg/m^3]. | |
| OPM_HOST_DEVICE void | setSolventInvB (const ValueType &newSolventInvB) |
| Set the solvent inverse formation volume factor [-]. | |
| OPM_HOST_DEVICE void | setRsSolw (const ValueType &newRsSolw) |
| Set the solvent dissolution factor in water [m^3/m^3]. | |
| OPM_HOST_DEVICE const ValueType & | pressure (unsigned phaseIdx) const |
| Return the pressure of a fluid phase [Pa]. | |
| OPM_HOST_DEVICE const ValueType & | saturation (unsigned phaseIdx) const |
| Return the saturation of a fluid phase [-]. | |
| OPM_HOST_DEVICE const ValueType & | totalSaturation () const |
| Return the total saturation needed for sequential. | |
| OPM_HOST_DEVICE ValueType | temperature (unsigned) const |
| Return the temperature [K]. | |
| OPM_HOST_DEVICE const ValueType & | invB (unsigned phaseIdx) const |
| Return the inverse formation volume factor of a fluid phase [-]. | |
| OPM_HOST_DEVICE ValueType | Rs () const |
| Return the gas dissolution factor of oil [m^3/m^3]. | |
| OPM_HOST_DEVICE ValueType | Rv () const |
| Return the oil vaporization factor of gas [m^3/m^3]. | |
| OPM_HOST_DEVICE ValueType | Rvw () const |
| Return the water vaporization factor of gas [m^3/m^3]. | |
| OPM_HOST_DEVICE ValueType | Rsw () const |
| Return the gas dissolution factor of water [m^3/m^3]. | |
| OPM_HOST_DEVICE ValueType | saltConcentration () const |
| Return the concentration of salt in water. | |
| OPM_HOST_DEVICE ValueType | saltSaturation () const |
| Return the saturation of solid salt. | |
| OPM_HOST_DEVICE ValueType | solventSaturation () const |
| Return the solvent saturation [-]. | |
| OPM_HOST_DEVICE ValueType | solventDensity () const |
| Return the solvent density [kg/m^3]. | |
| OPM_HOST_DEVICE ValueType | solventInvB () const |
| Return the solvent inverse formation volume factor [-]. | |
| OPM_HOST_DEVICE ValueType | rsSolw () const |
| Return the solvent dissolution factor in water [m^3/m^3]. | |
| OPM_HOST_DEVICE unsigned short | pvtRegionIndex () const |
| Return the PVT region where the current fluid state is assumed to be part of. | |
| OPM_HOST_DEVICE ValueType | density (unsigned phaseIdx) const |
| Return the density [kg/m^3] of a given fluid phase. | |
| OPM_HOST_DEVICE const ValueType & | enthalpy (unsigned phaseIdx) const |
| Return the specific enthalpy [J/kg] of a given fluid phase. | |
| OPM_HOST_DEVICE ValueType | internalEnergy (unsigned phaseIdx) const |
| Return the specific internal energy [J/kg] of a given fluid phase. | |
| OPM_HOST_DEVICE ValueType | molarDensity (unsigned phaseIdx) const |
| Return the molar density of a fluid phase [mol/m^3]. | |
| OPM_HOST_DEVICE ValueType | molarVolume (unsigned phaseIdx) const |
| Return the molar volume of a fluid phase [m^3/mol]. | |
| OPM_HOST_DEVICE ValueType | viscosity (unsigned phaseIdx) const |
| Return the dynamic viscosity of a fluid phase [Pa s]. | |
| OPM_HOST_DEVICE ValueType | massFraction (unsigned phaseIdx, unsigned compIdx) const |
| Return the mass fraction of a component in a fluid phase [-]. | |
| OPM_HOST_DEVICE ValueType | moleFraction (unsigned phaseIdx, unsigned compIdx) const |
| Return the mole fraction of a component in a fluid phase [-]. | |
| OPM_HOST_DEVICE ValueType | molarity (unsigned phaseIdx, unsigned compIdx) const |
| Return the partial molar density of a component in a fluid phase [mol / m^3]. | |
| OPM_HOST_DEVICE ValueType | averageMolarMass (unsigned phaseIdx) const |
| Return the partial molar density of a fluid phase [kg / mol]. | |
| OPM_HOST_DEVICE ValueType | fugacityCoefficient (unsigned phaseIdx, unsigned compIdx) const |
| Return the fugacity coefficient of a component in a fluid phase [-]. | |
| OPM_HOST_DEVICE ValueType | fugacity (unsigned phaseIdx, unsigned compIdx) const |
| Return the fugacity of a component in a fluid phase [Pa]. | |
| bool | phaseIsActive (int phaseIdx) const |
| Return if a phase is active (via the FluidSystem). | |
| OPM_HOST_DEVICE const FluidSystem & | fluidSystem () const |
| Return the fluid system used by this fluid state. | |
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.
|
inlineexplicit |
Construct a fluid state object.
| fluidSystem | The fluid system which is used to compute various quantities |
|
inline |
Construct a fluid state object.
The fluid system used is assumed to be stateless.
|
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.
|
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!
|
inline |
Return the fluid system used by this fluid state.
If the fluid system is static (i.e., if the fluid system has no state), this method will always return a reference to the same static object.
|
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!
|
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.
|
inline |
Return the molar volume of a fluid phase [m^3/mol].
This is equivalent to the inverse of the molar density.
|
inline |
Return if a phase is active (via the FluidSystem).
Note: this could be a static function, but for future GPU usage we must avoid static, so making it a regular member function to simplify future refactoring.
|
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.
|
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.
|
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.
|
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.
|
inline |
Set the specific enthalpy [J/kg] of a given fluid phase.
If the storeEnthalpy template argument is not set to true, this method will throw an exception!
|
inline |
Set the index of the fluid region.
This determines which tables are used to compute the quantities that are computed on the fly.
|
inline |
Set the gas dissolution factor [m^3/m^3] of the oil phase.
This quantity is very specific to the black-oil model.
|
inline |
Set the gas dissolution factor [m^3/m^3] of the water phase.
This quantity is very specific to the black-oil model.
|
inline |
Set the oil vaporization factor [m^3/m^3] of the gas phase.
This quantity is very specific to the black-oil model.
|
inline |
Set the water vaporization factor [m^3/m^3] of the gas phase.
This quantity is very specific to the black-oil model.
|
inline |
Set the temperature [K].
If storeTemperature arguments are not set to true, this method will throw an exception!