Merge pull request #122 from totto82/swatInitFix

Pass enableSwatinit to the OPM initialization
This commit is contained in:
Atgeirr Flø Rasmussen
2017-01-06 10:24:11 +01:00
committed by GitHub
2 changed files with 11 additions and 1 deletions
+5 -1
View File
@@ -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 )
+6
View File
@@ -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;