From ad9886a511500b164fd25a880d3c3427c221f63c Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Mon, 18 Sep 2023 22:31:44 +0200 Subject: [PATCH] StimPlanModel: Use default overburden facies for pressure depletion. --- .../RimStimPlanModelPressureCalculator.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPressureCalculator.cpp b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPressureCalculator.cpp index 32248e6755..1692c35ac0 100644 --- a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPressureCalculator.cpp +++ b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPressureCalculator.cpp @@ -763,8 +763,14 @@ bool RimStimPlanModelPressureCalculator::handleFaciesWithInitialPressure( const for ( size_t i = 0; i < faciesValues.size(); i++ ) { - // Use the values from initial pressure curve - int faciesValue = static_cast( faciesValues[i] ); + double rawFaciesValue = faciesValues[i]; + if ( std::isinf( faciesValues[i] ) ) + { + // Facies is only inf in the overburden: replace with default facies + rawFaciesValue = stimPlanModel->getDefaultForMissingOverburdenValue( RiaDefines::CurveProperty::FACIES ); + } + + int faciesValue = static_cast( rawFaciesValue ); double currentPressure = values[i]; double initialPressure = initialPressureValues[i]; auto faciesConfig = faciesWithInitialPressure.find( faciesValue );