27#ifndef OPM_SOLVENT_PVT_HPP
28#define OPM_SOLVENT_PVT_HPP
46template <
class Scalar>
49 using SamplingPoints = std::vector<std::pair<Scalar, Scalar>>;
65 void setVapPars(
const Scalar,
const Scalar)
73 { solventReferenceDensity_[regionIdx] = rhoRefSolvent; }
81 { solventMu_[regionIdx] = mug; }
89 const SamplingPoints& samplePoints);
100 {
return solventReferenceDensity_.size(); }
105 template <
class Evaluation>
108 const Evaluation& pressure)
const
110 const Evaluation& invBg = inverseSolventB_[regionIdx].eval(pressure,
true);
111 const Evaluation& invMugBg = inverseSolventBMu_[regionIdx].eval(pressure,
true);
113 return invBg / invMugBg;
116 template <
class Evaluation>
117 Evaluation diffusionCoefficient(
const Evaluation& ,
121 throw std::runtime_error(
"Not implemented: The PVT model does not provide "
122 "a diffusionCoefficient()");
129 {
return solventReferenceDensity_[regionIdx]; }
134 template <
class Evaluation>
137 const Evaluation& pressure)
const
138 {
return inverseSolventB_[regionIdx].eval(pressure,
true); }
140 const std::vector<Scalar>& solventReferenceDensity()
const
141 {
return solventReferenceDensity_; }
143 const std::vector<TabulatedOneDFunction>& inverseSolventB()
const
144 {
return inverseSolventB_; }
146 const std::vector<TabulatedOneDFunction>& solventMu()
const
147 {
return solventMu_; }
149 const std::vector<TabulatedOneDFunction>& inverseSolventBMu()
const
150 {
return inverseSolventBMu_; }
153 std::vector<Scalar> solventReferenceDensity_{};
154 std::vector<TabulatedOneDFunction> inverseSolventB_{};
155 std::vector<TabulatedOneDFunction> solventMu_{};
156 std::vector<TabulatedOneDFunction> inverseSolventBMu_{};
Implements a linearly interpolated scalar function that depends on one variable.
Definition EclipseState.hpp:63
Definition Schedule.hpp:101
This class represents the Pressure-Volume-Temperature relations of the "second" gas phase in the of E...
Definition SolventPvt.hpp:48
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:106
void setReferenceDensity(unsigned regionIdx, Scalar rhoRefSolvent)
Initialize the reference density of the solvent gas for a given PVT region.
Definition SolventPvt.hpp:72
void setSolventViscosity(unsigned regionIdx, const TabulatedOneDFunction &mug)
Initialize the viscosity of the solvent gas phase.
Definition SolventPvt.hpp:80
Scalar referenceDensity(unsigned regionIdx) const
Return the reference density the solvent phase for a given PVT region.
Definition SolventPvt.hpp:128
void initEnd()
Finish initializing the oil phase PVT properties.
Definition SolventPvt.cpp:105
unsigned numRegions() const
Return the number of PVT regions which are considered by this PVT-object.
Definition SolventPvt.hpp:99
void setSolventFormationVolumeFactor(unsigned regionIdx, const SamplingPoints &samplePoints)
Initialize the function for the formation volume factor of solvent gas.
Definition SolventPvt.cpp:91
Evaluation inverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &, const Evaluation &pressure) const
Returns the formation volume factor [-] of the fluid phase.
Definition SolventPvt.hpp:135
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