#1618 Fixing bug in well path angle calculation + corresponding update to fracture azimuth angle. Calculating difference between well path and fracture angle and displaying warning if less than 10 deg.

This commit is contained in:
astridkbjorke
2017-06-27 14:11:55 +02:00
parent 2501264013
commit 2625ce6ea9
6 changed files with 58 additions and 15 deletions

View File

@@ -100,8 +100,9 @@ RimFracture::RimFracture(void)
CAF_PDM_InitField(&stimPlanTimeIndexToPlot, "timeIndexToPlot", 0, "StimPlan Time Step", "", "", "");
//TODO:
CAF_PDM_InitField(&m_wellPathAzimuth, "WellPathAzimuth", 0.0, "Well Path Azimuth", "", "", "");
CAF_PDM_InitField(&m_wellFractureAzimuthDiff, "WellFractureAzimuthDiff", 0.0, "Azimuth Difference Between Fracture and Well", "", "", "");
CAF_PDM_InitField(&m_wellFractureAzimuthAngleWarning, "WellFractureAzimithAngleWarning", QString("Difference is below 10 degrees. Consider longitudinal fracture"), "", "", "", "");
m_fracturePartMgr = new RivWellFracturePartMgr(this);
}
@@ -162,7 +163,7 @@ void RimFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons
this->firstAncestorOrThisOfTypeAsserted(proj);
proj->reloadCompletionTypeResultsInAllViews();
}
setWellFractureAzimuthDiffAndWarning();
}
}
@@ -352,6 +353,8 @@ QList<caf::PdmOptionItemInfo> RimFracture::calculateValueOptions(const caf::PdmF
void RimFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
{
m_wellPathAzimuth.uiCapability()->setUiReadOnly(true);
m_wellFractureAzimuthDiff.uiCapability()->setUiReadOnly(true);
m_wellFractureAzimuthAngleWarning.uiCapability()->setUiReadOnly(true);
if (m_fractureUnit() == RiaEclipseUnitTools::UNITS_METRIC)
{
@@ -366,6 +369,24 @@ void RimFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiO
if (fractureTemplate())
{
if (fractureTemplate()->orientationType == RimFractureTemplate::ALONG_WELL_PATH
|| fractureTemplate()->orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
{
m_wellFractureAzimuthAngleWarning.uiCapability()->setUiHidden(true);
}
else if (fractureTemplate()->orientationType == RimFractureTemplate::AZIMUTH)
{
if (abs(m_wellFractureAzimuthDiff) > 10)
{
m_wellFractureAzimuthAngleWarning.uiCapability()->setUiHidden(true);
}
else
{
m_wellFractureAzimuthAngleWarning.uiCapability()->setUiHidden(false);
}
}
if (fractureTemplate()->orientationType == RimFractureTemplate::ALONG_WELL_PATH
|| fractureTemplate()->orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
{
@@ -417,6 +438,18 @@ void RimFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiO
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimFracture::setWellFractureAzimuthDiffAndWarning() //TODO: updateWellFra
{
double wellFractureDiffAngle = abs(m_wellPathAzimuth - azimuth);
if (wellFractureDiffAngle > 180) wellFractureDiffAngle = 360 - wellFractureDiffAngle;
m_wellFractureAzimuthDiff = wellFractureDiffAngle;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -100,6 +100,7 @@ protected:
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute) override;
void setWellFractureAzimuthDiffAndWarning();
private:
cvf::Vec3d fracturePositionForUi() const;
@@ -111,7 +112,11 @@ protected:
caf::PdmPtrField<RimFractureTemplate*> m_fractureTemplate;
caf::PdmProxyValueField<cvf::Vec3d> m_uiAnchorPosition;
caf::PdmField< RiaEclipseUnitTools::UnitSystemType > m_fractureUnit;
caf::PdmField<double> m_wellPathAzimuth;
caf::PdmField<double> m_wellFractureAzimuthDiff;
caf::PdmField<QString> m_wellFractureAzimuthAngleWarning;
private:
caf::PdmField<cvf::Vec3d> m_anchorPosition;

View File

@@ -87,11 +87,11 @@ void RimSimWellFracture::updateAzimuthFromFractureTemplate()
{
double simWellAzimuth = wellAzimuthAtFracturePosition();
if (orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH )
if (orientation == RimFractureTemplate::ALONG_WELL_PATH )
{
azimuth = simWellAzimuth;
}
if (orientation == RimFractureTemplate::ALONG_WELL_PATH)
else if (orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH)
{
if (simWellAzimuth + 90 < 360) azimuth = simWellAzimuth + 90;
else azimuth = simWellAzimuth - 90;
@@ -181,8 +181,10 @@ void RimSimWellFracture::updateFracturePositionFromLocation()
if (proj) proj->createDisplayModelAndRedrawAllViews();
}
m_wellPathAzimuth = wellAzimuthAtFracturePosition();
setWellFractureAzimuthDiffAndWarning();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -198,6 +200,8 @@ void RimSimWellFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderi
locationGroup->add(&m_branchIndex);
locationGroup->add(&azimuth);
locationGroup->add(&m_wellPathAzimuth);
locationGroup->add(&m_wellFractureAzimuthDiff);
locationGroup->add(&m_wellFractureAzimuthAngleWarning);
locationGroup->add(&dip);
locationGroup->add(&tilt);

View File

@@ -98,11 +98,11 @@ void RimWellPathFracture::updateAzimuthFromFractureTemplate()
double wellPathAzimuth = wellAzimuthAtFracturePosition();
if (orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH)
if (orientation == RimFractureTemplate::ALONG_WELL_PATH)
{
azimuth = wellPathAzimuth;
}
if (orientation == RimFractureTemplate::ALONG_WELL_PATH)
else if (orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH)
{
if (wellPathAzimuth + 90 < 360) azimuth = wellPathAzimuth + 90;
else azimuth = wellPathAzimuth - 90;
@@ -154,7 +154,7 @@ void RimWellPathFracture::updatePositionFromMeasuredDepth()
this->setAnchorPosition(positionAlongWellpath);
m_wellPathAzimuth = wellAzimuthAtFracturePosition();
setWellFractureAzimuthDiffAndWarning();
}
//--------------------------------------------------------------------------------------------------
@@ -171,6 +171,8 @@ void RimWellPathFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder
locationGroup->add(&m_measuredDepth);
locationGroup->add(&azimuth);
locationGroup->add(&m_wellPathAzimuth);
locationGroup->add(&m_wellFractureAzimuthDiff);
locationGroup->add(&m_wellFractureAzimuthAngleWarning);
locationGroup->add(&dip);
locationGroup->add(&tilt);
@@ -184,6 +186,7 @@ void RimWellPathFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder
caf::PdmUiGroup* fractureCenterGroup = uiOrdering.addNewGroup("Fracture Center Info");
fractureCenterGroup->add(&m_uiAnchorPosition);
}
//--------------------------------------------------------------------------------------------------

View File

@@ -156,15 +156,14 @@ double RigSimulationWellCoordsAndMD::simWellAzimuthAngle(const cvf::Vec3d& posit
p2 = m_wellPathPoints[closestIndex + 0];
}
cvf::Vec3d direction = p1 - p2;
cvf::Vec3d direction = p2 - p1;
if (abs(direction.x()) > 1e-5)
if (abs(direction.y()) > 1e-5)
{
double atanValue = direction.y() / direction.x();
double atanValue = direction.x() / direction.y();
azimuthAngle = atan(atanValue);
azimuthAngle = cvf::Math::toDegrees(azimuthAngle);
azimuthAngle = -azimuthAngle;
}
}

View File

@@ -133,15 +133,14 @@ double RigWellPath::wellPathAzimuthAngle(const cvf::Vec3d& position) const
p2 = m_wellPathPoints[closestIndex + 0];
}
cvf::Vec3d direction = p1 - p2;
cvf::Vec3d direction = p2 - p1;
if (abs(direction.x()) > 1e-5)
if (abs(direction.y()) > 1e-5)
{
double atanValue = direction.y() / direction.x();
double atanValue = direction.x() / direction.y();
AzimuthAngle = atan(atanValue);
AzimuthAngle = cvf::Math::toDegrees(AzimuthAngle);
AzimuthAngle = -AzimuthAngle;
}
}