Loading...
Searching...
No Matches
BlackOilFluidState.hpp
Go to the documentation of this file.
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
Consult the COPYING file in the top-level source directory of this
module for the precise wording of the license and the list of
copyright holders.
*/
#ifndef OPM_BLACK_OIL_FLUID_STATE_HH
#define OPM_BLACK_OIL_FLUID_STATE_HH
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
#include <opm/material/common/HasMemberGeneratorMacros.hpp>
#include <opm/material/common/Valgrind.hpp>
#include <opm/material/common/ConditionalStorage.hpp>
namespace Opm {
OPM_GENERATE_HAS_MEMBER(pvtRegionIndex, ) // Creates 'HasMember_pvtRegionIndex<T>'.
template <class FluidState>
unsigned getPvtRegionIndex_(typename std::enable_if<HasMember_pvtRegionIndex<FluidState>::value,
const FluidState&>::type fluidState)
{ return fluidState.pvtRegionIndex(); }
template <class FluidState>
unsigned getPvtRegionIndex_(typename std::enable_if<!HasMember_pvtRegionIndex<FluidState>::value,
const FluidState&>::type)
{ return 0; }
OPM_GENERATE_HAS_MEMBER(invB, /*phaseIdx=*/0) // Creates 'HasMember_invB<T>'.
template <class FluidSystem, class FluidState, class LhsEval>
auto getInvB_(typename std::enable_if<HasMember_invB<FluidState>::value,
const FluidState&>::type fluidState,
unsigned phaseIdx,
unsigned)
-> decltype(decay<LhsEval>(fluidState.invB(phaseIdx)))
{ return decay<LhsEval>(fluidState.invB(phaseIdx)); }
template <class FluidSystem, class FluidState, class LhsEval>
LhsEval getInvB_(typename std::enable_if<!HasMember_invB<FluidState>::value,
const FluidState&>::type fluidState,
unsigned phaseIdx,
unsigned pvtRegionIdx)
{
const auto& rho = fluidState.density(phaseIdx);
const auto& Xsolvent =
fluidState.massFraction(phaseIdx, FluidSystem::solventComponentIndex(phaseIdx));
return
decay<LhsEval>(rho)
*decay<LhsEval>(Xsolvent)
/FluidSystem::referenceDensity(phaseIdx, pvtRegionIdx);
}
OPM_GENERATE_HAS_MEMBER(saltConcentration, ) // Creates 'HasMember_saltConcentration<T>'.
template <class FluidState>
auto getSaltConcentration_(typename std::enable_if<HasMember_saltConcentration<FluidState>::value,
const FluidState&>::type fluidState)
{ return fluidState.saltConcentration(); }
template <class FluidState>
auto getSaltConcentration_(typename std::enable_if<!HasMember_saltConcentration<FluidState>::value,
const FluidState&>::type)
{ return 0.0; }
OPM_GENERATE_HAS_MEMBER(saltSaturation, ) // Creates 'HasMember_saltSaturation<T>'.
template <class FluidState>
auto getSaltSaturation_(typename std::enable_if<HasMember_saltSaturation<FluidState>::value,
const FluidState&>::type fluidState)
{ return fluidState.saltSaturation(); }
template <class FluidState>
auto getSaltSaturation_(typename std::enable_if<!HasMember_saltSaturation<FluidState>::value,
const FluidState&>::type)
{ return 0.0; }
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 BlackOilFluidState
{
enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };
enum { waterCompIdx = FluidSystem::waterCompIdx };
enum { gasCompIdx = FluidSystem::gasCompIdx };
enum { oilCompIdx = FluidSystem::oilCompIdx };
public:
using Scalar = ScalarT;
enum { numPhases = FluidSystem::numPhases };
enum { numComponents = FluidSystem::numComponents };
void checkDefined() const
{
#ifndef NDEBUG
Valgrind::CheckDefined(pvtRegionIdx_);
for (unsigned storagePhaseIdx = 0; storagePhaseIdx < numStoragePhases; ++ storagePhaseIdx) {
Valgrind::CheckDefined(saturation_[storagePhaseIdx]);
Valgrind::CheckDefined(pressure_[storagePhaseIdx]);
Valgrind::CheckDefined(density_[storagePhaseIdx]);
Valgrind::CheckDefined(invB_[storagePhaseIdx]);
if constexpr (enableEnergy)
Valgrind::CheckDefined((*enthalpy_)[storagePhaseIdx]);
}
if constexpr (enableDissolution) {
Valgrind::CheckDefined(*Rs_);
Valgrind::CheckDefined(*Rv_);
}
if constexpr (enableVapwat) {
Valgrind::CheckDefined(*Rvw_);
}
if constexpr (enableDissolutionInWater) {
Valgrind::CheckDefined(*Rsw_);
}
if constexpr (enableBrine) {
Valgrind::CheckDefined(*saltConcentration_);
}
if constexpr (enableSaltPrecipitation) {
Valgrind::CheckDefined(*saltSaturation_);
}
if constexpr (enableTemperature || enableEnergy)
Valgrind::CheckDefined(*temperature_);
#endif // NDEBUG
}
template <class FluidState>
void assign(const FluidState& fs)
{
if constexpr (enableTemperature || enableEnergy)
setTemperature(fs.temperature(/*phaseIdx=*/0));
unsigned pvtRegionIdx = getPvtRegionIndex_<FluidState>(fs);
setPvtRegionIndex(pvtRegionIdx);
if constexpr (enableDissolution) {
setRs(BlackOil::getRs_<FluidSystem, FluidState, Scalar>(fs, pvtRegionIdx));
setRv(BlackOil::getRv_<FluidSystem, FluidState, Scalar>(fs, pvtRegionIdx));
}
if constexpr (enableVapwat) {
setRvw(BlackOil::getRvw_<FluidSystem, FluidState, Scalar>(fs, pvtRegionIdx));
}
if constexpr (enableDissolutionInWater) {
setRsw(BlackOil::getRsw_<FluidSystem, FluidState, Scalar>(fs, pvtRegionIdx));
}
if constexpr (enableBrine){
setSaltConcentration(BlackOil::getSaltConcentration_<FluidSystem, FluidState, Scalar>(fs, pvtRegionIdx));
}
if constexpr (enableSaltPrecipitation){
setSaltSaturation(BlackOil::getSaltSaturation_<FluidSystem, FluidState, Scalar>(fs, pvtRegionIdx));
}
for (unsigned storagePhaseIdx = 0; storagePhaseIdx < numStoragePhases; ++storagePhaseIdx) {
unsigned phaseIdx = storageToCanonicalPhaseIndex_(storagePhaseIdx);
setSaturation(phaseIdx, fs.saturation(phaseIdx));
setPressure(phaseIdx, fs.pressure(phaseIdx));
setDensity(phaseIdx, fs.density(phaseIdx));
if constexpr (enableEnergy)
setEnthalpy(phaseIdx, fs.enthalpy(phaseIdx));
setInvB(phaseIdx, getInvB_<FluidSystem, FluidState, Scalar>(fs, phaseIdx, pvtRegionIdx));
}
}
void setPvtRegionIndex(unsigned newPvtRegionIdx)
{ pvtRegionIdx_ = static_cast<unsigned short>(newPvtRegionIdx); }
void setPressure(unsigned phaseIdx, const Scalar& p)
{ pressure_[canonicalToStoragePhaseIndex_(phaseIdx)] = p; }
void setSaturation(unsigned phaseIdx, const Scalar& S)
{ saturation_[canonicalToStoragePhaseIndex_(phaseIdx)] = S; }
void setPc(unsigned phaseIdx, const Scalar& pc)
{ pc_[canonicalToStoragePhaseIndex_(phaseIdx)] = pc; }
void setTotalSaturation(const Scalar& value)
{
totalSaturation_ = value;
}
void setTemperature(const Scalar& value)
{
assert(enableTemperature || enableEnergy);
(*temperature_) = value;
}
void setEnthalpy(unsigned phaseIdx, const Scalar& value)
{
assert(enableTemperature || enableEnergy);
(*enthalpy_)[canonicalToStoragePhaseIndex_(phaseIdx)] = value;
}
void setInvB(unsigned phaseIdx, const Scalar& b)
{ invB_[canonicalToStoragePhaseIndex_(phaseIdx)] = b; }
void setDensity(unsigned phaseIdx, const Scalar& rho)
{ density_[canonicalToStoragePhaseIndex_(phaseIdx)] = rho; }
void setRs(const Scalar& newRs)
{ *Rs_ = newRs; }
void setRv(const Scalar& newRv)
{ *Rv_ = newRv; }
void setRvw(const Scalar& newRvw)
{ *Rvw_ = newRvw; }
void setRsw(const Scalar& newRsw)
{ *Rsw_ = newRsw; }
void setSaltConcentration(const Scalar& newSaltConcentration)
{ *saltConcentration_ = newSaltConcentration; }
void setSaltSaturation(const Scalar& newSaltSaturation)
{ *saltSaturation_ = newSaltSaturation; }
const Scalar& pressure(unsigned phaseIdx) const
{ return pressure_[canonicalToStoragePhaseIndex_(phaseIdx)]; }
const Scalar& saturation(unsigned phaseIdx) const
{ return saturation_[canonicalToStoragePhaseIndex_(phaseIdx)]; }
const Scalar& pc(unsigned phaseIdx) const
{ return pc_[canonicalToStoragePhaseIndex_(phaseIdx)]; }
const Scalar& totalSaturation() const
{
return totalSaturation_;
}
const Scalar& temperature(unsigned) const
{
if constexpr (enableTemperature || enableEnergy) {
return *temperature_;
} else {
static Scalar tmp(FluidSystem::reservoirTemperature(pvtRegionIdx_));
return tmp;
}
}
const Scalar& invB(unsigned phaseIdx) const
{ return invB_[canonicalToStoragePhaseIndex_(phaseIdx)]; }
const Scalar& Rs() const
{
if constexpr (enableDissolution) {
return *Rs_;
} else {
static Scalar null = 0.0;
return null;
}
}
const Scalar& Rv() const
{
if constexpr (!enableDissolution) {
static Scalar null = 0.0;
return null;
} else {
return *Rv_;
}
}
const Scalar& Rvw() const
{
if constexpr (enableVapwat) {
return *Rvw_;
} else {
static Scalar null = 0.0;
return null;
}
}
const Scalar& Rsw() const
{
if constexpr (enableDissolutionInWater) {
return *Rsw_;
} else {
static Scalar null = 0.0;
return null;
}
}
const Scalar& saltConcentration() const
{
if constexpr (enableBrine) {
return *saltConcentration_;
} else {
static Scalar null = 0.0;
return null;
}
}
const Scalar& saltSaturation() const
{
if constexpr (enableSaltPrecipitation) {
return *saltSaturation_;
} else {
static Scalar null = 0.0;
return null;
}
}
unsigned short pvtRegionIndex() const
{ return pvtRegionIdx_; }
Scalar density(unsigned phaseIdx) const
{ return density_[canonicalToStoragePhaseIndex_(phaseIdx)]; }
const Scalar& enthalpy(unsigned phaseIdx) const
{ return (*enthalpy_)[canonicalToStoragePhaseIndex_(phaseIdx)]; }
Scalar internalEnergy(unsigned phaseIdx) const
{ auto energy = (*enthalpy_)[canonicalToStoragePhaseIndex_(phaseIdx)];
if(!FluidSystem::enthalpyEqualEnergy()){
energy -= pressure(phaseIdx)/density(phaseIdx);
}
return energy;
}
// slow methods
Scalar molarDensity(unsigned phaseIdx) const
{
const auto& rho = density(phaseIdx);
if (phaseIdx == waterPhaseIdx)
return rho/FluidSystem::molarMass(waterCompIdx, pvtRegionIdx_);
return
rho*(moleFraction(phaseIdx, gasCompIdx)/FluidSystem::molarMass(gasCompIdx, pvtRegionIdx_)
+ moleFraction(phaseIdx, oilCompIdx)/FluidSystem::molarMass(oilCompIdx, pvtRegionIdx_));
}
Scalar molarVolume(unsigned phaseIdx) const
{ return 1.0/molarDensity(phaseIdx); }
Scalar viscosity(unsigned phaseIdx) const
{ return FluidSystem::viscosity(*this, phaseIdx, pvtRegionIdx_); }
Scalar massFraction(unsigned phaseIdx, unsigned compIdx) const
{
switch (phaseIdx) {
case waterPhaseIdx:
if (compIdx == waterCompIdx)
return 1.0;
return 0.0;
case oilPhaseIdx:
if (compIdx == waterCompIdx)
return 0.0;
else if (compIdx == oilCompIdx)
return 1.0 - FluidSystem::convertRsToXoG(Rs(), pvtRegionIdx_);
else {
assert(compIdx == gasCompIdx);
return FluidSystem::convertRsToXoG(Rs(), pvtRegionIdx_);
}
break;
case gasPhaseIdx:
if (compIdx == waterCompIdx)
return 0.0;
else if (compIdx == oilCompIdx)
return FluidSystem::convertRvToXgO(Rv(), pvtRegionIdx_);
else {
assert(compIdx == gasCompIdx);
return 1.0 - FluidSystem::convertRvToXgO(Rv(), pvtRegionIdx_);
}
break;
}
throw std::logic_error("Invalid phase or component index!");
}
Scalar moleFraction(unsigned phaseIdx, unsigned compIdx) const
{
switch (phaseIdx) {
case waterPhaseIdx:
if (compIdx == waterCompIdx)
return 1.0;
return 0.0;
case oilPhaseIdx:
if (compIdx == waterCompIdx)
return 0.0;
else if (compIdx == oilCompIdx)
return 1.0 - FluidSystem::convertXoGToxoG(FluidSystem::convertRsToXoG(Rs(), pvtRegionIdx_),
pvtRegionIdx_);
else {
assert(compIdx == gasCompIdx);
return FluidSystem::convertXoGToxoG(FluidSystem::convertRsToXoG(Rs(), pvtRegionIdx_),
pvtRegionIdx_);
}
break;
case gasPhaseIdx:
if (compIdx == waterCompIdx)
return 0.0;
else if (compIdx == oilCompIdx)
return FluidSystem::convertXgOToxgO(FluidSystem::convertRvToXgO(Rv(), pvtRegionIdx_),
pvtRegionIdx_);
else {
assert(compIdx == gasCompIdx);
return 1.0 - FluidSystem::convertXgOToxgO(FluidSystem::convertRvToXgO(Rv(), pvtRegionIdx_),
pvtRegionIdx_);
}
break;
}
throw std::logic_error("Invalid phase or component index!");
}
Scalar molarity(unsigned phaseIdx, unsigned compIdx) const
{ return moleFraction(phaseIdx, compIdx)*molarDensity(phaseIdx); }
Scalar averageMolarMass(unsigned phaseIdx) const
{
Scalar result(0.0);
for (unsigned compIdx = 0; compIdx < numComponents; ++ compIdx)
result += FluidSystem::molarMass(compIdx, pvtRegionIdx_)*moleFraction(phaseIdx, compIdx);
return result;
}
Scalar fugacityCoefficient(unsigned phaseIdx, unsigned compIdx) const
{ return FluidSystem::fugacityCoefficient(*this, phaseIdx, compIdx, pvtRegionIdx_); }
Scalar fugacity(unsigned phaseIdx, unsigned compIdx) const
{
return
fugacityCoefficient(phaseIdx, compIdx)
*moleFraction(phaseIdx, compIdx)
*pressure(phaseIdx);
}
private:
static unsigned storageToCanonicalPhaseIndex_(unsigned storagePhaseIdx)
{
if constexpr (numStoragePhases == 3)
return storagePhaseIdx;
else
return FluidSystem::activeToCanonicalPhaseIdx(storagePhaseIdx);
}
static unsigned canonicalToStoragePhaseIndex_(unsigned canonicalPhaseIdx)
{
if constexpr (numStoragePhases == 3)
return canonicalPhaseIdx;
else
return FluidSystem::canonicalToActivePhaseIdx(canonicalPhaseIdx);
}
ConditionalStorage<enableTemperature || enableEnergy, Scalar> temperature_{};
ConditionalStorage<enableEnergy, std::array<Scalar, numStoragePhases> > enthalpy_{};
Scalar totalSaturation_{};
std::array<Scalar, numStoragePhases> pressure_{};
std::array<Scalar, numStoragePhases> pc_{};
std::array<Scalar, numStoragePhases> saturation_{};
std::array<Scalar, numStoragePhases> invB_{};
std::array<Scalar, numStoragePhases> density_{};
ConditionalStorage<enableDissolution,Scalar> Rs_{};
ConditionalStorage<enableDissolution, Scalar> Rv_{};
ConditionalStorage<enableVapwat,Scalar> Rvw_{};
ConditionalStorage<enableDissolutionInWater,Scalar> Rsw_{};
ConditionalStorage<enableBrine, Scalar> saltConcentration_{};
ConditionalStorage<enableSaltPrecipitation, Scalar> saltSaturation_{};
unsigned short pvtRegionIdx_{};
};
} // namespace Opm
#endif
BlackOilFluidSystem.hpp
A fluid system which uses the black-oil model assumptions to calculate termodynamically meaningful qu...
ConditionalStorage.hpp
A simple class which only stores a given member attribute if a boolean condition is true.
HasMemberGeneratorMacros.hpp
This macro generates a class HasMember_${MEMBER_NAME} which can be used for template specialization.
OPM_GENERATE_HAS_MEMBER
#define OPM_GENERATE_HAS_MEMBER(MEMBER_NAME,...)
This macro generates a class HasMember_${MEMBER_NAME} which can be used for template specialization.
Definition HasMemberGeneratorMacros.hpp:49
Valgrind.hpp
Some templates to wrap the valgrind client request macros.
Opm::BlackOilFluidState
Implements a "tailor-made" fluid state class for the black-oil model.
Definition BlackOilFluidState.hpp:120
Opm::BlackOilFluidState::setEnthalpy
void setEnthalpy(unsigned phaseIdx, const Scalar &value)
Set the specific enthalpy [J/kg] of a given fluid phase.
Definition BlackOilFluidState.hpp:279
Opm::BlackOilFluidState::pressure
const Scalar & pressure(unsigned phaseIdx) const
Return the pressure of a fluid phase [Pa].
Definition BlackOilFluidState.hpp:345
Opm::BlackOilFluidState::setTemperature
void setTemperature(const Scalar &value)
Set the temperature [K].
Definition BlackOilFluidState.hpp:266
Opm::BlackOilFluidState::invB
const Scalar & invB(unsigned phaseIdx) const
Return the inverse formation volume factor of a fluid phase [-].
Definition BlackOilFluidState.hpp:387
Opm::BlackOilFluidState::moleFraction
Scalar moleFraction(unsigned phaseIdx, unsigned compIdx) const
Return the mole fraction of a component in a fluid phase [-].
Definition BlackOilFluidState.hpp:594
Opm::BlackOilFluidState::setSaltSaturation
void setSaltSaturation(const Scalar &newSaltSaturation)
Set the solid salt saturation.
Definition BlackOilFluidState.hpp:339
Opm::BlackOilFluidState::setSaltConcentration
void setSaltConcentration(const Scalar &newSaltConcentration)
Set the salt concentration.
Definition BlackOilFluidState.hpp:333
Opm::BlackOilFluidState::setRs
void setRs(const Scalar &newRs)
Set the gas dissolution factor [m^3/m^3] of the oil phase.
Definition BlackOilFluidState.hpp:303
Opm::BlackOilFluidState::Rv
const Scalar & Rv() const
Return the oil vaporization factor of gas [m^3/m^3].
Definition BlackOilFluidState.hpp:414
Opm::BlackOilFluidState::setDensity
void setDensity(unsigned phaseIdx, const Scalar &rho)
\ brief Set the density of a fluid phase
Definition BlackOilFluidState.hpp:295
Opm::BlackOilFluidState::checkDefined
void checkDefined() const
Make sure that all attributes are defined.
Definition BlackOilFluidState.hpp:142
Opm::BlackOilFluidState::averageMolarMass
Scalar averageMolarMass(unsigned phaseIdx) const
Return the partial molar density of a fluid phase [kg / mol].
Definition BlackOilFluidState.hpp:641
Opm::BlackOilFluidState::setInvB
void setInvB(unsigned phaseIdx, const Scalar &b)
\ brief Set the inverse formation volume factor of a fluid phase
Definition BlackOilFluidState.hpp:289
Opm::BlackOilFluidState::Rsw
const Scalar & Rsw() const
Return the gas dissolution factor of water [m^3/m^3].
Definition BlackOilFluidState.hpp:448
Opm::BlackOilFluidState::assign
void assign(const FluidState &fs)
Retrieve all parameters from an arbitrary fluid state.
Definition BlackOilFluidState.hpp:188
Opm::BlackOilFluidState::molarity
Scalar molarity(unsigned phaseIdx, unsigned compIdx) const
Return the partial molar density of a component in a fluid phase [mol / m^3].
Definition BlackOilFluidState.hpp:635
Opm::BlackOilFluidState::internalEnergy
Scalar internalEnergy(unsigned phaseIdx) const
Return the specific internal energy [J/kg] of a given fluid phase.
Definition BlackOilFluidState.hpp:512
Opm::BlackOilFluidState::setSaturation
void setSaturation(unsigned phaseIdx, const Scalar &S)
Set the saturation of a fluid phase [-].
Definition BlackOilFluidState.hpp:243
Opm::BlackOilFluidState::setRv
void setRv(const Scalar &newRv)
Set the oil vaporization factor [m^3/m^3] of the gas phase.
Definition BlackOilFluidState.hpp:311
Opm::BlackOilFluidState::setPvtRegionIndex
void setPvtRegionIndex(unsigned newPvtRegionIdx)
Set the index of the fluid region.
Definition BlackOilFluidState.hpp:231
Opm::BlackOilFluidState::pc
const Scalar & pc(unsigned phaseIdx) const
Return the capillary pressure of a fluid phase [-].
Definition BlackOilFluidState.hpp:357
Opm::BlackOilFluidState::fugacity
Scalar fugacity(unsigned phaseIdx, unsigned compIdx) const
Return the fugacity of a component in a fluid phase [Pa].
Definition BlackOilFluidState.hpp:658
Opm::BlackOilFluidState::setTotalSaturation
void setTotalSaturation(const Scalar &value)
Set the total saturation used for sequential methods.
Definition BlackOilFluidState.hpp:255
Opm::BlackOilFluidState::saltConcentration
const Scalar & saltConcentration() const
Return the concentration of salt in water.
Definition BlackOilFluidState.hpp:461
Opm::BlackOilFluidState::saltSaturation
const Scalar & saltSaturation() const
Return the saturation of solid salt.
Definition BlackOilFluidState.hpp:474
Opm::BlackOilFluidState::temperature
const Scalar & temperature(unsigned) const
Return the temperature [K].
Definition BlackOilFluidState.hpp:371
Opm::BlackOilFluidState::molarDensity
Scalar molarDensity(unsigned phaseIdx) const
Return the molar density of a fluid phase [mol/m^3].
Definition BlackOilFluidState.hpp:527
Opm::BlackOilFluidState::setPressure
void setPressure(unsigned phaseIdx, const Scalar &p)
Set the pressure of a fluid phase [-].
Definition BlackOilFluidState.hpp:237
Opm::BlackOilFluidState::pvtRegionIndex
unsigned short pvtRegionIndex() const
Return the PVT region where the current fluid state is assumed to be part of.
Definition BlackOilFluidState.hpp:488
Opm::BlackOilFluidState::massFraction
Scalar massFraction(unsigned phaseIdx, unsigned compIdx) const
Return the mass fraction of a component in a fluid phase [-].
Definition BlackOilFluidState.hpp:557
Opm::BlackOilFluidState::setPc
void setPc(unsigned phaseIdx, const Scalar &pc)
Set the capillary pressure of a fluid phase [-].
Definition BlackOilFluidState.hpp:249
Opm::BlackOilFluidState::totalSaturation
const Scalar & totalSaturation() const
Return the total saturation needed for sequential.
Definition BlackOilFluidState.hpp:363
Opm::BlackOilFluidState::saturation
const Scalar & saturation(unsigned phaseIdx) const
Return the saturation of a fluid phase [-].
Definition BlackOilFluidState.hpp:351
Opm::BlackOilFluidState::fugacityCoefficient
Scalar fugacityCoefficient(unsigned phaseIdx, unsigned compIdx) const
Return the fugacity coefficient of a component in a fluid phase [-].
Definition BlackOilFluidState.hpp:652
Opm::BlackOilFluidState::enthalpy
const Scalar & enthalpy(unsigned phaseIdx) const
Return the specific enthalpy [J/kg] of a given fluid phase.
Definition BlackOilFluidState.hpp:503
Opm::BlackOilFluidState::molarVolume
Scalar molarVolume(unsigned phaseIdx) const
Return the molar volume of a fluid phase [m^3/mol].
Definition BlackOilFluidState.hpp:545
Opm::BlackOilFluidState::Rvw
const Scalar & Rvw() const
Return the water vaporization factor of gas [m^3/m^3].
Definition BlackOilFluidState.hpp:431
Opm::BlackOilFluidState::Rs
const Scalar & Rs() const
Return the gas dissolution factor of oil [m^3/m^3].
Definition BlackOilFluidState.hpp:397
Opm::BlackOilFluidState::density
Scalar density(unsigned phaseIdx) const
Return the density [kg/m^3] of a given fluid phase.
Definition BlackOilFluidState.hpp:494
Opm::BlackOilFluidState::setRsw
void setRsw(const Scalar &newRsw)
Set the gas dissolution factor [m^3/m^3] of the water phase.
Definition BlackOilFluidState.hpp:327
Opm::BlackOilFluidState::viscosity
Scalar viscosity(unsigned phaseIdx) const
Return the dynamic viscosity of a fluid phase [Pa s].
Definition BlackOilFluidState.hpp:551
Opm::BlackOilFluidState::setRvw
void setRvw(const Scalar &newRvw)
Set the water vaporization factor [m^3/m^3] of the gas phase.
Definition BlackOilFluidState.hpp:319
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30