mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2374 Fracture : Incomplete results when computing intersected StimPlan cells
This commit is contained in:
parent
96bff27519
commit
2457f968cf
@ -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;
|
std::vector<cvf::Vec3d> points;
|
||||||
if (m_measuredDepths.empty()) return 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]);
|
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)
|
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());
|
points.push_back(m_wellPathPoints.back());
|
||||||
|
|
||||||
return points;
|
return points;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,8 @@ public:
|
|||||||
std::pair<std::vector<cvf::Vec3d>, std::vector<double> >
|
std::pair<std::vector<cvf::Vec3d>, std::vector<double> >
|
||||||
clippedPointSubset(double startMD, double endMD) const;
|
clippedPointSubset(double startMD, double endMD) const;
|
||||||
|
|
||||||
std::vector<cvf::Vec3d> wellPathPointsIncludingFractureIntersection(double fractureIntersectionMD) const;
|
std::vector<cvf::Vec3d> wellPathPointsIncludingInterpolatedIntersectionPoint(double intersectionMeasuredDepth) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_hasDatumElevation;
|
bool m_hasDatumElevation;
|
||||||
double m_datumElevation;
|
double m_datumElevation;
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
RigWellPathStimplanIntersector::RigWellPathStimplanIntersector(const RigWellPath* wellpathGeom, RimFracture* rimFracture)
|
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();
|
cvf::Mat4d fractureXf = rimFracture->transformMatrix();
|
||||||
double wellRadius = rimFracture->wellRadius(rimFracture->fractureUnit());
|
double wellRadius = rimFracture->wellRadius(rimFracture->fractureUnit());
|
||||||
std::vector<std::vector<cvf::Vec3d> > stpCellPolygons;
|
std::vector<std::vector<cvf::Vec3d> > stpCellPolygons;
|
||||||
|
@ -18,7 +18,75 @@
|
|||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
#include "RigWellPathIntersectionTools.h"
|
#include "RigWellPath.h"
|
||||||
|
|
||||||
#include "cvfStructGrid.h"
|
#include "cvfBase.h"
|
||||||
|
#include "cvfVector3.h"
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
TEST(RigWellPathTest, FindWellPathCoordsIncludingIntersectionPoint)
|
||||||
|
{
|
||||||
|
RigWellPath wellPathGeometry;
|
||||||
|
{
|
||||||
|
std::vector<cvf::Vec3d> wellPathPoints;
|
||||||
|
std::vector<double> mdValues;
|
||||||
|
|
||||||
|
wellPathPoints.push_back(cvf::Vec3d(0.0, 0.0, 0.0));
|
||||||
|
wellPathPoints.push_back(cvf::Vec3d(0.0, 1.0, 0.0));
|
||||||
|
wellPathPoints.push_back(cvf::Vec3d(0.0, 2.0, 0.0));
|
||||||
|
wellPathPoints.push_back(cvf::Vec3d(0.0, 3.0, 0.0));
|
||||||
|
wellPathPoints.push_back(cvf::Vec3d(0.0, 4.0, 0.0));
|
||||||
|
|
||||||
|
mdValues.push_back(0.0);
|
||||||
|
mdValues.push_back(1.0);
|
||||||
|
mdValues.push_back(2.0);
|
||||||
|
mdValues.push_back(3.0);
|
||||||
|
mdValues.push_back(4.0);
|
||||||
|
|
||||||
|
|
||||||
|
wellPathGeometry.m_wellPathPoints = wellPathPoints;
|
||||||
|
wellPathGeometry.m_measuredDepths = mdValues;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Before first MD
|
||||||
|
{
|
||||||
|
auto wellPathPoints = wellPathGeometry.wellPathPointsIncludingInterpolatedIntersectionPoint(-1.0);
|
||||||
|
EXPECT_EQ(5u, wellPathPoints.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Identical to first MD
|
||||||
|
{
|
||||||
|
auto wellPathPoints = wellPathGeometry.wellPathPointsIncludingInterpolatedIntersectionPoint(0.0);
|
||||||
|
EXPECT_EQ(5u, wellPathPoints.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Identical to second MD
|
||||||
|
{
|
||||||
|
auto wellPathPoints = wellPathGeometry.wellPathPointsIncludingInterpolatedIntersectionPoint(1.0);
|
||||||
|
EXPECT_EQ(5u, wellPathPoints.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Between first and second MD
|
||||||
|
{
|
||||||
|
auto wellPathPoints = wellPathGeometry.wellPathPointsIncludingInterpolatedIntersectionPoint(0.3);
|
||||||
|
EXPECT_EQ(6u, wellPathPoints.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Identical to lastMD
|
||||||
|
{
|
||||||
|
auto wellPathPoints = wellPathGeometry.wellPathPointsIncludingInterpolatedIntersectionPoint(4.0);
|
||||||
|
EXPECT_EQ(5u, wellPathPoints.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Larger than lastMD
|
||||||
|
{
|
||||||
|
auto wellPathPoints = wellPathGeometry.wellPathPointsIncludingInterpolatedIntersectionPoint(10.0);
|
||||||
|
EXPECT_EQ(5u, wellPathPoints.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user