From ae7ab97e2e8c367bf020ec7b29505e8e7b39a88e Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Wed, 28 Feb 2024 12:56:04 +0100 Subject: [PATCH] WBS: Compute and show SH_MK_* only in reservoir (not shale). --- .../ReservoirDataModel/RigGeoMechWellLogExtractor.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ApplicationLibCode/ReservoirDataModel/RigGeoMechWellLogExtractor.cpp b/ApplicationLibCode/ReservoirDataModel/RigGeoMechWellLogExtractor.cpp index f8d99514cc..55ced732ce 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigGeoMechWellLogExtractor.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigGeoMechWellLogExtractor.cpp @@ -195,7 +195,6 @@ QString RigGeoMechWellLogExtractor::curveData( const RigFemResultAddress& resAdd auto [ppResultName, pp0ResultName] = mapSHMkToPP( QString::fromStdString( resAddr.fieldName ) ); wellBoreSH_MatthewsKelly( timeStepIndex, frameIndex, ppResultName, pp0ResultName, values ); - values->front() = wbsCurveValuesAtMsl(); } else { @@ -870,6 +869,10 @@ void RigGeoMechWellLogExtractor::wellBoreSH_MatthewsKelly( int calculateWbsParameterForAllSegments( RigWbsParameter::OBG0(), 0, 0, &OBG0, true ); calculateWbsParameterForAllSegments( RigWbsParameter::DF(), timeStepIndex, frameIndex, &DF, true ); + std::vector ppSandAllSegments( intersections().size(), std::numeric_limits::infinity() ); + std::vector ppSources = + calculateWbsParameterForAllSegments( RigWbsParameter::PP_Reservoir(), timeStepIndex, frameIndex, &ppSandAllSegments, false ); + values->resize( intersections().size(), std::numeric_limits::infinity() ); if ( PP.size() != intersections().size() || PP0.size() != intersections().size() ) return; @@ -880,8 +883,8 @@ void RigGeoMechWellLogExtractor::wellBoreSH_MatthewsKelly( int #pragma omp parallel for for ( int64_t intersectionIdx = 0; intersectionIdx < static_cast( intersections().size() ); ++intersectionIdx ) { - if ( isValid( PP[intersectionIdx] ) && isValid( PP0[intersectionIdx] ) && isValid( OBG0[intersectionIdx] ) && - isValid( K0_SH[intersectionIdx] ) && isValid( DF[intersectionIdx] ) ) + if ( ppSources[intersectionIdx] == RigWbsParameter::GRID && isValid( PP[intersectionIdx] ) && isValid( PP0[intersectionIdx] ) && + isValid( OBG0[intersectionIdx] ) && isValid( K0_SH[intersectionIdx] ) && isValid( DF[intersectionIdx] ) ) { ( *values )[intersectionIdx] = ( K0_SH[intersectionIdx] * ( OBG0[intersectionIdx] - PP0[intersectionIdx] ) + PP0[intersectionIdx] + DF[intersectionIdx] * ( PP[intersectionIdx] - PP0[intersectionIdx] ) );