mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1544 Fracture : Add function used to compute perforation length coords
This commit is contained in:
parent
c7d61ed7f4
commit
53418179ba
@ -98,6 +98,7 @@ public:
|
|||||||
virtual double fractureMD() const = 0;
|
virtual double fractureMD() const = 0;
|
||||||
|
|
||||||
virtual void loadDataAndUpdate() = 0;
|
virtual void loadDataAndUpdate() = 0;
|
||||||
|
virtual std::vector<cvf::Vec3d> perforationLengthCenterLineCoords() const = 0;
|
||||||
|
|
||||||
friend class RimFractureTemplate;
|
friend class RimFractureTemplate;
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "RimSimWellInView.h"
|
#include "RimSimWellInView.h"
|
||||||
|
|
||||||
#include "cafPdmUiDoubleSliderEditor.h"
|
#include "cafPdmUiDoubleSliderEditor.h"
|
||||||
|
#include "RigWellPath.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -131,6 +132,29 @@ void RimSimWellFracture::loadDataAndUpdate()
|
|||||||
updateAzimuthBasedOnWellAzimuthAngle();
|
updateAzimuthBasedOnWellAzimuthAngle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<cvf::Vec3d> RimSimWellFracture::perforationLengthCenterLineCoords() const
|
||||||
|
{
|
||||||
|
std::vector<cvf::Vec3d> coords;
|
||||||
|
|
||||||
|
if (!m_branchCenterLines.empty() && m_branchIndex < m_branchCenterLines.size())
|
||||||
|
{
|
||||||
|
RigWellPath wellPathGeometry;
|
||||||
|
|
||||||
|
wellPathGeometry.m_wellPathPoints = m_branchCenterLines[m_branchIndex].wellPathPoints();
|
||||||
|
wellPathGeometry.m_measuredDepths = m_branchCenterLines[m_branchIndex].measuredDepths();
|
||||||
|
|
||||||
|
double startMd = m_location - perforationLength() / 2.0;
|
||||||
|
double endMd = m_location + perforationLength() / 2.0;
|
||||||
|
|
||||||
|
coords = wellPathGeometry.clippedPointSubset(startMd, endMd).first;
|
||||||
|
}
|
||||||
|
|
||||||
|
return coords;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -52,6 +52,8 @@ public:
|
|||||||
|
|
||||||
virtual void loadDataAndUpdate() override;
|
virtual void loadDataAndUpdate() override;
|
||||||
|
|
||||||
|
virtual std::vector<cvf::Vec3d> perforationLengthCenterLineCoords() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
||||||
|
@ -132,6 +132,28 @@ void RimWellPathFracture::loadDataAndUpdate()
|
|||||||
updateAzimuthBasedOnWellAzimuthAngle();
|
updateAzimuthBasedOnWellAzimuthAngle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<cvf::Vec3d> RimWellPathFracture::perforationLengthCenterLineCoords() const
|
||||||
|
{
|
||||||
|
std::vector<cvf::Vec3d> wellPathCoords;
|
||||||
|
|
||||||
|
RimWellPath* wellPath = nullptr;
|
||||||
|
this->firstAncestorOrThisOfType(wellPath);
|
||||||
|
if (wellPath && wellPath->wellPathGeometry())
|
||||||
|
{
|
||||||
|
double startMd = m_measuredDepth - perforationLength() / 2.0;
|
||||||
|
double endMd = m_measuredDepth + perforationLength() / 2.0;
|
||||||
|
|
||||||
|
auto coordsAndMd = wellPath->wellPathGeometry()->clippedPointSubset(startMd, endMd);
|
||||||
|
|
||||||
|
wellPathCoords = coordsAndMd.first;
|
||||||
|
}
|
||||||
|
|
||||||
|
return wellPathCoords;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -47,6 +47,8 @@ public:
|
|||||||
|
|
||||||
virtual void loadDataAndUpdate() override;
|
virtual void loadDataAndUpdate() override;
|
||||||
|
|
||||||
|
virtual std::vector<cvf::Vec3d> perforationLengthCenterLineCoords() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute) override;
|
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute) override;
|
||||||
|
Loading…
Reference in New Issue
Block a user