mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8876 Fracture: add option to use align dip with formation dip
This commit is contained in:
@@ -527,6 +527,14 @@ double RimFracture::dip() const
|
||||
return m_dip();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFracture::setDip( double dip )
|
||||
{
|
||||
m_dip = dip;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -95,6 +95,7 @@ public:
|
||||
size_t globalCellIndex ) const;
|
||||
|
||||
cvf::Mat4d transformMatrix() const;
|
||||
void setDip( double dip );
|
||||
double dip() const;
|
||||
double tilt() const;
|
||||
|
||||
|
||||
@@ -134,6 +134,43 @@ double RimWellPathFracture::wellAzimuthAtFracturePosition() const
|
||||
return wellPathAzimuth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3d RimWellPathFracture::computeFractureDirectionNormal() const
|
||||
{
|
||||
RimWellPath* wellPath = nullptr;
|
||||
this->firstAncestorOrThisOfType( wellPath );
|
||||
if ( !wellPath ) return cvf::Vec3d::UNDEFINED;
|
||||
|
||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
|
||||
// Find the well path points closest to the anchor position
|
||||
cvf::Vec3d p1;
|
||||
cvf::Vec3d p2;
|
||||
wellPathGeometry->twoClosestPoints( fracturePosition(), &p1, &p2 );
|
||||
|
||||
// Create a well direction based on the two points
|
||||
cvf::Vec3d wellDirection = ( p2 - p1 ).getNormalized();
|
||||
|
||||
cvf::Vec3d fractureDirectionNormal = wellDirection;
|
||||
if ( fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH )
|
||||
{
|
||||
cvf::Mat3d azimuthRotation = cvf::Mat3d::fromRotation( cvf::Vec3d::Z_AXIS, cvf::Math::toRadians( 90.0 ) );
|
||||
fractureDirectionNormal.transformVector( azimuthRotation );
|
||||
}
|
||||
else if ( fractureTemplate()->orientationType() == RimFractureTemplate::AZIMUTH )
|
||||
{
|
||||
// Azimuth angle of fracture is relative to north.
|
||||
double wellAzimuth = wellPathGeometry->wellPathAzimuthAngle( fracturePosition() );
|
||||
cvf::Mat3d azimuthRotation =
|
||||
cvf::Mat3d::fromRotation( cvf::Vec3d::Z_AXIS, cvf::Math::toRadians( wellAzimuth - m_azimuth - 90.0 ) );
|
||||
fractureDirectionNormal.transformVector( azimuthRotation );
|
||||
}
|
||||
|
||||
return fractureDirectionNormal;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -42,8 +42,9 @@ public:
|
||||
double fractureMD() const override;
|
||||
void setMeasuredDepth( double mdValue );
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void updateAzimuthBasedOnWellAzimuthAngle() override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void updateAzimuthBasedOnWellAzimuthAngle() override;
|
||||
cvf::Vec3d computeFractureDirectionNormal() const;
|
||||
|
||||
double wellAzimuthAtFracturePosition() const override;
|
||||
|
||||
|
||||
@@ -747,7 +747,7 @@ cvf::Vec3d RimStimPlanModel::computeFractureDirectionNormal( RimWellPath* wellPa
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3d RimStimPlanModel::projectVectorIntoFracturePlane( const cvf::Vec3d& position,
|
||||
const cvf::Vec3d& fractureDirectionNormal,
|
||||
const cvf::Vec3d& direction ) const
|
||||
const cvf::Vec3d& direction )
|
||||
{
|
||||
// Create a fracture plane
|
||||
cvf::Plane fracturePlane;
|
||||
|
||||
@@ -192,6 +192,10 @@ public:
|
||||
|
||||
QString unitForProperty( RiaDefines::CurveProperty curveProperty ) const;
|
||||
|
||||
static cvf::Vec3d projectVectorIntoFracturePlane( const cvf::Vec3d& position,
|
||||
const cvf::Vec3d& fractureDirectionNormal,
|
||||
const cvf::Vec3d& direction );
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
||||
@@ -208,9 +212,6 @@ private:
|
||||
void updatePerforationInterval();
|
||||
|
||||
cvf::Vec3d computeFractureDirectionNormal( RimWellPath* wellPath, const cvf::Vec3d& position ) const;
|
||||
cvf::Vec3d projectVectorIntoFracturePlane( const cvf::Vec3d& position,
|
||||
const cvf::Vec3d& fractureDirectionNormal,
|
||||
const cvf::Vec3d& direction ) const;
|
||||
|
||||
RigEclipseCaseData* getEclipseCaseData() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user