mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 17:10:19 -05:00
Add support for COMPLUMP keyword (#13273)
* Add support for COMPLUMP keyword, both in python interface, file export and opm flow jobs * Add support for WPIMULT kw in opm flow jobs * Always provide per connection dFactors in COMPDAT kw (negative value) * Include LGR support in COMPLUMP file export
This commit is contained in:
12 files changed
+299
-22
No files matched your search
@@ -1030,9 +1030,21 @@ int RimOpmFlowJob::mergeBasicWellSettings()
|
||||
{
|
||||
const int failure = -1;
|
||||
|
||||
if ( m_eclipseCase() == nullptr || m_wellPath() == nullptr || m_wellPath()->completionSettings() == nullptr ||
|
||||
m_eclipseCase()->eclipseCaseData() == nullptr )
|
||||
{
|
||||
RiaLogging::error( "Cannot create COMPDAT keyword - check case, wellpath and completion settings data." );
|
||||
return failure;
|
||||
}
|
||||
|
||||
auto compdata = RicWellPathExportCompletionDataFeatureImpl::completionDataForWellPath( m_wellPath(), m_eclipseCase() );
|
||||
auto wellName = m_wellPath()->completionSettings()->wellNameForExport().toStdString();
|
||||
|
||||
int mergePosition = m_openWellDeckPosition();
|
||||
|
||||
auto compdatKw = RimKeywordFactory::compdatKeyword( m_eclipseCase(), m_wellPath() );
|
||||
auto compdatKw = RimKeywordFactory::compdatKeyword( compdata, wellName );
|
||||
auto wpimultKw = RimKeywordFactory::wpimultKeyword( compdata, wellName );
|
||||
auto complumpKw = RimKeywordFactory::complumpKeyword( compdata, wellName );
|
||||
auto welspecsKw = RimKeywordFactory::welspecsKeyword( m_wellGroupName().toStdString(), m_eclipseCase(), m_wellPath() );
|
||||
|
||||
if ( welspecsKw.empty() || compdatKw.empty() )
|
||||
@@ -1044,6 +1056,14 @@ int RimOpmFlowJob::mergeBasicWellSettings()
|
||||
if ( m_wellOpenType == WellOpenType::OPEN_AT_DATE )
|
||||
{
|
||||
// reverse order for correct insertion order
|
||||
if ( !complumpKw.empty() )
|
||||
{
|
||||
if ( !m_deckFile->mergeKeywordAtTimeStep( m_openTimeStep(), complumpKw ) ) return failure;
|
||||
}
|
||||
if ( !wpimultKw.empty() )
|
||||
{
|
||||
if ( !m_deckFile->mergeKeywordAtTimeStep( m_openTimeStep(), wpimultKw ) ) return failure;
|
||||
}
|
||||
if ( !m_deckFile->mergeKeywordAtTimeStep( m_openTimeStep(), compdatKw ) ) return failure;
|
||||
if ( !m_deckFile->mergeKeywordAtTimeStep( m_openTimeStep(), welspecsKw ) ) return failure;
|
||||
mergePosition = 0;
|
||||
@@ -1054,6 +1074,16 @@ int RimOpmFlowJob::mergeBasicWellSettings()
|
||||
if ( mergePosition < 0 ) return failure;
|
||||
mergePosition = m_deckFile->mergeKeywordAtPosition( mergePosition, compdatKw );
|
||||
if ( mergePosition < 0 ) return failure;
|
||||
if ( !wpimultKw.empty() )
|
||||
{
|
||||
mergePosition = m_deckFile->mergeKeywordAtPosition( mergePosition, wpimultKw );
|
||||
if ( mergePosition < 0 ) return failure;
|
||||
}
|
||||
if ( !complumpKw.empty() )
|
||||
{
|
||||
mergePosition = m_deckFile->mergeKeywordAtPosition( mergePosition, complumpKw );
|
||||
if ( mergePosition < 0 ) return failure;
|
||||
}
|
||||
}
|
||||
|
||||
// increase wells and connections in welldims to make sure they are big enough
|
||||
|
||||
Reference in new issue
Block a user