From 6a5c6ee545eef2a77a2f9de6abca1092b1c2d33a Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Fri, 15 Mar 2024 13:22:29 +0100 Subject: [PATCH] Transmissibility equations: guard against NaN in very small intersections. --- .../RigEclipseToStimPlanCellTransmissibilityCalculator.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ApplicationLibCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp b/ApplicationLibCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp index 25856faef0..e4a6fc7742 100644 --- a/ApplicationLibCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp +++ b/ApplicationLibCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp @@ -263,6 +263,9 @@ void RigEclipseToStimPlanCellTransmissibilityCalculator::calculateStimPlanCellsM for ( double lengtXarea : lengthXareaOfFractureParts ) totalAreaXLength += lengtXarea; + // Guard against numerical issues for very small intersections + if ( std::isnan( totalAreaXLength ) || std::isnan( fractureArea ) ) continue; + double fractureAreaWeightedlength = totalAreaXLength / fractureArea; // Transmissibility for inactive cells is set to zero