mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-18 17:52:58 -06:00
Do not set rs=rsSat and rv=rvSat for the saturated case
This commit is contained in:
parent
bb4b03d295
commit
30030eaac7
@ -920,35 +920,6 @@ namespace Opm
|
|||||||
state.gasoilratio() = isc.rs();
|
state.gasoilratio() = isc.rs();
|
||||||
state.rv() = isc.rv();
|
state.rv() = isc.rv();
|
||||||
|
|
||||||
// set the Rs and Rv factors to the saturated ones if both the gas and the oil
|
|
||||||
// saturations are zero. in most cases this does not matter, but when doing the
|
|
||||||
// gravity correction (in particular, when determining the upstream direction) it
|
|
||||||
// does.
|
|
||||||
if (pu.phase_used[BlackoilPhases::Liquid] && pu.phase_used[BlackoilPhases::Vapour]) {
|
|
||||||
const int posOil = pu.phase_pos[BlackoilPhases::Liquid];
|
|
||||||
const int posGas = pu.phase_pos[BlackoilPhases::Vapour];
|
|
||||||
for (unsigned cellIdx = 0; cellIdx < state.pressure().size(); ++ cellIdx) {
|
|
||||||
const double so = isc.saturation()[posOil][cellIdx];
|
|
||||||
const double sg = isc.saturation()[posGas][cellIdx];
|
|
||||||
|
|
||||||
if (so <= 0.0 && sg <= 0.0) {
|
|
||||||
int pvtRegionIdx = props.cellPvtRegionIndex()[cellIdx];
|
|
||||||
const double po = state.pressure()[cellIdx];
|
|
||||||
const double pg = po; // hack: include capillary pressure!
|
|
||||||
const double T = 273.15 + 25.0; // does not matter for isothermal simulations!
|
|
||||||
const double rsSat = props.oilPvt().saturatedGasDissolutionFactor(pvtRegionIdx,
|
|
||||||
T,
|
|
||||||
pg);
|
|
||||||
const double rvSat = props.gasPvt().saturatedOilVaporizationFactor(pvtRegionIdx,
|
|
||||||
T,
|
|
||||||
po);
|
|
||||||
|
|
||||||
state.gasoilratio()[cellIdx] = rsSat;
|
|
||||||
state.rv()[cellIdx] = rvSat;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
initBlackoilSurfvolUsingRSorRV(UgGridHelpers::numCells(grid), props, state);
|
initBlackoilSurfvolUsingRSorRV(UgGridHelpers::numCells(grid), props, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user