mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
#1858 Renaming and whitespace as preparations
This commit is contained in:
+6
-6
@@ -297,13 +297,13 @@ void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseDataT
|
||||
{
|
||||
if (wellPath->fishbonesCollection()->lengthAndDepth() == RimFishbonesCollection::INC)
|
||||
{
|
||||
depth = intersection.depth;
|
||||
length = intersection.length;
|
||||
depth = intersection.tvdChangeFromPreviousIntersection;
|
||||
length = intersection.mdFromPreviousIntersection;
|
||||
}
|
||||
else
|
||||
{
|
||||
depth += intersection.depth;
|
||||
length += intersection.length;
|
||||
depth += intersection.tvdChangeFromPreviousIntersection;
|
||||
length += intersection.mdFromPreviousIntersection;
|
||||
}
|
||||
double diameter = computeEffectiveDiameter(location.fishbonesSubs->tubingDiameter(unitSystem), location.fishbonesSubs->holeDiameter(unitSystem));
|
||||
formatter.add(intersection.segmentNumber);
|
||||
@@ -370,10 +370,10 @@ void RicExportFishbonesWellSegmentsFeature::generateCompsegsTable(RifEclipseData
|
||||
formatter.addZeroBasedCellIndex(i).addZeroBasedCellIndex(j).addZeroBasedCellIndex(k);
|
||||
formatter.add(lateral.branchNumber);
|
||||
formatter.add(aggregatedLength);
|
||||
formatter.add(aggregatedLength + intersection.length);
|
||||
formatter.add(aggregatedLength + intersection.mdFromPreviousIntersection);
|
||||
formatter.rowCompleted();
|
||||
|
||||
aggregatedLength += intersection.length;
|
||||
aggregatedLength += intersection.mdFromPreviousIntersection;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -37,7 +37,9 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWellBoreParts(std::map<size_t, std::vector<WellBorePartForTransCalc> >& wellBorePartsInCells, const RimWellPath* wellPath, const RicExportCompletionDataSettingsUi& settings)
|
||||
void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWellBoreParts(std::map<size_t, std::vector<WellBorePartForTransCalc> >& wellBorePartsInCells,
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& settings)
|
||||
{
|
||||
// Generate data
|
||||
const RigEclipseCaseData* caseData = settings.caseToApply()->eclipseCaseData();
|
||||
|
||||
+24
-18
@@ -848,7 +848,7 @@ std::vector<WellSegmentLocation> RicWellPathExportCompletionDataFeature::findWel
|
||||
}
|
||||
std::sort(wellSegmentLocations.begin(), wellSegmentLocations.end(), wellSegmentLocationOrdering);
|
||||
|
||||
assignBranchAndSegmentNumbers(caseToApply, &wellSegmentLocations);
|
||||
assignLateralIntersectionsAndBranchAndSegmentNumbers(caseToApply, &wellSegmentLocations);
|
||||
|
||||
return wellSegmentLocations;
|
||||
}
|
||||
@@ -856,14 +856,15 @@ std::vector<WellSegmentLocation> RicWellPathExportCompletionDataFeature::findWel
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeature::calculateLateralIntersections(const RimEclipseCase* caseToApply,
|
||||
void RicWellPathExportCompletionDataFeature::assignLateralIntersections(const RimEclipseCase* caseToApply,
|
||||
WellSegmentLocation* location,
|
||||
int* branchNum,
|
||||
int* segmentNum)
|
||||
{
|
||||
for (WellSegmentLateral& lateral : location->laterals)
|
||||
{
|
||||
lateral.branchNumber = ++(*branchNum);
|
||||
++(*branchNum);
|
||||
lateral.branchNumber = (*branchNum);
|
||||
|
||||
std::vector<std::pair<cvf::Vec3d, double> > lateralCoordMDPairs = location->fishbonesSubs->coordsAndMDForLateral(location->subIndex, lateral.lateralIndex);
|
||||
|
||||
@@ -884,8 +885,8 @@ void RicWellPathExportCompletionDataFeature::calculateLateralIntersections(const
|
||||
lateralMDs);
|
||||
|
||||
auto intersection = intersections.cbegin();
|
||||
double length = 0;
|
||||
double depth = 0;
|
||||
double mdFromPreviousIntersection = 0;
|
||||
double tvdChangeFromPreviousIntersection = 0;
|
||||
cvf::Vec3d startPoint = lateralCoords[0];
|
||||
int attachedSegmentNumber = location->icdSegmentNumber;
|
||||
|
||||
@@ -893,28 +894,31 @@ void RicWellPathExportCompletionDataFeature::calculateLateralIntersections(const
|
||||
{
|
||||
if (isPointBetween(startPoint, lateralCoords[i], intersection->endPoint))
|
||||
{
|
||||
length += (intersection->endPoint - startPoint).length();
|
||||
depth += intersection->endPoint.z() - startPoint.z();
|
||||
mdFromPreviousIntersection += (intersection->endPoint - startPoint).length();
|
||||
tvdChangeFromPreviousIntersection += intersection->endPoint.z() - startPoint.z();
|
||||
++(*segmentNum);
|
||||
|
||||
WellSegmentLateralIntersection lateralIntersection( ++(*segmentNum),
|
||||
WellSegmentLateralIntersection lateralIntersection((*segmentNum),
|
||||
attachedSegmentNumber,
|
||||
intersection->globCellIndex,
|
||||
length,
|
||||
depth);
|
||||
mdFromPreviousIntersection,
|
||||
tvdChangeFromPreviousIntersection,
|
||||
intersection->internalCellLengths);
|
||||
|
||||
lateralIntersection.lengthsInCell = intersection->internalCellLengths;
|
||||
lateral.intersections.push_back(lateralIntersection);
|
||||
|
||||
length = 0;
|
||||
depth = 0;
|
||||
mdFromPreviousIntersection = 0;
|
||||
tvdChangeFromPreviousIntersection = 0;
|
||||
|
||||
startPoint = intersection->endPoint;
|
||||
attachedSegmentNumber = *segmentNum;
|
||||
|
||||
attachedSegmentNumber = (*segmentNum);
|
||||
++intersection;
|
||||
}
|
||||
else
|
||||
{
|
||||
length += (lateralCoords[i] - startPoint).length();
|
||||
depth += lateralCoords[i].z() - startPoint.z();
|
||||
mdFromPreviousIntersection += (lateralCoords[i] - startPoint).length();
|
||||
tvdChangeFromPreviousIntersection += lateralCoords[i].z() - startPoint.z();
|
||||
startPoint = lateralCoords[i];
|
||||
}
|
||||
}
|
||||
@@ -924,10 +928,11 @@ void RicWellPathExportCompletionDataFeature::calculateLateralIntersections(const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeature::assignBranchAndSegmentNumbers(const RimEclipseCase* caseToApply, std::vector<WellSegmentLocation>* locations)
|
||||
void RicWellPathExportCompletionDataFeature::assignLateralIntersectionsAndBranchAndSegmentNumbers(const RimEclipseCase* caseToApply, std::vector<WellSegmentLocation>* locations)
|
||||
{
|
||||
int segmentNumber = 1;
|
||||
int branchNumber = 1;
|
||||
|
||||
// First loop over the locations so that each segment on the main stem is an incremental number
|
||||
for (WellSegmentLocation& location : *locations)
|
||||
{
|
||||
@@ -935,10 +940,11 @@ void RicWellPathExportCompletionDataFeature::assignBranchAndSegmentNumbers(const
|
||||
location.icdBranchNumber = ++branchNumber;
|
||||
location.icdSegmentNumber = ++segmentNumber;
|
||||
}
|
||||
|
||||
// Then assign branch and segment numbers to each lateral parts
|
||||
for (WellSegmentLocation& location : *locations)
|
||||
{
|
||||
calculateLateralIntersections(caseToApply, &location, &branchNumber, &segmentNumber);
|
||||
assignLateralIntersections(caseToApply, &location, &branchNumber, &segmentNumber);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+13
-7
@@ -43,12 +43,18 @@ class RimWellPath;
|
||||
///
|
||||
//==================================================================================================
|
||||
struct WellSegmentLateralIntersection {
|
||||
WellSegmentLateralIntersection(int segmentNumber, int attachedSegmentNumber, size_t cellIndex, double length, double depth)
|
||||
WellSegmentLateralIntersection(int segmentNumber,
|
||||
int attachedSegmentNumber,
|
||||
size_t cellIndex,
|
||||
double length,
|
||||
double depth,
|
||||
const cvf::Vec3d& lengthsInCell)
|
||||
: segmentNumber(segmentNumber),
|
||||
attachedSegmentNumber(attachedSegmentNumber),
|
||||
cellIndex(cellIndex),
|
||||
length(length),
|
||||
depth(depth),
|
||||
mdFromPreviousIntersection(length),
|
||||
tvdChangeFromPreviousIntersection(depth),
|
||||
lengthsInCell(lengthsInCell),
|
||||
mainBoreCell(false)
|
||||
{}
|
||||
|
||||
@@ -56,8 +62,8 @@ struct WellSegmentLateralIntersection {
|
||||
int attachedSegmentNumber;
|
||||
size_t cellIndex;
|
||||
bool mainBoreCell;
|
||||
double length;
|
||||
double depth;
|
||||
double mdFromPreviousIntersection;
|
||||
double tvdChangeFromPreviousIntersection;
|
||||
cvf::Vec3d lengthsInCell;
|
||||
};
|
||||
|
||||
@@ -172,8 +178,8 @@ private:
|
||||
|
||||
static bool wellSegmentLocationOrdering(const WellSegmentLocation& first, const WellSegmentLocation& second);
|
||||
static bool isPointBetween(const cvf::Vec3d& pointA, const cvf::Vec3d& pointB, const cvf::Vec3d& needle);
|
||||
static void calculateLateralIntersections(const RimEclipseCase* caseToApply, WellSegmentLocation* location, int* branchNum, int* segmentNum);
|
||||
static void assignBranchAndSegmentNumbers(const RimEclipseCase* caseToApply, std::vector<WellSegmentLocation>* locations);
|
||||
static void assignLateralIntersections(const RimEclipseCase* caseToApply, WellSegmentLocation* location, int* branchNum, int* segmentNum);
|
||||
static void assignLateralIntersectionsAndBranchAndSegmentNumbers(const RimEclipseCase* caseToApply, std::vector<WellSegmentLocation>* locations);
|
||||
|
||||
static void appendCompletionData(std::map<IJKCellIndex, std::vector<RigCompletionData> >* completionData, const std::vector<RigCompletionData>& data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user