mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
StimPlanModel: Extrapolate pressure table to cover extraction range.
This commit is contained in:
parent
146412c600
commit
ec6a13e1da
@ -153,7 +153,10 @@ bool RimStimPlanModelPressureCalculator::extractValuesForProperty( RiaDefines::C
|
||||
|
||||
if ( stimPlanModel->stimPlanModelTemplate()->usePressureTableForProperty( pressureCurveProperty ) )
|
||||
{
|
||||
if ( !extractPressureDataFromTable( pressureCurveProperty, stimPlanModel, values, measuredDepthValues, tvDepthValues ) )
|
||||
CAF_ASSERT( !targetTvds.empty() );
|
||||
double minTvd = targetTvds[0];
|
||||
double maxTvd = targetTvds[targetTvds.size() - 1];
|
||||
if ( !extractPressureDataFromTable( pressureCurveProperty, stimPlanModel, values, measuredDepthValues, tvDepthValues, minTvd, maxTvd ) )
|
||||
{
|
||||
RiaLogging::error( "Unable to extract pressure data from table" );
|
||||
return false;
|
||||
@ -321,7 +324,9 @@ bool RimStimPlanModelPressureCalculator::extractPressureDataFromTable( RiaDefine
|
||||
const RimStimPlanModel* stimPlanModel,
|
||||
std::vector<double>& values,
|
||||
std::vector<double>& measuredDepthValues,
|
||||
std::vector<double>& tvDepthValues ) const
|
||||
std::vector<double>& tvDepthValues,
|
||||
double minimumTvd,
|
||||
double maximumTvd ) const
|
||||
{
|
||||
RimStimPlanModelTemplate* stimPlanModelTemplate = stimPlanModel->stimPlanModelTemplate();
|
||||
if ( !stimPlanModelTemplate ) return false;
|
||||
@ -357,6 +362,27 @@ bool RimStimPlanModelPressureCalculator::extractPressureDataFromTable( RiaDefine
|
||||
tvDepthValues.push_back( item->depth() );
|
||||
}
|
||||
|
||||
// Make sure the full range of the extraction is covered by the table
|
||||
bool needsExtrapolation = false;
|
||||
if ( minimumTvd < tvDepthValues.front() )
|
||||
{
|
||||
tvDepthValues.insert( tvDepthValues.begin(), minimumTvd );
|
||||
values.insert( values.begin(), std::numeric_limits<double>::infinity() );
|
||||
needsExtrapolation = true;
|
||||
}
|
||||
|
||||
if ( maximumTvd > tvDepthValues.back() )
|
||||
{
|
||||
tvDepthValues.push_back( maximumTvd );
|
||||
values.push_back( std::numeric_limits<double>::infinity() );
|
||||
needsExtrapolation = true;
|
||||
}
|
||||
|
||||
if ( needsExtrapolation )
|
||||
{
|
||||
RiaInterpolationTools::interpolateMissingValues( tvDepthValues, values );
|
||||
}
|
||||
|
||||
// Interpolate MDs from the tvd data from the table and well path geometry
|
||||
const std::vector<double>& mdValuesOfWellPath = wellPathGeometry->measuredDepths();
|
||||
const std::vector<double>& tvdValuesOfWellPath = wellPathGeometry->trueVerticalDepths();
|
||||
|
@ -64,7 +64,9 @@ protected:
|
||||
const RimStimPlanModel* stimPlanModel,
|
||||
std::vector<double>& values,
|
||||
std::vector<double>& measuredDepthValues,
|
||||
std::vector<double>& tvDepthValues ) const;
|
||||
std::vector<double>& tvDepthValues,
|
||||
double minimumTvd,
|
||||
double maximumTvd ) const;
|
||||
|
||||
bool interpolateInitialPressureByEquilibrationRegion( RiaDefines::CurveProperty curveProperty,
|
||||
const RimStimPlanModel* stimPlanModel,
|
||||
|
Loading…
Reference in New Issue
Block a user