mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-22 15:33:29 -06:00
Merge pull request #630 from totto82/fix_init_spe9
The water/gas press. are calculated only if woc/goc is within the reservoar
This commit is contained in:
commit
cc23f74f25
@ -394,20 +394,28 @@ 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_woc = -std::numeric_limits<double>::max();
|
||||||
po_goc = -std::numeric_limits<double>::max();
|
po_goc = -std::numeric_limits<double>::max();
|
||||||
|
|
||||||
const double woc = reg.zwoc();
|
const double woc = reg.zwoc();
|
||||||
// Compute Oil pressure at WOC
|
// Compute Oil pressure at WOC,
|
||||||
if (z0 > woc) { po_woc = opress[0](woc); } // WOC above datum
|
// if WOC is within the reservoir.
|
||||||
else if (z0 < woc) { po_woc = opress[1](woc); } // WOC below datum
|
if ( ( woc > span[0] ) && ( woc < span[1] ) ){
|
||||||
else { po_woc = p0; } // WOC *at* 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 { po_woc = p0; } // WOC *at* datum
|
||||||
|
}
|
||||||
|
|
||||||
const double goc = reg.zgoc();
|
const double goc = reg.zgoc();
|
||||||
// Compute Oil pressure at GOC
|
// Compute Oil pressure at GOC,
|
||||||
if (z0 > goc) { po_goc = opress[0](goc); } // GOC above datum
|
// if GOC is within the reservoir.
|
||||||
else if (z0 < goc) { po_goc = opress[1](goc); } // GOC below datum
|
if ( ( goc > span[0] ) && ( goc < span[1] ) ){
|
||||||
else { po_goc = p0; } // GOC *at* 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 { po_goc = p0; } // GOC *at* datum
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Region,
|
template <class Region,
|
||||||
@ -474,14 +482,32 @@ 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,
|
|
||||||
cells, press[ wix ]);
|
// If woc is above or below the reservoar,
|
||||||
|
// po_woc is -inf and the water pressure
|
||||||
|
// is set to -inf.
|
||||||
|
if ( po_woc > 0 ){
|
||||||
|
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,
|
|
||||||
cells, press[ gix ]);
|
// If woc is above or below the reservoar,
|
||||||
|
// po_woc is -inf and the water pressure
|
||||||
|
// is set to -inf.
|
||||||
|
if (po_goc > 0){
|
||||||
|
PhasePressure::gas(G, reg, span, grav, po_goc,
|
||||||
|
cells, press[ gix ]);
|
||||||
|
} else {
|
||||||
|
press[gix].assign(cells.size(),po_goc);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // namespace Details
|
} // namespace Details
|
||||||
|
Loading…
Reference in New Issue
Block a user