mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 16:32:12 -05:00
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:
1 parent
89f90ee9a9
commit
e8e376ddb9
1 file changed
+16
-3
+16
-3
@@ -28,6 +28,7 @@
|
|||||||
#include "RigEclipseWellLogExtractor.h"
|
#include "RigEclipseWellLogExtractor.h"
|
||||||
#include "RigFaultReactivationModel.h"
|
#include "RigFaultReactivationModel.h"
|
||||||
#include "RigGriddedPart3d.h"
|
#include "RigGriddedPart3d.h"
|
||||||
|
#include "RigMainGrid.h"
|
||||||
#include "RigResultAccessorFactory.h"
|
#include "RigResultAccessorFactory.h"
|
||||||
#include "RigWellPath.h"
|
#include "RigWellPath.h"
|
||||||
|
|
||||||
@@ -176,7 +177,7 @@ bool RimFaultReactivationDataAccessorStressEclipse::isPositionValid( const cvf::
|
|||||||
RimFaultReactivation::GridPart gridPart ) const
|
RimFaultReactivation::GridPart gridPart ) const
|
||||||
{
|
{
|
||||||
auto [porBar, extractionPosition] = calculatePorBar( position, m_gradient, gridPart );
|
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] =
|
auto [values, intersections] =
|
||||||
RimFaultReactivationDataAccessorWellLogExtraction::extractValuesAndIntersections( *m_resultAccessor.p(), *extractor.p(), *wellPath );
|
RimFaultReactivationDataAccessorWellLogExtraction::extractValuesAndIntersections( *m_resultAccessor.p(), *extractor.p(), *wellPath );
|
||||||
|
|
||||||
auto [value, pos] = RimFaultReactivationDataAccessorWellLogExtraction::calculatePorBar( intersections, values, position, m_gradient );
|
auto [value, extractionPos] =
|
||||||
return { value, pos };
|
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 };
|
return { std::numeric_limits<double>::infinity(), cvf::Vec3d::UNDEFINED };
|
||||||
|
|||||||
Reference in new issue
Block a user