mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Well Target Candidates: misc improvements.
Improvements: * Well Target Candidates: Add filtering by binary result * Well Target Candidates: make result grid cell count configurable. * Well Target Candidates: Improve ui ordering. * Well Target Candidates: compute probability, and simplify vector names. * Optimization: Avoid expensive unintended duplication of data
This commit is contained in:
@@ -193,6 +193,7 @@ RimEclipseViewCollection* RimEclipseCaseEnsemble::viewCollection() const
|
||||
void RimEclipseCaseEnsemble::addWellTargetsGenerator( RimWellTargetCandidatesGenerator* generator )
|
||||
{
|
||||
m_wellTargetGenerators.push_back( generator );
|
||||
generator->updateResultDefinition();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -36,18 +36,36 @@ RimRegularGridCase::RimRegularGridCase()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_maximum, "Maximum", "Maximum" );
|
||||
m_maximum.uiCapability()->setUiReadOnly( true );
|
||||
|
||||
CAF_PDM_InitField( &m_cellCountI, "CellCountI", 100, "Cell Count I" );
|
||||
m_cellCountI.uiCapability()->setUiReadOnly( true );
|
||||
|
||||
CAF_PDM_InitField( &m_cellCountJ, "CellCountJ", 100, "Cell Count J" );
|
||||
m_cellCountJ.uiCapability()->setUiReadOnly( true );
|
||||
|
||||
CAF_PDM_InitField( &m_cellCountK, "CellCountK", 10, "Cell Count K" );
|
||||
m_cellCountK.uiCapability()->setUiReadOnly( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
void RimRegularGridCase::setBoundingBox( const cvf::BoundingBox& boundingBox )
|
||||
{
|
||||
m_minimum = boundingBox.min();
|
||||
m_maximum = boundingBox.max();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimRegularGridCase::setCellCount( const cvf::Vec3st& cellCount )
|
||||
{
|
||||
m_cellCountI = static_cast<int>( cellCount.x() );
|
||||
m_cellCountJ = static_cast<int>( cellCount.y() );
|
||||
m_cellCountK = static_cast<int>( cellCount.z() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -58,7 +76,7 @@ cvf::ref<RifReaderInterface> RimRegularGridCase::createModel( QString modelName
|
||||
|
||||
reader->setWorldCoordinates( m_minimum, m_maximum );
|
||||
|
||||
cvf::Vec3st gridPointDimensions( 50, 50, 10 );
|
||||
cvf::Vec3st gridPointDimensions( m_cellCountI, m_cellCountJ, m_cellCountK );
|
||||
reader->setGridPointDimensions( gridPointDimensions );
|
||||
|
||||
reader->open( "", reservoir.p() );
|
||||
|
||||
@@ -39,6 +39,8 @@ public:
|
||||
|
||||
void setBoundingBox( const cvf::BoundingBox& boundingBox );
|
||||
|
||||
void setCellCount( const cvf::Vec3st& cellCount );
|
||||
|
||||
bool openEclipseGridFile() override;
|
||||
|
||||
cvf::ref<RifReaderInterface> createModel( QString modelName );
|
||||
@@ -46,4 +48,8 @@ public:
|
||||
private:
|
||||
caf::PdmField<cvf::Vec3d> m_minimum;
|
||||
caf::PdmField<cvf::Vec3d> m_maximum;
|
||||
|
||||
caf::PdmField<int> m_cellCountI;
|
||||
caf::PdmField<int> m_cellCountJ;
|
||||
caf::PdmField<int> m_cellCountK;
|
||||
};
|
||||
|
||||
@@ -188,6 +188,7 @@ void RimStatisticsContourMap::initAfterRead()
|
||||
RimEclipseCase* eclipseCase = ensemble->cases().front();
|
||||
setEclipseCase( eclipseCase );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "RimEclipseCaseCollection.h"
|
||||
#include "RimEclipseCaseEnsemble.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseResultDefinition.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
@@ -108,6 +109,17 @@ RimWellTargetCandidatesGenerator::RimWellTargetCandidatesGenerator()
|
||||
CAF_PDM_InitField( &m_maxIterations, "Iterations", 10000, "Max Iterations" );
|
||||
CAF_PDM_InitField( &m_maxClusters, "MaxClusters", 5, "Max Clusters" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_resultDefinition, "ResultDefinition", "" );
|
||||
m_resultDefinition.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
m_resultDefinition = new RimEclipseResultDefinition;
|
||||
m_resultDefinition->findField( "MResultType" )->uiCapability()->setUiName( "Result" );
|
||||
m_resultDefinition->setResultType( RiaDefines::ResultCatType::DYNAMIC_NATIVE );
|
||||
m_resultDefinition->setResultVariable( "SOIL" );
|
||||
|
||||
CAF_PDM_InitField( &m_cellCountI, "CellCountI", 100, "Cell Count I" );
|
||||
CAF_PDM_InitField( &m_cellCountJ, "CellCountJ", 100, "Cell Count J" );
|
||||
CAF_PDM_InitField( &m_cellCountK, "CellCountK", 10, "Cell Count K" );
|
||||
|
||||
CAF_PDM_InitField( &m_generateEnsembleStatistics, "GenerateEnsembleStatistics", true, "Generate Ensemble Statistics" );
|
||||
caf::PdmUiPushButtonEditor::configureEditorLabelHidden( &m_generateEnsembleStatistics );
|
||||
|
||||
@@ -279,6 +291,14 @@ void RimWellTargetCandidatesGenerator::defineEditorAttribute( const caf::PdmFiel
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3st RimWellTargetCandidatesGenerator::getResultGridCellCount() const
|
||||
{
|
||||
return cvf::Vec3st( m_cellCountI, m_cellCountJ, m_cellCountK );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -296,9 +316,11 @@ void RimWellTargetCandidatesGenerator::generateEnsembleStatistics()
|
||||
auto ensemble = firstAncestorOrThisOfType<RimEclipseCaseEnsemble>();
|
||||
if ( !ensemble ) return;
|
||||
|
||||
RigWellTargetCandidatesGenerator::ClusteringLimits limits = getClusteringLimits();
|
||||
RimRegularGridCase* regularGridCase = RigWellTargetCandidatesGenerator::generateEnsembleCandidates( *ensemble,
|
||||
const cvf::Vec3st& resultGridCellCount = getResultGridCellCount();
|
||||
RigWellTargetCandidatesGenerator::ClusteringLimits limits = getClusteringLimits();
|
||||
RimRegularGridCase* regularGridCase = RigWellTargetCandidatesGenerator::generateEnsembleCandidates( *ensemble,
|
||||
m_timeStep(),
|
||||
resultGridCellCount,
|
||||
m_volumeType(),
|
||||
m_volumesType(),
|
||||
m_volumeResultType(),
|
||||
@@ -331,7 +353,31 @@ void RimWellTargetCandidatesGenerator::generateEnsembleStatistics()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellTargetCandidatesGenerator::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
PdmObject::defineUiOrdering( uiConfigName, uiOrdering );
|
||||
caf::PdmUiGroup* resultGroup = uiOrdering.addNewGroup( "Result" );
|
||||
resultGroup->add( &m_timeStep );
|
||||
resultGroup->add( &m_volumeType );
|
||||
resultGroup->add( &m_volumeResultType );
|
||||
resultGroup->add( &m_volumesType );
|
||||
|
||||
caf::PdmUiGroup* clusterLimitsGroup = uiOrdering.addNewGroup( "Cluster Growth Limits" );
|
||||
clusterLimitsGroup->add( &m_volume );
|
||||
clusterLimitsGroup->add( &m_pressure );
|
||||
clusterLimitsGroup->add( &m_permeability );
|
||||
clusterLimitsGroup->add( &m_transmissibility );
|
||||
|
||||
caf::PdmUiGroup* resultDefinitionGroup = uiOrdering.addNewGroup( "Cluster Filter" );
|
||||
m_resultDefinition->uiOrdering( uiConfigName, *resultDefinitionGroup );
|
||||
|
||||
caf::PdmUiGroup* ensembleGridGroup = uiOrdering.addNewGroup( "Ensemble Statistics Grid" );
|
||||
ensembleGridGroup->add( &m_cellCountI );
|
||||
ensembleGridGroup->add( &m_cellCountJ );
|
||||
ensembleGridGroup->add( &m_cellCountK );
|
||||
|
||||
caf::PdmUiGroup* advancedGroup = uiOrdering.addNewGroup( "Advanced" );
|
||||
advancedGroup->add( &m_maxIterations );
|
||||
advancedGroup->add( &m_maxClusters );
|
||||
|
||||
uiOrdering.add( &m_generateEnsembleStatistics );
|
||||
|
||||
if ( m_minimumVolume == cvf::UNDEFINED_DOUBLE || m_maximumVolume == cvf::UNDEFINED_DOUBLE )
|
||||
{
|
||||
@@ -349,7 +395,8 @@ RigWellTargetCandidatesGenerator::ClusteringLimits RimWellTargetCandidatesGenera
|
||||
.pressure = m_pressure,
|
||||
.transmissibility = m_transmissibility,
|
||||
.maxClusters = m_maxClusters,
|
||||
.maxIterations = m_maxIterations };
|
||||
.maxIterations = m_maxIterations,
|
||||
.filterAddress = m_resultDefinition->eclipseResultAddress() };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -361,3 +408,21 @@ RimEclipseCase* RimWellTargetCandidatesGenerator::firstCase() const
|
||||
if ( !ensemble || ensemble->cases().empty() ) return nullptr;
|
||||
return ensemble->cases()[0];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellTargetCandidatesGenerator::initAfterRead()
|
||||
{
|
||||
RimEclipseCase* eclipseCase = firstCase();
|
||||
if ( eclipseCase ) m_resultDefinition->setEclipseCase( eclipseCase );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellTargetCandidatesGenerator::updateResultDefinition()
|
||||
{
|
||||
RimEclipseCase* eclipseCase = firstCase();
|
||||
if ( eclipseCase ) m_resultDefinition->setEclipseCase( eclipseCase );
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "Well/RigWellTargetCandidatesGenerator.h"
|
||||
|
||||
class RimEclipseResultDefinition;
|
||||
class RimEclipseCase;
|
||||
|
||||
//==================================================================================================
|
||||
@@ -39,16 +40,20 @@ public:
|
||||
RimWellTargetCandidatesGenerator();
|
||||
~RimWellTargetCandidatesGenerator() override;
|
||||
|
||||
void updateResultDefinition();
|
||||
|
||||
protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void initAfterRead() override;
|
||||
|
||||
private:
|
||||
void generateCandidates( RimEclipseCase* eclipseCase );
|
||||
void updateAllBoundaries();
|
||||
void generateEnsembleStatistics();
|
||||
void generateCandidates( RimEclipseCase* eclipseCase );
|
||||
void updateAllBoundaries();
|
||||
void generateEnsembleStatistics();
|
||||
cvf::Vec3st getResultGridCellCount() const;
|
||||
|
||||
RimEclipseCase* firstCase() const;
|
||||
|
||||
@@ -65,8 +70,15 @@ private:
|
||||
caf::PdmField<double> m_permeability;
|
||||
caf::PdmField<double> m_transmissibility;
|
||||
|
||||
caf::PdmField<int> m_maxIterations;
|
||||
caf::PdmField<int> m_maxClusters;
|
||||
caf::PdmField<int> m_maxIterations;
|
||||
caf::PdmField<int> m_maxClusters;
|
||||
|
||||
caf::PdmChildField<RimEclipseResultDefinition*> m_resultDefinition;
|
||||
|
||||
caf::PdmField<int> m_cellCountI;
|
||||
caf::PdmField<int> m_cellCountJ;
|
||||
caf::PdmField<int> m_cellCountK;
|
||||
|
||||
caf::PdmField<bool> m_generateEnsembleStatistics;
|
||||
|
||||
double m_minimumVolume;
|
||||
|
||||
Reference in New Issue
Block a user