RFT ensemble refactoring

* Compute average MD for intersections with a cell
* Create extractor for simulation well
* Remove rftReader from RifDataSourceForRftPlt
* Add function compute measured depth for RFT cells based on well path geometry
* Move statistics reader to well ensemble curve set
* Make sure both TVD and MD are cached if possible
* Add selection of grid case to use for estimation of measured depth (MD)
Add "Grid Model For MD" where the user can select a grid model. This grid model is propagated to a hidden field in EnsembleCurveSet. The grid model is then applied to RifReaderEnsembleStatisticsRft owned by EnsembleCurveSet
This commit is contained in:
Magne Sjaastad
2023-09-04 10:08:30 +02:00
committed by GitHub
parent fe17b211b8
commit 7a782cec66
27 changed files with 627 additions and 428 deletions

View File

@@ -18,11 +18,16 @@
#include "RiaExtractionTools.h"
#include "RiaSimWellBranchTools.h"
#include "RigWellPath.h"
#include "RimEclipseCase.h"
#include "RimMainPlotCollection.h"
#include "RimSimWellInView.h"
#include "RimTools.h"
#include "RimWellLogPlotCollection.h"
#include "RimWellPathCollection.h"
//--------------------------------------------------------------------------------------------------
///
@@ -37,6 +42,22 @@ RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( Ri
return wlPlotCollection->findOrCreateExtractor( wellPath, eclipseCase );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( const QString& wellName, RimEclipseCase* eclipseCase )
{
if ( !eclipseCase ) return nullptr;
if ( auto wellPathCollection = RimTools::wellPathCollection() )
{
auto wellPath = wellPathCollection->tryFindMatchingWellPath( wellName );
return RiaExtractionTools::findOrCreateWellLogExtractor( wellPath, eclipseCase );
}
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -71,6 +92,33 @@ RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateSimWellExtractor( co
return wlPlotCollection->findOrCreateSimWellExtractor( simWell->name, caseUserDescription, wellPathGeom, eclipseCase->eclipseCaseData() );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateSimWellExtractor( RimEclipseCase* eclipseCase,
const QString& simWellName,
bool useBranchDetection,
int branchIndex )
{
if ( !eclipseCase ) return nullptr;
auto wlPlotCollection = wellLogPlotCollection();
if ( !wlPlotCollection ) return nullptr;
std::vector<const RigWellPath*> wellPaths = RiaSimWellBranchTools::simulationWellBranches( simWellName, useBranchDetection );
if ( wellPaths.empty() ) return nullptr;
branchIndex = RiaSimWellBranchTools::clampBranchIndex( simWellName, branchIndex, useBranchDetection );
if ( branchIndex >= static_cast<int>( wellPaths.size() ) ) return nullptr;
auto wellPathBranch = wellPaths[branchIndex];
return wlPlotCollection->findOrCreateSimWellExtractor( simWellName,
QString( "Find or create sim well extractor" ),
wellPathBranch,
eclipseCase->eclipseCaseData() );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------