mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8846 StimPlan model plot: Correct perforation interval for longitudinal fracture
Fixes #8846.
This commit is contained in:
committed by
Magne Sjaastad
parent
402f738abd
commit
837a0f208c
@@ -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 );
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user