mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
#8027 StimPlan Model Export: Add perforation, formation and facies info
This commit is contained in:
@@ -24,7 +24,10 @@
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
|
||||
#include "RimColorLegend.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseResultDefinition.h"
|
||||
#include "RimFaciesProperties.h"
|
||||
#include "RimStimPlanModel.h"
|
||||
#include "RimStimPlanModelCalculator.h"
|
||||
#include "RimStimPlanModelElasticPropertyCalculator.h"
|
||||
@@ -32,7 +35,9 @@
|
||||
#include "RimStimPlanModelPressureCalculator.h"
|
||||
#include "RimStimPlanModelPropertyCalculator.h"
|
||||
#include "RimStimPlanModelStressCalculator.h"
|
||||
#include "RimStimPlanModelTemplate.h"
|
||||
#include "RimStimPlanModelWellLogCalculator.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
@@ -707,6 +712,66 @@ double RimStimPlanModelCalculator::calculateStressAtDepth( double depth,
|
||||
return stress;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<std::vector<double>, std::vector<QString>> RimStimPlanModelCalculator::calculateFacies() const
|
||||
{
|
||||
std::vector<double> values = findCurveAndComputeTopOfLayer( RiaDefines::CurveProperty::FACIES );
|
||||
std::vector<QString> faciesNames;
|
||||
|
||||
RimStimPlanModelTemplate* stimPlanModelTemplate = m_stimPlanModel->stimPlanModelTemplate();
|
||||
if ( !stimPlanModelTemplate )
|
||||
{
|
||||
RiaLogging::error( QString( "No fracture model template found" ) );
|
||||
return std::make_pair( values, faciesNames );
|
||||
}
|
||||
|
||||
RimFaciesProperties* faciesProperties = stimPlanModelTemplate->faciesProperties();
|
||||
if ( !faciesProperties )
|
||||
{
|
||||
RiaLogging::error( QString( "No facies properties found when extracting elastic properties." ) );
|
||||
return std::make_pair( values, faciesNames );
|
||||
}
|
||||
|
||||
RimColorLegend* colorLegend = faciesProperties->colorLegend();
|
||||
if ( !colorLegend )
|
||||
{
|
||||
RiaLogging::error( QString( "No color legend found when extracting elastic properties." ) );
|
||||
return std::make_pair( values, faciesNames );
|
||||
}
|
||||
|
||||
for ( auto value : values )
|
||||
{
|
||||
faciesNames.push_back( RimStimPlanModelElasticPropertyCalculator::findFaciesName( *colorLegend, value ) );
|
||||
}
|
||||
|
||||
return std::make_pair( values, faciesNames );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<std::vector<double>, std::vector<QString>> RimStimPlanModelCalculator::calculateFormation() const
|
||||
{
|
||||
std::vector<double> values = findCurveAndComputeTopOfLayer( RiaDefines::CurveProperty::FORMATIONS );
|
||||
|
||||
RimEclipseCase* eclipseCase = m_stimPlanModel->eclipseCaseForProperty( RiaDefines::CurveProperty::FACIES );
|
||||
std::vector<QString> formationNamesVector = RimWellLogTrack::formationNamesVector( eclipseCase );
|
||||
|
||||
std::vector<QString> formationNames;
|
||||
for ( auto value : values )
|
||||
{
|
||||
int idx = static_cast<int>( value );
|
||||
if ( idx < static_cast<int>( formationNamesVector.size() ) )
|
||||
formationNames.push_back( formationNamesVector[idx] );
|
||||
else
|
||||
formationNames.push_back( "_" );
|
||||
}
|
||||
|
||||
return std::make_pair( values, formationNames );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -65,6 +65,9 @@ public:
|
||||
std::vector<double> calculatePoroElasticConstant() const;
|
||||
std::vector<double> calculateThermalExpansionCoefficient() const;
|
||||
|
||||
std::pair<std::vector<double>, std::vector<QString>> calculateFacies() const;
|
||||
std::pair<std::vector<double>, std::vector<QString>> calculateFormation() const;
|
||||
|
||||
void calculateTemperature( std::vector<double>& temperatures ) const;
|
||||
|
||||
void clearCache();
|
||||
|
||||
+2
-2
@@ -44,6 +44,8 @@ public:
|
||||
|
||||
bool isMatching( RiaDefines::CurveProperty curveProperty ) const override;
|
||||
|
||||
static QString findFaciesName( const RimColorLegend& colorLegend, double value );
|
||||
|
||||
protected:
|
||||
static void addOverburden( std::vector<QString>& formationNames,
|
||||
std::vector<double>& formationValues,
|
||||
@@ -59,8 +61,6 @@ protected:
|
||||
double underburdenHeight,
|
||||
const QString& formationName );
|
||||
|
||||
static QString findFaciesName( const RimColorLegend& colorLegend, double value );
|
||||
|
||||
private:
|
||||
RimStimPlanModelCalculator* m_stimPlanModelCalculator;
|
||||
};
|
||||
|
||||
+11
-2
@@ -54,7 +54,7 @@ RimStimPlanModelLayerCalculator::RimStimPlanModelLayerCalculator( RimStimPlanMod
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimStimPlanModelLayerCalculator::isMatching( RiaDefines::CurveProperty curveProperty ) const
|
||||
{
|
||||
return curveProperty == RiaDefines::CurveProperty::LAYERS;
|
||||
return ( curveProperty == RiaDefines::CurveProperty::LAYERS || curveProperty == RiaDefines::CurveProperty::FORMATIONS );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -165,7 +165,16 @@ bool RimStimPlanModelLayerCalculator::calculate( RiaDefines::CurveProperty curve
|
||||
layerNo++;
|
||||
}
|
||||
|
||||
values[i] = layerNo;
|
||||
if ( curveProperty == RiaDefines::CurveProperty::LAYERS )
|
||||
{
|
||||
values[i] = layerNo;
|
||||
}
|
||||
else
|
||||
{
|
||||
CAF_ASSERT( curveProperty == RiaDefines::CurveProperty::FORMATIONS );
|
||||
values[i] = curveData.data[i];
|
||||
}
|
||||
|
||||
previousFormation = curveData.data[i];
|
||||
previousFacies = faciesValues[i];
|
||||
if ( useNetToGross )
|
||||
|
||||
Reference in New Issue
Block a user