27#ifndef OPM_SOLVENT_PVT_HPP
28#define OPM_SOLVENT_PVT_HPP
45template <
class Scalar>
48 using SamplingPoints = std::vector<std::pair<Scalar, Scalar>>;
68 { solventReferenceDensity_[regionIdx] = rhoRefSolvent; }
76 { solventMu_[regionIdx] = mug; }
84 const SamplingPoints& samplePoints);
95 {
return solventReferenceDensity_.size(); }
100 template <
class Evaluation>
103 const Evaluation& pressure)
const
105 const Evaluation& invBg = inverseSolventB_[regionIdx].eval(pressure,
true);
106 const Evaluation& invMugBg = inverseSolventBMu_[regionIdx].eval(pressure,
true);
108 return invBg/invMugBg;
111 template <
class Evaluation>
112 Evaluation diffusionCoefficient(
const Evaluation& ,
116 throw std::runtime_error(
"Not implemented: The PVT model does not provide a diffusionCoefficient()");
123 {
return solventReferenceDensity_[regionIdx]; }
128 template <
class Evaluation>
131 const Evaluation& pressure)
const
132 {
return inverseSolventB_[regionIdx].eval(pressure,
true); }
134 const std::vector<Scalar>& solventReferenceDensity()
const
135 {
return solventReferenceDensity_; }
137 const std::vector<TabulatedOneDFunction>& inverseSolventB()
const
138 {
return inverseSolventB_; }
140 const std::vector<TabulatedOneDFunction>& solventMu()
const
141 {
return solventMu_; }
143 const std::vector<TabulatedOneDFunction>& inverseSolventBMu()
const
144 {
return inverseSolventBMu_; }
147 std::vector<Scalar> solventReferenceDensity_;
148 std::vector<TabulatedOneDFunction> inverseSolventB_;
149 std::vector<TabulatedOneDFunction> solventMu_;
150 std::vector<TabulatedOneDFunction> inverseSolventBMu_;
Definition: EclipseState.hpp:55
Definition: Schedule.hpp:130
This class represents the Pressure-Volume-Temperature relations of the "second" gas phase in the of E...
Definition: SolventPvt.hpp:47
Evaluation viscosity(unsigned regionIdx, const Evaluation &, const Evaluation &pressure) const
Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.
Definition: SolventPvt.hpp:101
void setReferenceDensity(unsigned regionIdx, Scalar rhoRefSolvent)
Initialize the reference density of the solvent gas for a given PVT region.
Definition: SolventPvt.hpp:67
void setSolventViscosity(unsigned regionIdx, const TabulatedOneDFunction &mug)
Initialize the viscosity of the solvent gas phase.
Definition: SolventPvt.hpp:75
Scalar referenceDensity(unsigned regionIdx) const
Return the reference density the solvent phase for a given PVT region.
Definition: SolventPvt.hpp:122
void initEnd()
Finish initializing the oil phase PVT properties.
unsigned numRegions() const
Return the number of PVT regions which are considered by this PVT-object.
Definition: SolventPvt.hpp:94
void setSolventFormationVolumeFactor(unsigned regionIdx, const SamplingPoints &samplePoints)
Initialize the function for the formation volume factor of solvent gas.
Evaluation inverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &, const Evaluation &pressure) const
Returns the formation volume factor [-] of the fluid phase.
Definition: SolventPvt.hpp:129
Implements a linearly interpolated scalar function that depends on one variable.
Definition: Tabulated1DFunction.hpp:51
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30