mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Update rs and rv value for free oil and gas case
The rs and rv values are not used by the simulator for the case with free oil and gas (or water only case), but they must be updated for output.
This commit is contained in:
@@ -677,6 +677,11 @@ namespace Opm {
|
|||||||
switch (hydroCarbonState) {
|
switch (hydroCarbonState) {
|
||||||
case HydroCarbonState::GasAndOil: {
|
case HydroCarbonState::GasAndOil: {
|
||||||
|
|
||||||
|
// for the Gas and Oil case rs=rsSat and rv=rvSat
|
||||||
|
rs = FluidSystem::oilPvt().saturatedGasDissolutionFactor(fs.pvtRegionIndex(), reservoir_state.temperature()[cell_idx], reservoir_state.pressure()[cell_idx]);
|
||||||
|
// use gas pressure?
|
||||||
|
rv = FluidSystem::gasPvt().saturatedOilVaporizationFactor(fs.pvtRegionIndex(), reservoir_state.temperature()[cell_idx], reservoir_state.pressure()[cell_idx]);
|
||||||
|
|
||||||
if (sw > (1.0 - epsilon)) // water only i.e. do nothing
|
if (sw > (1.0 - epsilon)) // water only i.e. do nothing
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -684,15 +689,12 @@ namespace Opm {
|
|||||||
reservoir_state.hydroCarbonState()[cell_idx] = HydroCarbonState::OilOnly; // sg --> rs
|
reservoir_state.hydroCarbonState()[cell_idx] = HydroCarbonState::OilOnly; // sg --> rs
|
||||||
sg = 0;
|
sg = 0;
|
||||||
so = 1.0 - sw - sg;
|
so = 1.0 - sw - sg;
|
||||||
const double& rsSat = FluidSystem::oilPvt().saturatedGasDissolutionFactor(fs.pvtRegionIndex(), reservoir_state.temperature()[cell_idx], reservoir_state.pressure()[cell_idx]);
|
rs *= (1-epsilon);
|
||||||
rs = rsSat*(1-epsilon);
|
|
||||||
} else if (so <= 0.0 && has_vapoil_) {
|
} else if (so <= 0.0 && has_vapoil_) {
|
||||||
reservoir_state.hydroCarbonState()[cell_idx] = HydroCarbonState::GasOnly; // sg --> rv
|
reservoir_state.hydroCarbonState()[cell_idx] = HydroCarbonState::GasOnly; // sg --> rv
|
||||||
so = 0;
|
so = 0;
|
||||||
sg = 1.0 - sw - so;
|
sg = 1.0 - sw - so;
|
||||||
// use gas pressure?
|
rv *= (1-epsilon);
|
||||||
const double& rvSat = FluidSystem::gasPvt().saturatedOilVaporizationFactor(fs.pvtRegionIndex(), reservoir_state.temperature()[cell_idx], reservoir_state.pressure()[cell_idx]);
|
|
||||||
rv = rvSat*(1-epsilon);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user