diff --git a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModel.cpp b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModel.cpp index 59fc809abc..2430fbbf95 100644 --- a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModel.cpp +++ b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModel.cpp @@ -1111,7 +1111,8 @@ std::deque else if ( curveProperty == RiaDefines::CurveProperty::EQLNUM ) return { RimStimPlanModel::MissingValueStrategy::DEFAULT_VALUE, RimStimPlanModel::MissingValueStrategy::CELLS_ABOVE, - RimStimPlanModel::MissingValueStrategy::CELLS_BELOW }; + RimStimPlanModel::MissingValueStrategy::CELLS_BELOW, + RimStimPlanModel::MissingValueStrategy::LINEAR_INTERPOLATION }; else return { RimStimPlanModel::MissingValueStrategy::DEFAULT_VALUE }; } diff --git a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPressureCalculator.cpp b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPressureCalculator.cpp index 2f86d87cca..3d8cff301f 100644 --- a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPressureCalculator.cpp +++ b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPressureCalculator.cpp @@ -209,6 +209,9 @@ bool RimStimPlanModelPressureCalculator::extractValuesForProperty( RiaDefines::C return true; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- std::tuple, std::vector, std::vector> RimStimPlanModelPressureCalculator::interpolateMissingValues( const std::vector& targetTvds, const std::vector& targetMds, diff --git a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelWellLogCalculator.cpp b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelWellLogCalculator.cpp index 6db658b4e9..c053013d3f 100644 --- a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelWellLogCalculator.cpp +++ b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelWellLogCalculator.cpp @@ -127,7 +127,13 @@ bool RimStimPlanModelWellLogCalculator::calculate( RiaDefines::CurveProperty cur { // K-1 is up int kDirection = -1; - if ( !replaceMissingValuesWithOtherKLayer( curveProperty, stimPlanModel, timeStep, measuredDepthValues, values, kDirection ) ) + if ( !replaceMissingValuesWithOtherKLayer( curveProperty, + stimPlanModel, + timeStep, + measuredDepthValues, + tvDepthValues, + values, + kDirection ) ) { return false; } @@ -136,7 +142,13 @@ bool RimStimPlanModelWellLogCalculator::calculate( RiaDefines::CurveProperty cur { // K+1 is down int kDirection = 1; - if ( !replaceMissingValuesWithOtherKLayer( curveProperty, stimPlanModel, timeStep, measuredDepthValues, values, kDirection ) ) + if ( !replaceMissingValuesWithOtherKLayer( curveProperty, + stimPlanModel, + timeStep, + measuredDepthValues, + tvDepthValues, + values, + kDirection ) ) { return false; } @@ -561,6 +573,7 @@ bool RimStimPlanModelWellLogCalculator::replaceMissingValuesWithOtherKLayer( Ria const RimStimPlanModel* stimPlanModel, int timeStep, const std::vector& measuredDepths, + const std::vector& tvDepthValues, std::vector& values, int moveDirection ) const { @@ -594,6 +607,7 @@ bool RimStimPlanModelWellLogCalculator::replaceMissingValuesWithOtherKLayer( Ria if ( std::isinf( values[idx] ) ) { double measuredDepth = measuredDepths[idx]; + double tvd = tvDepthValues[idx]; cvf::Vec3d position = wellPathGeometry->interpolatedPointAlongWellPath( measuredDepth ); size_t cellIdx = mainGrid->findReservoirCellIndexFromPoint( position ); @@ -606,11 +620,13 @@ bool RimStimPlanModelWellLogCalculator::replaceMissingValuesWithOtherKLayer( Ria bool isValid = mainGrid->ijkFromCellIndex( cellIdx, &i, &j, &k ); if ( isValid ) { - RiaLogging::info( QString( "Missing value at MD: %1. Cell [%2, %3, %4]" ) - .arg( measuredDepth ) - .arg( i + 1 ) - .arg( j + 1 ) - .arg( k + 1 ) ); + RiaLogging::debug( + QString( "K-Layer replacement: Replace missing value at MD: %1 TVD: %2. Cell [%3, %4, %5]" ) + .arg( measuredDepth ) + .arg( tvd ) + .arg( i + 1 ) + .arg( j + 1 ) + .arg( k + 1 ) ); int neighborK = static_cast( k ) + moveDirection; const int minK = static_cast( 1 ); @@ -643,6 +659,15 @@ bool RimStimPlanModelWellLogCalculator::replaceMissingValuesWithOtherKLayer( Ria } } } + else + { + RiaLogging::debug( QString( "K-Layer Replacement: Invalid cell idx: MD=%1 TVD=%2 Pos: [%3 %4 %5]" ) + .arg( measuredDepth ) + .arg( tvd ) + .arg( position.x() ) + .arg( position.y() ) + .arg( position.z() ) ); + } } } diff --git a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelWellLogCalculator.h b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelWellLogCalculator.h index df1a4cba67..3cc1330ddc 100644 --- a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelWellLogCalculator.h +++ b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelWellLogCalculator.h @@ -100,6 +100,7 @@ protected: const RimStimPlanModel* stimPlanModel, int timeStep, const std::vector& measuredDepths, + const std::vector& tvDepthValues, std::vector& values, int kDirection ) const;