Merge pull request #638 from totto82/fix_GOC_below
Currectly handling GOC below and WOC above the reservoir
This commit is contained in:
commit
7933d87605
@ -394,23 +394,40 @@ namespace Opm
|
|||||||
|
|
||||||
assign(G, opress, z0, cells, press);
|
assign(G, opress, z0, cells, press);
|
||||||
|
|
||||||
// Default pressure at WOC and GOC to -inf
|
|
||||||
po_woc = -std::numeric_limits<double>::max();
|
|
||||||
po_goc = -std::numeric_limits<double>::max();
|
|
||||||
|
|
||||||
|
const double inf = std::numeric_limits<double>::max();
|
||||||
const double woc = reg.zwoc();
|
const double woc = reg.zwoc();
|
||||||
// Compute Oil pressure at WOC,
|
|
||||||
// if WOC is within the reservoir.
|
// Oil pressure at WOC, Pc_ow = Po - Pw, dPc_ow/dSw <= 0
|
||||||
if ( ( woc > span[0] ) && ( woc < span[1] ) ){
|
if ( woc < span[0] ) {
|
||||||
|
// 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
|
if (z0 > woc) { po_woc = opress[0](woc); } // WOC above datum
|
||||||
else if (z0 < woc) { po_woc = opress[1](woc); } // WOC below datum
|
else if (z0 < woc) { po_woc = opress[1](woc); } // WOC below datum
|
||||||
else { po_woc = p0; } // WOC *at* datum
|
else { po_woc = p0; } // WOC *at* datum
|
||||||
}
|
}
|
||||||
|
|
||||||
const double goc = reg.zgoc();
|
const double goc = reg.zgoc();
|
||||||
// Compute Oil pressure at GOC,
|
|
||||||
// if GOC is within the reservoir.
|
// Oil pressure at GOC, Pc_go = Pg - Po, dPc_go/dSg >= 0
|
||||||
if ( ( goc > span[0] ) && ( goc < span[1] ) ){
|
if ( goc < span[0] ) {
|
||||||
|
// 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
|
if (z0 > goc) { po_goc = opress[0](goc); } // GOC above datum
|
||||||
else if (z0 < goc) { po_goc = opress[1](goc); } // GOC below datum
|
else if (z0 < goc) { po_goc = opress[1](goc); } // GOC below datum
|
||||||
else { po_goc = p0; } // GOC *at* datum
|
else { po_goc = p0; } // GOC *at* datum
|
||||||
@ -484,9 +501,9 @@ namespace Opm
|
|||||||
const int wix = PhaseIndex::water(pu);
|
const int wix = PhaseIndex::water(pu);
|
||||||
|
|
||||||
// If woc is above or below the reservoar,
|
// If woc is above or below the reservoar,
|
||||||
// po_woc is -inf and the water pressure
|
// po_woc is set to inf and -inf, respectivly
|
||||||
// is set to -inf.
|
// and so is the water pressure
|
||||||
if ( po_woc > 0 ){
|
if ( std::abs(po_woc) < std::numeric_limits<double>::max() ){
|
||||||
PhasePressure::water(G, reg, span, grav, po_woc,
|
PhasePressure::water(G, reg, span, grav, po_woc,
|
||||||
cells, press[ wix ]);
|
cells, press[ wix ]);
|
||||||
} else {
|
} else {
|
||||||
@ -498,10 +515,11 @@ namespace Opm
|
|||||||
if (PhaseUsed::gas(pu)) {
|
if (PhaseUsed::gas(pu)) {
|
||||||
const int gix = PhaseIndex::gas(pu);
|
const int gix = PhaseIndex::gas(pu);
|
||||||
|
|
||||||
// If woc is above or below the reservoar,
|
// If goc is above or below the reservoar,
|
||||||
// po_woc is -inf and the water pressure
|
// po_goc is set to -inf and inf, respectivly
|
||||||
// is set to -inf.
|
// and so is the gas pressure
|
||||||
if (po_goc > 0){
|
|
||||||
|
if ( std::abs(po_goc) < std::numeric_limits<double>::max()){
|
||||||
PhasePressure::gas(G, reg, span, grav, po_goc,
|
PhasePressure::gas(G, reg, span, grav, po_goc,
|
||||||
cells, press[ gix ]);
|
cells, press[ gix ]);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user