#8846 StimPlan model plot: Correct perforation interval for longitudinal fracture

Fixes #8846.
This commit is contained in:
Kristian Bendiksen 2022-05-13 11:26:05 +02:00 committed by Magne Sjaastad
parent 402f738abd
commit 837a0f208c
3 changed files with 47 additions and 1 deletions

View File

@ -795,8 +795,20 @@ void RimStimPlanModel::updatePerforationInterval()
m_thicknessDirectionWellPath->perforationIntervalCollection()->appendPerforation( m_perforationInterval );
}
double halfPerforationLength = m_perforationLength() * 0.5;
if ( m_fractureOrientation == FractureOrientation::ALONG_WELL_PATH )
{
// Adjust perforation interval for longitudinal fractures to correct TVD depth
CAF_ASSERT( wellPath() );
CAF_ASSERT( wellPath()->wellPathGeometry() );
cvf::Vec3d wellPathTangent = wellPath()->wellPathGeometry()->tangentAlongWellPath( m_MD() );
halfPerforationLength =
RigStimPlanModelTools::calculatePerforationLength( wellPathTangent, m_perforationLength() ) * 0.5;
}
double closestMd = m_thicknessDirectionWellPath->wellPathGeometry()->closestMeasuredDepth( m_anchorPosition );
m_perforationInterval->setStartAndEndMD( closestMd - perforationLength(), closestMd + perforationLength() );
m_perforationInterval->setStartAndEndMD( closestMd - halfPerforationLength, closestMd + halfPerforationLength );
m_perforationInterval->updateConnectedEditors();
updateViewsAndPlots();
}

View File

@ -261,3 +261,35 @@ QString RigStimPlanModelTools::vecToString( const cvf::Vec3d& vec )
{
return QString( "[%1, %2, %3]" ).arg( vec.x() ).arg( vec.y() ).arg( vec.z() );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RigStimPlanModelTools::calculatePerforationLength( const cvf::Vec3d& direction, double perforationLength )
{
// Deviation from vertical. Since well path is tending downwards we compare with negative z.
double inclination = cvf::GeometryTools::getAngle( direction, -cvf::Vec3d::Z_AXIS );
// Keep inclination in 0-90 degrees range
if ( inclination > cvf::PI_D / 2.0 )
{
inclination = cvf::PI_D - inclination;
}
double correctedPerforationLength = perforationLength * std::cos( inclination );
RiaLogging::info(
QString( "Perforation length correction: original length: %1 inclination: %2 corrected length: %3" )
.arg( perforationLength )
.arg( cvf::Math::toDegrees( inclination ) )
.arg( correctedPerforationLength ) );
// Handle well inclination close to 90 dgr to ensure visual perforation interval in StimPlan model plot
if ( std::fabs( cvf::Math::toDegrees( inclination ) - 90.0 ) < 0.1 )
{
double minimumPerforationInterval = 0.5;
return std::max( minimumPerforationInterval, correctedPerforationLength );
}
return correctedPerforationLength;
}

View File

@ -67,4 +67,6 @@ public:
generateBarrierIntersectionsBetweenPoints( RigEclipseCaseData* eclipseCaseData,
const cvf::Vec3d& startPosition,
const cvf::Vec3d& endPosition );
static double calculatePerforationLength( const cvf::Vec3d& wellPathDirection, double perforationLength );
};