mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-29 12:33:49 -06:00
Added Rv field to InitialStateComputer.
It is currently not computed, as for Rs.
This commit is contained in:
parent
b53944f30a
commit
128829e7c8
@ -129,7 +129,11 @@ namespace Opm
|
|||||||
const std::vector< std::vector<double> >& phase_pressures);
|
const std::vector< std::vector<double> >& phase_pressures);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace DeckDependent {
|
namespace DeckDependent {
|
||||||
|
|
||||||
inline
|
inline
|
||||||
std::vector<EquilRecord>
|
std::vector<EquilRecord>
|
||||||
getEquil(const EclipseGridParser& deck)
|
getEquil(const EclipseGridParser& deck)
|
||||||
@ -168,6 +172,9 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline
|
inline
|
||||||
std::vector<int>
|
std::vector<int>
|
||||||
equilnum(const EclipseGridParser& deck,
|
equilnum(const EclipseGridParser& deck,
|
||||||
@ -186,6 +193,9 @@ namespace Opm
|
|||||||
return eqlnum;
|
return eqlnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <class InputDeck>
|
template <class InputDeck>
|
||||||
class InitialStateComputer;
|
class InitialStateComputer;
|
||||||
|
|
||||||
@ -200,7 +210,8 @@ namespace Opm
|
|||||||
std::vector<double>(G.number_of_cells)),
|
std::vector<double>(G.number_of_cells)),
|
||||||
sat_(props.numPhases(),
|
sat_(props.numPhases(),
|
||||||
std::vector<double>(G.number_of_cells)),
|
std::vector<double>(G.number_of_cells)),
|
||||||
rs_(G.number_of_cells)
|
rs_(G.number_of_cells),
|
||||||
|
rv_(G.number_of_cells)
|
||||||
{
|
{
|
||||||
// Get the equilibration records.
|
// Get the equilibration records.
|
||||||
const std::vector<EquilRecord> rec = getEquil(deck);
|
const std::vector<EquilRecord> rec = getEquil(deck);
|
||||||
@ -228,8 +239,11 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute phase pressures and saturations.
|
// Compute pressures, saturations, rs and rv factors.
|
||||||
calcPressSat(eqlmap, rec, props, G, grav);
|
calcPressSatRsRv(eqlmap, rec, props, G, grav);
|
||||||
|
|
||||||
|
// Modify oil pressure in no-oil regions so that the pressures of present phases can
|
||||||
|
// be recovered from the oil pressure and capillary relations.
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef std::vector<double> Vec;
|
typedef std::vector<double> Vec;
|
||||||
@ -237,6 +251,8 @@ namespace Opm
|
|||||||
|
|
||||||
const PVec& press() const { return pp_; }
|
const PVec& press() const { return pp_; }
|
||||||
const PVec& saturation() const { return sat_; }
|
const PVec& saturation() const { return sat_; }
|
||||||
|
const Vec& rs() const { return rs_; }
|
||||||
|
const Vec& rv() const { return rv_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef DensityCalculator<BlackoilPropertiesInterface> RhoCalc;
|
typedef DensityCalculator<BlackoilPropertiesInterface> RhoCalc;
|
||||||
@ -247,14 +263,15 @@ namespace Opm
|
|||||||
PVec pp_;
|
PVec pp_;
|
||||||
PVec sat_;
|
PVec sat_;
|
||||||
Vec rs_;
|
Vec rs_;
|
||||||
|
Vec rv_;
|
||||||
|
|
||||||
template <class RMap>
|
template <class RMap>
|
||||||
void
|
void
|
||||||
calcPressSat(const RMap& reg ,
|
calcPressSatRsRv(const RMap& reg ,
|
||||||
const std::vector< EquilRecord >& rec ,
|
const std::vector< EquilRecord >& rec ,
|
||||||
const Opm::BlackoilPropertiesInterface& props,
|
const Opm::BlackoilPropertiesInterface& props,
|
||||||
const UnstructuredGrid& G ,
|
const UnstructuredGrid& G ,
|
||||||
const double grav)
|
const double grav)
|
||||||
{
|
{
|
||||||
typedef Miscibility::NoMixing NoMix;
|
typedef Miscibility::NoMixing NoMix;
|
||||||
|
|
||||||
@ -273,7 +290,8 @@ namespace Opm
|
|||||||
|
|
||||||
const PVec press = phasePressures(G, eqreg, cells, grav);
|
const PVec press = phasePressures(G, eqreg, cells, grav);
|
||||||
const PVec sat = phaseSaturations(eqreg, cells, props, press);
|
const PVec sat = phaseSaturations(eqreg, cells, props, press);
|
||||||
const Vec rs(cells.size());// = gasOilRatio();
|
const Vec rs(cells.size());
|
||||||
|
const Vec rv(cells.size());
|
||||||
|
|
||||||
const int np = props.numPhases();
|
const int np = props.numPhases();
|
||||||
for (int p = 0; p < np; ++p) {
|
for (int p = 0; p < np; ++p) {
|
||||||
@ -281,6 +299,7 @@ namespace Opm
|
|||||||
copyFromRegion(sat[p], cells, sat_[p]);
|
copyFromRegion(sat[p], cells, sat_[p]);
|
||||||
}
|
}
|
||||||
copyFromRegion(rs, cells, rs_);
|
copyFromRegion(rs, cells, rs_);
|
||||||
|
copyFromRegion(rv, cells, rv_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user