mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-03 20:57:39 -06:00
#8846 StimPlan model plot: Correct perforation interval for longitudinal fracture
Fixes #8846.
This commit is contained in:
parent
402f738abd
commit
837a0f208c
@ -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();
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 );
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user