Merge pull request #5439 from OPM/nnc-improvements

Improve NNC results for complete NNC geometry
This commit is contained in:
Magne Sjaastad
2020-01-30 13:34:28 +01:00
committed by GitHub
11 changed files with 132 additions and 46 deletions

View File

@@ -2348,12 +2348,13 @@ double riMult( double transResults, double riTransResults )
{
if ( transResults == HUGE_VAL || riTransResults == HUGE_VAL ) return HUGE_VAL;
// To make 0.0 values give 1.0 in mult value
if ( cvf::Math::abs( riTransResults ) < 1e-12 )
const double epsilon = 1e-9;
if ( cvf::Math::abs( riTransResults ) < epsilon )
{
if ( cvf::Math::abs( transResults ) < 1e-12 )
if ( cvf::Math::abs( transResults ) < epsilon )
{
return 1.0;
return 0.0;
}
return HUGE_VAL;

View File

@@ -83,7 +83,21 @@ void RigNNCData::computeCompleteSetOfNncs( const RigMainGrid* mainGrid )
std::vector<RigConnection> otherConnections = RigCellFaceGeometryTools::computeOtherNncs( mainGrid, m_connections );
m_connections.insert( m_connections.end(), otherConnections.begin(), otherConnections.end() );
if ( !otherConnections.empty() )
{
m_connections.insert( m_connections.end(), otherConnections.begin(), otherConnections.end() );
// Transmissibility values from Eclipse has been read into propertyNameCombTrans in
// RifReaderEclipseOutput::transferStaticNNCData(). Initialize computed NNCs with zero transmissibility
auto it = m_connectionResults.find( RiaDefines::propertyNameCombTrans() );
if ( it != m_connectionResults.end() )
{
if ( !it->second.empty() )
{
it->second[0].resize( m_connections.size(), 0.0 );
}
}
}
}
//--------------------------------------------------------------------------------------------------