mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7871 StimPlan Model: resample well log data when not from static case
This commit is contained in:
parent
b69665ce23
commit
56a86eee5f
@ -45,6 +45,12 @@ public:
|
|||||||
|
|
||||||
static double pressureDifferenceInterpolationOffset();
|
static double pressureDifferenceInterpolationOffset();
|
||||||
|
|
||||||
|
static std::tuple<std::vector<double>, std::vector<double>, std::vector<double>>
|
||||||
|
interpolateMissingValues( const std::vector<double>& staticTvDepthValues,
|
||||||
|
const std::vector<double>& staticMeasuredDepthValues,
|
||||||
|
const std::vector<double>& measuredDepthValues,
|
||||||
|
const std::vector<double>& values );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool extractValuesForProperty( RiaDefines::CurveProperty curveProperty,
|
bool extractValuesForProperty( RiaDefines::CurveProperty curveProperty,
|
||||||
const RimStimPlanModel* stimPlanModel,
|
const RimStimPlanModel* stimPlanModel,
|
||||||
@ -78,12 +84,6 @@ protected:
|
|||||||
const std::vector<double>& faciesValues,
|
const std::vector<double>& faciesValues,
|
||||||
std::vector<double>& values ) const;
|
std::vector<double>& values ) const;
|
||||||
|
|
||||||
static std::tuple<std::vector<double>, std::vector<double>, std::vector<double>>
|
|
||||||
interpolateMissingValues( const std::vector<double>& staticTvDepthValues,
|
|
||||||
const std::vector<double>& staticMeasuredDepthValues,
|
|
||||||
const std::vector<double>& measuredDepthValues,
|
|
||||||
const std::vector<double>& values );
|
|
||||||
|
|
||||||
typedef std::pair<double, double> DepthValuePair;
|
typedef std::pair<double, double> DepthValuePair;
|
||||||
typedef std::vector<DepthValuePair> DepthValuePairVector;
|
typedef std::vector<DepthValuePair> DepthValuePairVector;
|
||||||
typedef std::map<int, DepthValuePairVector> EqlNumToDepthValuePairMap;
|
typedef std::map<int, DepthValuePairVector> EqlNumToDepthValuePairMap;
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#include "RimNonNetLayers.h"
|
#include "RimNonNetLayers.h"
|
||||||
#include "RimStimPlanModel.h"
|
#include "RimStimPlanModel.h"
|
||||||
#include "RimStimPlanModelCalculator.h"
|
#include "RimStimPlanModelCalculator.h"
|
||||||
|
#include "RimStimPlanModelPressureCalculator.h"
|
||||||
#include "RimStimPlanModelTemplate.h"
|
#include "RimStimPlanModelTemplate.h"
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
|
|
||||||
@ -203,6 +204,36 @@ bool RimStimPlanModelWellLogCalculator::calculate( RiaDefines::CurveProperty cur
|
|||||||
scaleByNetToGross( stimPlanModel, netToGross, values );
|
scaleByNetToGross( stimPlanModel, netToGross, values );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Extracted well log needs to be sampled at same depths as well logs from static grid.
|
||||||
|
// If the well log is extracted from a different model it needs to be resampled.
|
||||||
|
if ( curveProperty != RiaDefines::CurveProperty::FACIES )
|
||||||
|
{
|
||||||
|
std::vector<double> targetMds;
|
||||||
|
std::vector<double> targetTvds;
|
||||||
|
std::vector<double> faciesValues;
|
||||||
|
if ( !stimPlanModel->calculator()->extractCurveData( RiaDefines::CurveProperty::FACIES,
|
||||||
|
timeStep,
|
||||||
|
faciesValues,
|
||||||
|
targetMds,
|
||||||
|
targetTvds,
|
||||||
|
rkbDiff ) )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( targetMds.size() != measuredDepthValues.size() )
|
||||||
|
{
|
||||||
|
RiaLogging::info( "Resampling data to fit static case." );
|
||||||
|
auto [tvds, mds, results] = RimStimPlanModelPressureCalculator::interpolateMissingValues( targetTvds,
|
||||||
|
targetMds,
|
||||||
|
measuredDepthValues,
|
||||||
|
values );
|
||||||
|
tvDepthValues = tvds;
|
||||||
|
measuredDepthValues = mds;
|
||||||
|
values = results;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RiaLogging::debug( QString( "Well log for '%1' done. Size: %2." )
|
RiaLogging::debug( QString( "Well log for '%1' done. Size: %2." )
|
||||||
.arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() )
|
.arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() )
|
||||||
.arg( values.size() ) );
|
.arg( values.size() ) );
|
||||||
|
Loading…
Reference in New Issue
Block a user