From a53f1e1e91717c2b8003fb9412aea0ce03dc2a22 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 16 Oct 2019 10:15:51 +0200 Subject: [PATCH 1/2] #4638 Dual porosity : Make sure geometry is regenerated when switching between matrix/fracture --- .../ProjectDataModel/RimEclipseResultDefinition.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp b/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp index 10954c49d7..fc6c3308ed 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp @@ -306,6 +306,15 @@ void RimEclipseResultDefinition::fieldChangedByUi( const caf::PdmFieldHandle* ch { m_porosityModel = m_porosityModelUiField; m_resultVariableUiField = resultVariable(); + + RimEclipseView* eclipseView = nullptr; + this->firstAncestorOrThisOfType( eclipseView ); + if ( eclipseView ) + { + // Active cells can be different between matrix and fracture, make sure all geometry is recreated + eclipseView->scheduleReservoirGridGeometryRegen(); + } + loadDataAndUpdate(); } From 61db98ef04c8e2d51ca8f6542c0404a3c13d22fb Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 16 Oct 2019 11:11:01 +0200 Subject: [PATCH 2/2] #4874 Dual Porosity : Missing active cells in some cases --- .../FileInterface/RifActiveCellsReader.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ApplicationCode/FileInterface/RifActiveCellsReader.cpp b/ApplicationCode/FileInterface/RifActiveCellsReader.cpp index 25c48c3902..7aeeb9d5cb 100644 --- a/ApplicationCode/FileInterface/RifActiveCellsReader.cpp +++ b/ApplicationCode/FileInterface/RifActiveCellsReader.cpp @@ -89,19 +89,22 @@ std::vector> RifActiveCellsReader::activeCellsFromPorvKeyword( if ( porvValues[poreValueIndex] > 0.0 ) { - if ( !dualPorosity || poreValueIndex < porvValues.size() / 2 ) + if ( dualPorosity ) { - activeCellsOneGrid[indexToCell] = CELL_ACTIVE_MATRIX; + if ( poreValueIndex < activeCellCount ) + { + activeCellsOneGrid[indexToCell] += CELL_ACTIVE_MATRIX; + } + else + { + activeCellsOneGrid[indexToCell] += CELL_ACTIVE_FRACTURE; + } } else { - activeCellsOneGrid[indexToCell] += CELL_ACTIVE_FRACTURE; + activeCellsOneGrid[indexToCell] = CELL_ACTIVE_MATRIX; } } - else - { - activeCellsOneGrid[indexToCell] = 0; - } } activeCellsAllGrids.push_back( activeCellsOneGrid );