Merge pull request #4875 from OPM/fix-dual-porosity-issues

Fix dual porosity issues
This commit is contained in:
Magne Sjaastad 2019-10-16 11:59:17 +02:00 committed by GitHub
commit bb74ac24f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 7 deletions

View File

@ -89,9 +89,11 @@ std::vector<std::vector<int>> 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
{
@ -100,7 +102,8 @@ std::vector<std::vector<int>> RifActiveCellsReader::activeCellsFromPorvKeyword(
}
else
{
activeCellsOneGrid[indexToCell] = 0;
activeCellsOneGrid[indexToCell] = CELL_ACTIVE_MATRIX;
}
}
}

View File

@ -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();
}