Fault reactivation: use values from Eclipse grid for stress.

No longer snapping to the fake well path along the border between the parts.
This commit is contained in:
Kristian Bendiksen
2024-01-31 22:44:10 +01:00
parent 89f90ee9a9
commit e8e376ddb9

View File

@@ -28,6 +28,7 @@
#include "RigEclipseWellLogExtractor.h"
#include "RigFaultReactivationModel.h"
#include "RigGriddedPart3d.h"
#include "RigMainGrid.h"
#include "RigResultAccessorFactory.h"
#include "RigWellPath.h"
@@ -176,7 +177,7 @@ bool RimFaultReactivationDataAccessorStressEclipse::isPositionValid( const cvf::
RimFaultReactivation::GridPart gridPart ) const
{
auto [porBar, extractionPosition] = calculatePorBar( position, m_gradient, gridPart );
return !std::isinf( porBar ) && extractionPosition != cvf::Vec3d::UNDEFINED;
return !std::isinf( porBar );
}
//--------------------------------------------------------------------------------------------------
@@ -197,8 +198,20 @@ std::pair<double, cvf::Vec3d> RimFaultReactivationDataAccessorStressEclipse::cal
auto [values, intersections] =
RimFaultReactivationDataAccessorWellLogExtraction::extractValuesAndIntersections( *m_resultAccessor.p(), *extractor.p(), *wellPath );
auto [value, pos] = RimFaultReactivationDataAccessorWellLogExtraction::calculatePorBar( intersections, values, position, m_gradient );
return { value, pos };
auto [value, extractionPos] =
RimFaultReactivationDataAccessorWellLogExtraction::calculatePorBar( intersections, values, position, m_gradient );
if ( extractionPos.isUndefined() )
{
auto cellIdx = m_mainGrid->findReservoirCellIndexFromPoint( position );
if ( cellIdx != cvf::UNDEFINED_SIZE_T )
{
double valueFromEclipse = m_resultAccessor->cellScalar( cellIdx );
if ( !std::isinf( valueFromEclipse ) ) return { valueFromEclipse, position };
}
return { value, position };
}
return { value, extractionPos };
}
return { std::numeric_limits<double>::infinity(), cvf::Vec3d::UNDEFINED };