#2374 Fracture : Incomplete results when computing intersected StimPlan cells

This commit is contained in:
Magne Sjaastad
2018-01-16 07:54:03 +01:00
parent 7131006188
commit c8e002d532
4 changed files with 89 additions and 14 deletions

View File

@@ -215,35 +215,41 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<double> > RigWellPath::clippedPoi
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<cvf::Vec3d> RigWellPath::wellPathPointsIncludingFractureIntersection(double fractureIntersectionMD) const
std::vector<cvf::Vec3d> RigWellPath::wellPathPointsIncludingInterpolatedIntersectionPoint(double intersectionMeasuredDepth) const
{
std::vector<cvf::Vec3d> points;
if (m_measuredDepths.empty()) return points;
cvf::Vec3d fractureWellPathPpoint = interpolatedPointAlongWellPath(fractureIntersectionMD);
cvf::Vec3d interpolatedWellPathPoint = interpolatedPointAlongWellPath(intersectionMeasuredDepth);
for (size_t i = 0; i < m_measuredDepths.size()-1; i++)
for (size_t i = 0; i < m_measuredDepths.size() - 1; i++)
{
if (m_measuredDepths[i] < fractureIntersectionMD)
if (m_measuredDepths[i] == intersectionMeasuredDepth)
{
points.push_back(m_wellPathPoints[i]);
if (m_measuredDepths[i + 1] > fractureIntersectionMD)
}
else if (m_measuredDepths[i] < intersectionMeasuredDepth)
{
points.push_back(m_wellPathPoints[i]);
if (m_measuredDepths[i + 1] > intersectionMeasuredDepth)
{
points.push_back(fractureWellPathPpoint);
points.push_back(interpolatedWellPathPoint);
}
}
else if (m_measuredDepths[i] < fractureIntersectionMD)
else if (m_measuredDepths[i] > intersectionMeasuredDepth)
{
if (i == 0)
{
points.push_back(fractureWellPathPpoint);
points.push_back(interpolatedWellPathPoint);
}
else
{
points.push_back(m_wellPathPoints[i]);
}
points.push_back(m_wellPathPoints[i]);
}
}
points.push_back(m_wellPathPoints.back());
return points;
}

View File

@@ -47,7 +47,8 @@ public:
std::pair<std::vector<cvf::Vec3d>, std::vector<double> >
clippedPointSubset(double startMD, double endMD) const;
std::vector<cvf::Vec3d> wellPathPointsIncludingFractureIntersection(double fractureIntersectionMD) const;
std::vector<cvf::Vec3d> wellPathPointsIncludingInterpolatedIntersectionPoint(double intersectionMeasuredDepth) const;
private:
bool m_hasDatumElevation;
double m_datumElevation;

View File

@@ -37,7 +37,7 @@
RigWellPathStimplanIntersector::RigWellPathStimplanIntersector(const RigWellPath* wellpathGeom, RimFracture* rimFracture)
{
std::vector<cvf::Vec3d> wellPathPoints = wellpathGeom->wellPathPointsIncludingFractureIntersection(rimFracture->fractureMD());
std::vector<cvf::Vec3d> wellPathPoints = wellpathGeom->wellPathPointsIncludingInterpolatedIntersectionPoint(rimFracture->fractureMD());
cvf::Mat4d fractureXf = rimFracture->transformMatrix();
double wellRadius = rimFracture->wellRadius(rimFracture->fractureUnit());
std::vector<std::vector<cvf::Vec3d> > stpCellPolygons;