Simulation Input: Reintroduce porv multiplier.

This commit is contained in:
Kristian Bendiksen committed 2025-11-19 16:47:27 +01:00
1 parent 655737aa33
commit c4177b6282
5 files changed
+30 -6

No files matched your search

@@ -28,6 +28,7 @@ RigSimulationInputSettings::RigSimulationInputSettings()
, m_max( caf::VecIjk0::ZERO )
, m_refinement( 1, 1, 1 )
, m_boundaryCondition( OPERNUM_OPERATER )
, m_porvMultiplier( 1.0e6 )
{
}
@@ -111,6 +112,22 @@ void RigSimulationInputSettings::setBoundaryCondition( BoundaryCondition value )
m_boundaryCondition = value;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RigSimulationInputSettings::porvMultiplier() const
{
return m_porvMultiplier;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigSimulationInputSettings::setPorvMultiplier( double value )
{
m_porvMultiplier = value;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -62,6 +62,9 @@ public:
BoundaryCondition boundaryCondition() const;
void setBoundaryCondition( BoundaryCondition value );
double porvMultiplier() const;
void setPorvMultiplier( double value );
// File paths
QString inputDeckFileName() const;
void setInputDeckFileName( const QString& fileName );
@@ -75,6 +78,7 @@ private:
cvf::Vec3st m_refinement;
std::vector<Opm::DeckRecord> m_bcpropKeywords;
BoundaryCondition m_boundaryCondition;
double m_porvMultiplier;
QString m_inputDeckFileName;
QString m_outputDeckFileName;
};
@@ -93,7 +93,8 @@ std::expected<void, QString> RigSimulationInputTool::exportSimulationInput( RimE
// Generate OPERNUM result based on BORDNUM (border cells get max existing OPERNUM + 1)
int operNumRegion = RigEclipseResultTools::generateOperNumResult( &eclipseCase );
if ( auto result = addOperNumRegionAndOperater( &eclipseCase, settings, deckFile, operNumRegion ); !result )
if ( auto result = addOperNumRegionAndOperater( &eclipseCase, settings, deckFile, operNumRegion, settings.porvMultiplier() );
!result )
{
return result;
}
@@ -963,7 +964,8 @@ std::expected<void, QString> RigSimulationInputTool::filterAndUpdateWellKeywords
std::expected<void, QString> RigSimulationInputTool::addOperNumRegionAndOperater( RimEclipseCase* eclipseCase,
const RigSimulationInputSettings& settings,
RifOpmFlowDeckFile& deckFile,
int operNumRegion )
int operNumRegion,
double porvMultiplier )
{
// Update REGDIMS and add OPERATER keyword for OPERNUM regions
// Get the OPERNUM region number that was assigned to border cells
@@ -1046,9 +1048,8 @@ std::expected<void, QString> RigSimulationInputTool::addOperNumRegionAndOperater
// Create OPERATER keyword to multiply pore volume in border region
// OPERATER format: TARGET_ARRAY REGION_NUMBER OPERATION ARRAY_PARAMETER PARAM1 PARAM2 REGION_NAME
// Example: OPERATER / PORV 1 MULTX PORV 1.0e6 1* 1* /
// Note: We don't have access to m_porvMultiplier from settings, so we use a default value
float porvMultiplier = 1.0e6f; // Default value
Opm::DeckKeyword operaterKw = RimKeywordFactory::operaterKeyword( "PORV", operNumRegion, "MULTX", "PORV", porvMultiplier );
Opm::DeckKeyword operaterKw =
RimKeywordFactory::operaterKeyword( "PORV", operNumRegion, "MULTX", "PORV", static_cast<float>( porvMultiplier ) );
// Add OPERATER keyword to EDIT section
if ( !deckFile.replaceKeyword( "EDIT", operaterKw ) )
@@ -78,7 +78,8 @@ private:
static std::expected<void, QString> addOperNumRegionAndOperater( RimEclipseCase* eclipseCase,
const RigSimulationInputSettings& settings,
RifOpmFlowDeckFile& deckFile,
int operNumRegion );
int operNumRegion,
double porvMultiplier );
static std::vector<RigSimWellData*> findIntersectingWells( RimEclipseCase* eclipseCase, const cvf::Vec3st& min, const cvf::Vec3st& max );