mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1571 Using circle instead of square to find relevant part of well path based on perforation length.
This commit is contained in:
parent
57d12a3164
commit
42563ac813
@ -9,6 +9,8 @@
|
|||||||
#include "RimStimPlanFractureTemplate.h"
|
#include "RimStimPlanFractureTemplate.h"
|
||||||
#include "RigFractureGrid.h"
|
#include "RigFractureGrid.h"
|
||||||
|
|
||||||
|
#include "cvfMath.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
|
||||||
@ -47,10 +49,14 @@ void RigWellPathStimplanIntersector::calculate(const cvf::Mat4f &fractureXf,
|
|||||||
cvf::Mat4d toFractureXf = cvf::Mat4d(fractureXf.getInverted());
|
cvf::Mat4d toFractureXf = cvf::Mat4d(fractureXf.getInverted());
|
||||||
|
|
||||||
std::vector<cvf::Vec3d> perforationLengthBoundingBoxPolygon;
|
std::vector<cvf::Vec3d> perforationLengthBoundingBoxPolygon;
|
||||||
perforationLengthBoundingBoxPolygon.push_back(cvf::Vec3d(-perforationLength / 2, -perforationLength / 2, 0));
|
double cicleRadius = perforationLength / 2;
|
||||||
perforationLengthBoundingBoxPolygon.push_back(cvf::Vec3d( perforationLength / 2, -perforationLength / 2, 0));
|
int pointsInCirclePolygon = 20;
|
||||||
perforationLengthBoundingBoxPolygon.push_back(cvf::Vec3d( perforationLength / 2, perforationLength / 2, 0));
|
for (int i = 0; i < pointsInCirclePolygon; i++)
|
||||||
perforationLengthBoundingBoxPolygon.push_back(cvf::Vec3d(-perforationLength / 2, perforationLength / 2, 0));
|
{
|
||||||
|
double x = cicleRadius * cvf::Math::cos(i * (2 * cvf::PI_D / pointsInCirclePolygon));
|
||||||
|
double y = cicleRadius * cvf::Math::sin(i * (2 * cvf::PI_D / pointsInCirclePolygon));
|
||||||
|
perforationLengthBoundingBoxPolygon.push_back(cvf::Vec3d(x, y, 0));
|
||||||
|
}
|
||||||
|
|
||||||
// Convert well path to fracture template system
|
// Convert well path to fracture template system
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user