mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1658 Setting azimuth angle from fracture template if orientation type is Azimuth. Changing updateAzimuthFromFractureTemplate to updateAzimuthBasedOnWellAzimuthAngle and only using this function to update azimuth angles if orientation type is not azimuth.
This commit is contained in:
parent
e7043db156
commit
c7d708e9d4
@ -581,7 +581,14 @@ void RimFracture::setFractureTemplate(RimFractureTemplate* fractureTemplate)
|
||||
stimPlanTimeIndexToPlot = stimPlanFracTemplate->activeTimeStepIndex();
|
||||
}
|
||||
|
||||
this->updateAzimuthFromFractureTemplate();
|
||||
if (fractureTemplate->orientationType == RimFractureTemplate::AZIMUTH)
|
||||
{
|
||||
azimuth = fractureTemplate->azimuthAngle;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->updateAzimuthBasedOnWellAzimuthAngle();
|
||||
}
|
||||
this->wellDiameter = fractureTemplate->wellDiameterInFractureUnit(m_fractureUnit());
|
||||
this->perforationLength = fractureTemplate->perforationLengthInFractureUnit(m_fractureUnit());
|
||||
}
|
||||
|
@ -93,10 +93,9 @@ public:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
cvf::Vec3d fracturePosition() const;
|
||||
|
||||
virtual void updateAzimuthFromFractureTemplate() = 0;
|
||||
virtual void updateAzimuthBasedOnWellAzimuthAngle() = 0;
|
||||
virtual double wellAzimuthAtFracturePosition() const = 0;
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
@ -122,13 +122,17 @@ void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
{
|
||||
if (changedField == &azimuthAngle && (abs(oldValue.toDouble() - fracture->azimuth()) < 1e-5))
|
||||
{
|
||||
fracture->updateAzimuthFromFractureTemplate();
|
||||
fracture->azimuth = azimuthAngle;
|
||||
fracture->clearDisplayGeometryCache();
|
||||
}
|
||||
|
||||
if (changedField == &orientationType)
|
||||
{
|
||||
fracture->updateAzimuthFromFractureTemplate();
|
||||
if (newValue == AZIMUTH)
|
||||
{
|
||||
fracture->azimuth = azimuthAngle;
|
||||
}
|
||||
else fracture->updateAzimuthBasedOnWellAzimuthAngle();
|
||||
|
||||
fracture->clearDisplayGeometryCache();
|
||||
}
|
||||
|
@ -77,33 +77,27 @@ void RimSimWellFracture::setClosestWellCoord(cvf::Vec3d& position, size_t branch
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSimWellFracture::updateAzimuthFromFractureTemplate()
|
||||
void RimSimWellFracture::updateAzimuthBasedOnWellAzimuthAngle()
|
||||
{
|
||||
updateBranchGeometry();
|
||||
|
||||
RimFractureTemplate::FracOrientationEnum orientation;
|
||||
if (fractureTemplate()) orientation = fractureTemplate()->orientationType();
|
||||
else orientation = RimFractureTemplate::AZIMUTH;
|
||||
|
||||
if (orientation == RimFractureTemplate::ALONG_WELL_PATH || orientation== RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
|
||||
if (!fractureTemplate()) return;
|
||||
if (fractureTemplate()->orientationType == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| fractureTemplate()->orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
double simWellAzimuth = wellAzimuthAtFracturePosition();
|
||||
|
||||
if (orientation == RimFractureTemplate::ALONG_WELL_PATH )
|
||||
if (fractureTemplate()->orientationType == RimFractureTemplate::ALONG_WELL_PATH )
|
||||
{
|
||||
azimuth = simWellAzimuth;
|
||||
}
|
||||
else if (orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
else if (fractureTemplate()->orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
if (simWellAzimuth + 90 < 360) azimuth = simWellAzimuth + 90;
|
||||
else azimuth = simWellAzimuth - 90;
|
||||
}
|
||||
}
|
||||
else //Azimuth value read from template
|
||||
{
|
||||
if (fractureTemplate()) azimuth = fractureTemplate()->azimuthAngle;
|
||||
else azimuth = 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -145,7 +139,7 @@ void RimSimWellFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedFiel
|
||||
|
||||
if (orientation != RimFractureTemplate::AZIMUTH)
|
||||
{
|
||||
updateAzimuthFromFractureTemplate();
|
||||
updateAzimuthBasedOnWellAzimuthAngle();
|
||||
}
|
||||
|
||||
RimProject* proj;
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
|
||||
void recomputeWellCenterlineCoordinates();
|
||||
void updateFracturePositionFromLocation();
|
||||
void updateAzimuthFromFractureTemplate() override;
|
||||
void updateAzimuthBasedOnWellAzimuthAngle() override;
|
||||
|
||||
double wellAzimuthAtFracturePosition() const override;
|
||||
double wellDipAtFracturePosition();
|
||||
|
@ -76,7 +76,7 @@ void RimWellPathFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
if (changedField == &m_measuredDepth)
|
||||
{
|
||||
updatePositionFromMeasuredDepth();
|
||||
updateAzimuthFromFractureTemplate();
|
||||
updateAzimuthBasedOnWellAzimuthAngle();
|
||||
|
||||
RimProject* proj = nullptr;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
@ -87,32 +87,26 @@ void RimWellPathFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathFracture::updateAzimuthFromFractureTemplate()
|
||||
void RimWellPathFracture::updateAzimuthBasedOnWellAzimuthAngle()
|
||||
{
|
||||
RimFractureTemplate::FracOrientationEnum orientation;
|
||||
if (fractureTemplate()) orientation = fractureTemplate()->orientationType();
|
||||
else orientation = RimFractureTemplate::AZIMUTH;
|
||||
if (!fractureTemplate()) return;
|
||||
|
||||
if (orientation == RimFractureTemplate::ALONG_WELL_PATH || orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
if (fractureTemplate()->orientationType == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| fractureTemplate()->orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
|
||||
double wellPathAzimuth = wellAzimuthAtFracturePosition();
|
||||
|
||||
if (orientation == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
if (fractureTemplate()->orientationType == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
{
|
||||
azimuth = wellPathAzimuth;
|
||||
}
|
||||
else if (orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
if (fractureTemplate()->orientationType == RimFractureTemplate::TRANSVERSE_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 = attachedFractureTemplate()->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 updateAzimuthFromFractureTemplate() override;
|
||||
virtual void updateAzimuthBasedOnWellAzimuthAngle() override;
|
||||
|
||||
double wellAzimuthAtFracturePosition() const override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user