Fix sign error in the specified oil pressures at at WOC and GOC

The oil pressure at the contact for the special cases:

contact	location	po(contact)
GOC 	above 	-inf
GOC 	below 	+inf
WOC 	above 	-inf
WOC 	below 	+inf
This commit is contained in:
Tor Harald Sandve 2014-08-27 14:35:01 +02:00 committed by Andreas Lauser
parent b389f40849
commit a03a4e112f

View File

@ -394,11 +394,20 @@ 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();
// Compute Oil pressure at WOC,
if ( woc > span[1] ) { po_woc = std::numeric_limits<double>::max(); } // WOC above reservoir (model is entirely water filled) // Oil pressure at WOC, Pc_ow = Po - Pw, dPc_ow/dSw <= 0
else if ( woc < span[0] ) { po_woc = -std::numeric_limits<double>::max(); } // WOC below reservoir if ( woc < span[0] ) {
else{ // 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 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
@ -406,10 +415,18 @@ namespace Opm
} }
const double goc = reg.zgoc(); const double goc = reg.zgoc();
// Compute Oil pressure at GOC,
if ( goc > span[1] ) { po_goc = -std::numeric_limits<double>::max(); } // GOC above reservoir // Oil pressure at GOC, Pc_go = Pg - Po, dPc_go/dSg >= 0
else if ( goc < span[0] ) { po_goc = std::numeric_limits<double>::max(); } // GOC below reservoir (model is entirely gas filled) if ( goc < span[0] ) {
else{ // 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 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