mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-09-05 04:40:19 -05:00
Merge pull request #122 from totto82/swatInitFix
Pass enableSwatinit to the OPM initialization
This commit is contained in:
@@ -137,13 +137,17 @@ public:
|
||||
/*numFaces=*/0, // we don't care here
|
||||
opmPhaseUsage.num_phases);
|
||||
|
||||
// tell the initializers whether SWATINIT should be applied or not.
|
||||
bool enableSwatInit = GET_PROP_VALUE(TypeTag, EnableSwatinit);
|
||||
|
||||
// do the actual computation.
|
||||
Opm::initStateEquil(equilGrid,
|
||||
opmBlackoilProps,
|
||||
gridManager.deck(),
|
||||
gridManager.eclState(),
|
||||
simulator.problem().gravity()[dimWorld - 1],
|
||||
opmBlackoilState);
|
||||
opmBlackoilState,
|
||||
enableSwatInit);
|
||||
|
||||
std::vector<int> localToEquilIndex( numElems, -1 );
|
||||
for( unsigned int elemIdx = 0; elemIdx < numElems; ++elemIdx )
|
||||
|
||||
@@ -197,6 +197,12 @@ private:
|
||||
// the current face is not at the boundary between EQUIL regions!
|
||||
continue;
|
||||
|
||||
// don't include connections with negligible flow
|
||||
const Scalar& trans = simulator_.problem().transmissibility(elemCtx, i, j);
|
||||
const Scalar& faceArea = face.area();
|
||||
if ( std::abs(faceArea * trans) < 1e-18)
|
||||
continue;
|
||||
|
||||
// determine the maximum difference of the pressure of any phase over the
|
||||
// intersection
|
||||
Scalar pth = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user