mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 22:50:25 -05:00
#13713 RifReaderOpmCommon: Fix ACTNUM showing undefined when only stored in EGRID
ACTNUM is always present in the EGRID file, but not always in the INIT file. The OPM reader's staticResult() searched only the INIT file, so models that omit ACTNUM from INIT returned an empty result vector, causing all cells to display as undefined. Fix by deriving ACTNUM values directly from the active cell info, which is populated from the EGRID during grid import via transferActiveCells().
This commit is contained in:
1 parent
85b3ad4cf5
commit
e21097a2fc
1 file changed
+10
@@ -604,6 +604,16 @@ void RifReaderOpmCommon::transferGeometry( Opm::EclIO::EGrid& opmMainGrid,
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RifReaderOpmCommon::staticResult( const QString& result, RiaDefines::PorosityModelType matrixOrFracture, std::vector<double>* values )
|
bool RifReaderOpmCommon::staticResult( const QString& result, RiaDefines::PorosityModelType matrixOrFracture, std::vector<double>* values )
|
||||||
{
|
{
|
||||||
|
// Active cell info is populated from the EGRID during grid import via transferActiveCells(), which reads ACTNUM from the OPM EGrid
|
||||||
|
// object. Most simulators also write it to INIT, but some do not. Derive the values directly from the active cell info to handle both
|
||||||
|
// cases consistently.
|
||||||
|
if ( result.compare( "ACTNUM", Qt::CaseInsensitive ) == 0 )
|
||||||
|
{
|
||||||
|
RigActiveCellInfo* activeCellInfo = m_eclipseCaseData->activeCellInfo( matrixOrFracture );
|
||||||
|
values->resize( activeCellInfo->reservoirActiveCellCount(), 1.0 );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if ( m_initFile )
|
if ( m_initFile )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in new issue
Block a user