mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1167 - pre-proto - Calculating azimuth angle for well path and using this angle in setting azimuth angle for fracture.
This commit is contained in:
@@ -114,7 +114,12 @@ void RimEllipseFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
|
||||
if (changedField == &orientation)
|
||||
{
|
||||
fracture->setAzimuth(orientation());
|
||||
fracture->setAzimuth();
|
||||
if (orientation() == FracOrientationEnum::AZIMUTH)
|
||||
{
|
||||
fracture->azimuth = azimuthAngle;
|
||||
}
|
||||
|
||||
fracture->setRecomputeGeometryFlag();
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
cvf::Vec3d anchorPosition();
|
||||
void setAnchorPosition(const cvf::Vec3d& pos);
|
||||
virtual void setAzimuth(RimEllipseFractureTemplate::FracOrientationEnum orientation) =0;
|
||||
virtual void setAzimuth() =0;
|
||||
|
||||
cvf::Mat4f transformMatrix();
|
||||
|
||||
|
||||
@@ -71,8 +71,12 @@ void RimSimWellFracture::setClosestWellCoord(cvf::Vec3d& position, size_t branch
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSimWellFracture::setAzimuth(RimEllipseFractureTemplate::FracOrientationEnum orientation)
|
||||
void RimSimWellFracture::setAzimuth()
|
||||
{
|
||||
RimEllipseFractureTemplate::FracOrientationEnum orientation;
|
||||
if (attachedFractureDefinition()) orientation = attachedFractureDefinition()->orientation();
|
||||
else orientation = RimEllipseFractureTemplate::AZIMUTH;
|
||||
|
||||
if (orientation == RimEllipseFractureTemplate::ALONG_WELL_PATH || orientation== RimEllipseFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
updateBranchGeometry();
|
||||
@@ -88,12 +92,10 @@ void RimSimWellFracture::setAzimuth(RimEllipseFractureTemplate::FracOrientationE
|
||||
}
|
||||
|
||||
}
|
||||
else //Azimuth value, read from template
|
||||
else //Azimuth value read from template
|
||||
{
|
||||
azimuth = attachedFractureDefinition()->azimuthAngle;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -108,6 +110,11 @@ void RimSimWellFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedFiel
|
||||
)
|
||||
{
|
||||
updateFracturePositionFromLocation();
|
||||
setAzimuth();
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj) proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
|
||||
void recomputeWellCenterlineCoordinates();
|
||||
void updateFracturePositionFromLocation();
|
||||
void setAzimuth(RimEllipseFractureTemplate::FracOrientationEnum orientation) override;
|
||||
void setAzimuth() override;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
@@ -75,6 +75,7 @@ void RimWellPathFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
if (changedField == &m_measuredDepth)
|
||||
{
|
||||
updatePositionFromMeasuredDepth();
|
||||
setAzimuth();
|
||||
|
||||
RimProject* proj = nullptr;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
@@ -85,27 +86,39 @@ void RimWellPathFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathFracture::setAzimuth(RimEllipseFractureTemplate::FracOrientationEnum orientation)
|
||||
void RimWellPathFracture::setAzimuth()
|
||||
{
|
||||
RimEllipseFractureTemplate::FracOrientationEnum orientation;
|
||||
if (attachedFractureDefinition()) orientation = attachedFractureDefinition()->orientation();
|
||||
else orientation = RimEllipseFractureTemplate::AZIMUTH;
|
||||
|
||||
if (orientation == RimEllipseFractureTemplate::ALONG_WELL_PATH || orientation == RimEllipseFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
// updateBranchGeometry();
|
||||
// double simWellAzimuth = m_branchCenterLines[m_branchIndex].wellPathAzimuthAngle(fracturePosition());
|
||||
//TODO: Calculate well path azimuth angle
|
||||
double WellPathAzimuth = 0.0;
|
||||
if (orientation == RimEllipseFractureTemplate::ALONG_WELL_PATH)
|
||||
{
|
||||
azimuth = WellPathAzimuth;
|
||||
}
|
||||
|
||||
caf::PdmObjectHandle* objHandle = dynamic_cast<caf::PdmObjectHandle*>(this);
|
||||
if (!objHandle) return;
|
||||
|
||||
RimWellPath* wellPath = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(wellPath);
|
||||
if (!wellPath) return;
|
||||
|
||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
double wellPathAzimuth = wellPathGeometry->wellPathAzimuthAngle(fracturePosition());
|
||||
if (orientation == RimEllipseFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
if (WellPathAzimuth + 90 < 360) azimuth = WellPathAzimuth + 90;
|
||||
else azimuth = WellPathAzimuth - 90;
|
||||
azimuth = wellPathAzimuth;
|
||||
}
|
||||
if (orientation == RimEllipseFractureTemplate::ALONG_WELL_PATH)
|
||||
{
|
||||
if (wellPathAzimuth + 90 < 360) azimuth = wellPathAzimuth + 90;
|
||||
else azimuth = wellPathAzimuth - 90;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//TODO: Reset value if choosing azimuth in frac template!
|
||||
// else //Azimuth value read from template
|
||||
// {
|
||||
// azimuth = attachedFractureDefinition()->azimuthAngle;
|
||||
// }
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
void setMeasuredDepth(double mdValue);
|
||||
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual void setAzimuth(RimEllipseFractureTemplate::FracOrientationEnum orientation) override;
|
||||
virtual void setAzimuth() override;
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
Reference in New Issue
Block a user