#6072 Well Completions : Make sure valves are included if they are located outside grid cells

This commit is contained in:
Magne Sjaastad
2020-06-15 15:36:27 +02:00
parent 49d74a4bbb
commit 9d0ec6727c
3 changed files with 99 additions and 6 deletions

View File

@@ -1110,9 +1110,13 @@ std::vector<SubSegmentIntersectionInfo>
const std::vector<double>& mds = wellPathGeometry->measureDepths();
CVF_ASSERT( !coords.empty() && !mds.empty() );
std::vector<WellPathCellIntersectionInfo> intersections =
std::vector<WellPathCellIntersectionInfo> intersectionsA =
RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath( eclipseCase->eclipseCaseData(), coords, mds );
const RigMainGrid* mainGrid = eclipseCase->mainGrid();
std::vector<WellPathCellIntersectionInfo> intersections =
RigWellPathIntersectionTools::buildContinuousIntersections( intersectionsA, mainGrid );
if ( wellPath->perforationIntervalCollection()->mswParameters()->referenceMDType() ==
RimMswCompletionParameters::MANUAL_REFERENCE_MD )
{
@@ -1221,11 +1225,19 @@ std::vector<WellPathCellIntersectionInfo>
const RigMainGrid* grid = eclipseCase->mainGrid();
extraIntersection.intersectionLengthsInCellCS =
RigWellPathIntersectionTools::calculateLengthInCell( grid,
intersection.globCellIndex,
intersectionPoint,
intersection.endPoint );
if ( intersection.globCellIndex < grid->cellCount() )
{
extraIntersection.intersectionLengthsInCellCS =
RigWellPathIntersectionTools::calculateLengthInCell( grid,
intersection.globCellIndex,
intersectionPoint,
intersection.endPoint );
}
else
{
extraIntersection.intersectionLengthsInCellCS = cvf::Vec3d::ZERO;
}
filteredIntersections.push_back( extraIntersection );
}
}