From f81a4d62a43e191ccf0b8434966088ef6d1fd46b Mon Sep 17 00:00:00 2001 From: osae Date: Thu, 27 Aug 2015 17:49:10 +0200 Subject: [PATCH] Zero-porosity cells and MINPV. Model 2 partly uses PORO=0.0 to signal inactive cells. This PR prevents such cells from causing unwanted zcorn modifications in the current min-pv algoritm. (The problem is however more general as zero PORO or NTG should kill a cell whether MINPV is active or not, refer kw ACTNUM.) --- opm/core/grid/MinpvProcessor.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/core/grid/MinpvProcessor.hpp b/opm/core/grid/MinpvProcessor.hpp index 12c94754..072a29bc 100644 --- a/opm/core/grid/MinpvProcessor.hpp +++ b/opm/core/grid/MinpvProcessor.hpp @@ -109,7 +109,7 @@ namespace Opm } setCellZcorn(ii, jj, kk, cz, zcorn); // Check if there is a cell below. - if (kk < dims_[2] - 1) { + if (pv[c] > 0.0 && kk < dims_[2] - 1) { // Set lower k coordinates of cell below to upper cells's coordinates. std::array cz_below = getCellZcorn(ii, jj, kk + 1, zcorn); for (int count = 0; count < 4; ++count) {