mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Revert "implement MINPV treatment"
that approach seems to be incorrect: https://github.com/OPM/opm-simulators/issues/785
This commit is contained in:
parent
5fab3f09dd
commit
5b81aab882
@ -100,11 +100,9 @@ public:
|
||||
const auto eclGrid = eclState->getInputGrid();
|
||||
const auto& transMult = eclState->getTransMult();
|
||||
|
||||
std::vector<double> ntg =
|
||||
const std::vector<double>& ntg =
|
||||
eclState->get3DProperties().getDoubleGridProperty("NTG").getData();
|
||||
|
||||
applyMinPv_(ntg);
|
||||
|
||||
unsigned numElements = elementMapper.size();
|
||||
|
||||
// this code assumes that the DOFs are the elements. (i.e., an
|
||||
@ -331,44 +329,6 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
void applyMinPv_(std::vector<double> &ntg)
|
||||
{
|
||||
const auto& model = simulator_.model();
|
||||
const auto& gridManager = simulator_.gridManager();
|
||||
const auto& eclState = gridManager.eclState();
|
||||
const Opm::EclipseGridConstPtr eclGrid = gridManager.eclGrid();
|
||||
const auto& porv = eclState->get3DProperties().getDoubleGridProperty("PORV").getData();
|
||||
|
||||
Scalar minpvValue = eclGrid->getMinpvValue();
|
||||
if (minpvValue <= 0.0)
|
||||
return;
|
||||
|
||||
int numCells = model.numGridDof();
|
||||
for (int cellIdx = 0; cellIdx < numCells; ++cellIdx) {
|
||||
const int nx = eclGrid->getNX();
|
||||
const int ny = eclGrid->getNY();
|
||||
const int cartesianCellIdx = gridManager.cartesianIndex(cellIdx);
|
||||
|
||||
const Scalar cellVolume = eclGrid->getCellVolume(cartesianCellIdx);
|
||||
ntg[cartesianCellIdx] *= cellVolume;
|
||||
Scalar totalCellVolume = cellVolume;
|
||||
|
||||
// Average properties as long as there exist cells above which exhibit a pore
|
||||
// volume less than the MINPV threshold
|
||||
int cartesianCellIdxAbove = cartesianCellIdx - nx*ny;
|
||||
while (cartesianCellIdxAbove >= 0
|
||||
&& porv[cartesianCellIdxAbove] > 0.0
|
||||
&& porv[cartesianCellIdxAbove] < minpvValue)
|
||||
{
|
||||
const double cellVolumeAbove = eclGrid->getCellVolume(cartesianCellIdxAbove);
|
||||
totalCellVolume += cellVolumeAbove;
|
||||
ntg[cartesianCellIdx] += ntg[cartesianCellIdxAbove]*cellVolumeAbove;
|
||||
cartesianCellIdxAbove -= nx*ny;
|
||||
}
|
||||
ntg[cartesianCellIdx] /= totalCellVolume;
|
||||
}
|
||||
}
|
||||
|
||||
void applyNtg_(Scalar &trans, unsigned faceIdx, unsigned cartElemIdx,
|
||||
const std::vector<double>& ntg) const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user