mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Remove fix for GOC and WOC above/below reservoir
This commit is contained in:
parent
66293e8aed
commit
f960de4b0b
@ -394,44 +394,15 @@ namespace Opm
|
|||||||
|
|
||||||
assign(G, opress, z0, cells, press);
|
assign(G, opress, z0, cells, press);
|
||||||
|
|
||||||
|
|
||||||
const double inf = std::numeric_limits<double>::max();
|
|
||||||
const double woc = reg.zwoc();
|
const double woc = reg.zwoc();
|
||||||
|
if (z0 > woc) { po_woc = opress[0](woc); } // WOC above datum
|
||||||
// Oil pressure at WOC, Pc_ow = Po - Pw, dPc_ow/dSw <= 0
|
else if (z0 < woc) { po_woc = opress[1](woc); } // WOC below datum
|
||||||
if ( woc < span[0] ) {
|
else { po_woc = p0; } // WOC *at* datum
|
||||||
// WOC above reservoir (model entirely water filled)
|
|
||||||
po_woc = - inf;
|
|
||||||
}
|
|
||||||
else if ( woc > span[1] ) {
|
|
||||||
// WOC below reservoir (no mobile water)
|
|
||||||
po_woc = inf;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// if WOC is within the reservoir.
|
|
||||||
if (z0 > woc) { po_woc = opress[0](woc); } // WOC above datum
|
|
||||||
else if (z0 < woc) { po_woc = opress[1](woc); } // WOC below datum
|
|
||||||
else { po_woc = p0; } // WOC *at* datum
|
|
||||||
}
|
|
||||||
|
|
||||||
const double goc = reg.zgoc();
|
const double goc = reg.zgoc();
|
||||||
|
if (z0 > goc) { po_goc = opress[0](goc); } // GOC above datum
|
||||||
// Oil pressure at GOC, Pc_go = Pg - Po, dPc_go/dSg >= 0
|
else if (z0 < goc) { po_goc = opress[1](goc); } // GOC below datum
|
||||||
if ( goc < span[0] ) {
|
else { po_goc = p0; } // GOC *at* datum
|
||||||
// GOC above reservoir (no gas phase)
|
|
||||||
po_goc = -inf;
|
|
||||||
}
|
|
||||||
|
|
||||||
else if ( goc > span[1] ) {
|
|
||||||
// GOC below reservoir (model entirely gas filled)
|
|
||||||
po_goc = inf;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// if GOC is within the reservoir.
|
|
||||||
if (z0 > goc) { po_goc = opress[0](goc); } // GOC above datum
|
|
||||||
else if (z0 < goc) { po_goc = opress[1](goc); } // GOC below datum
|
|
||||||
else { po_goc = p0; } // GOC *at* datum
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -499,33 +470,14 @@ namespace Opm
|
|||||||
|
|
||||||
if (PhaseUsed::water(pu)) {
|
if (PhaseUsed::water(pu)) {
|
||||||
const int wix = PhaseIndex::water(pu);
|
const int wix = PhaseIndex::water(pu);
|
||||||
|
PhasePressure::water(G, reg, span, grav, po_woc,
|
||||||
// If woc is above or below the reservoar,
|
cells, press[ wix ]);
|
||||||
// po_woc is set to inf and -inf, respectivly
|
|
||||||
// and so is the water pressure
|
|
||||||
if ( std::abs(po_woc) < std::numeric_limits<double>::max() ){
|
|
||||||
PhasePressure::water(G, reg, span, grav, po_woc,
|
|
||||||
cells, press[ wix ]);
|
|
||||||
} else {
|
|
||||||
press[wix].assign(cells.size(),po_woc);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PhaseUsed::gas(pu)) {
|
if (PhaseUsed::gas(pu)) {
|
||||||
const int gix = PhaseIndex::gas(pu);
|
const int gix = PhaseIndex::gas(pu);
|
||||||
|
PhasePressure::gas(G, reg, span, grav, po_goc,
|
||||||
// If goc is above or below the reservoar,
|
cells, press[ gix ]);
|
||||||
// po_goc is set to -inf and inf, respectivly
|
|
||||||
// and so is the gas pressure
|
|
||||||
|
|
||||||
if ( std::abs(po_goc) < std::numeric_limits<double>::max()){
|
|
||||||
PhasePressure::gas(G, reg, span, grav, po_goc,
|
|
||||||
cells, press[ gix ]);
|
|
||||||
} else {
|
|
||||||
press[gix].assign(cells.size(),po_goc);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // namespace Details
|
} // namespace Details
|
||||||
@ -720,21 +672,23 @@ namespace Opm
|
|||||||
// Adjust phase pressures for max and min saturation ...
|
// Adjust phase pressures for max and min saturation ...
|
||||||
double pc[BlackoilPhases::MaxNumPhases];
|
double pc[BlackoilPhases::MaxNumPhases];
|
||||||
double sat[BlackoilPhases::MaxNumPhases];
|
double sat[BlackoilPhases::MaxNumPhases];
|
||||||
if (sw > smax[waterpos]-1.0e-6) {
|
double threshold_sat = 1.0e-6;
|
||||||
|
|
||||||
|
if (sw > smax[waterpos]-threshold_sat ) {
|
||||||
sat[waterpos] = smax[waterpos];
|
sat[waterpos] = smax[waterpos];
|
||||||
props.capPress(1, sat, &cell, pc, 0);
|
props.capPress(1, sat, &cell, pc, 0);
|
||||||
phase_pressures[oilpos][local_index] = phase_pressures[waterpos][local_index] + pc[waterpos];
|
phase_pressures[oilpos][local_index] = phase_pressures[waterpos][local_index] + pc[waterpos];
|
||||||
} else if (sg > smax[gaspos]-1.0e-6) {
|
} else if (sg > smax[gaspos]-threshold_sat) {
|
||||||
sat[gaspos] = smax[gaspos];
|
sat[gaspos] = smax[gaspos];
|
||||||
props.capPress(1, sat, &cell, pc, 0);
|
props.capPress(1, sat, &cell, pc, 0);
|
||||||
phase_pressures[oilpos][local_index] = phase_pressures[gaspos][local_index] - pc[gaspos];
|
phase_pressures[oilpos][local_index] = phase_pressures[gaspos][local_index] - pc[gaspos];
|
||||||
}
|
}
|
||||||
if (sg < smin[gaspos]+1.0e-6) {
|
if (sg < smin[gaspos]+threshold_sat) {
|
||||||
sat[gaspos] = smin[gaspos];
|
sat[gaspos] = smin[gaspos];
|
||||||
props.capPress(1, sat, &cell, pc, 0);
|
props.capPress(1, sat, &cell, pc, 0);
|
||||||
phase_pressures[gaspos][local_index] = phase_pressures[oilpos][local_index] + pc[gaspos];
|
phase_pressures[gaspos][local_index] = phase_pressures[oilpos][local_index] + pc[gaspos];
|
||||||
}
|
}
|
||||||
if (sw < smin[waterpos]+1.0e-6) {
|
if (sw < smin[waterpos]+threshold_sat) {
|
||||||
sat[waterpos] = smin[waterpos];
|
sat[waterpos] = smin[waterpos];
|
||||||
props.capPress(1, sat, &cell, pc, 0);
|
props.capPress(1, sat, &cell, pc, 0);
|
||||||
phase_pressures[waterpos][local_index] = phase_pressures[oilpos][local_index] - pc[waterpos];
|
phase_pressures[waterpos][local_index] = phase_pressures[oilpos][local_index] - pc[waterpos];
|
||||||
|
Loading…
Reference in New Issue
Block a user