Whitespace

This commit is contained in:
Magne Sjaastad 2018-08-20 07:58:18 +02:00
parent c8f2eec5e4
commit 878282daf4
2 changed files with 134 additions and 136 deletions

View File

@ -28,13 +28,13 @@
#include "RigWellPath.h" #include "RigWellPath.h"
#include "RigWellPathIntersectionTools.h" #include "RigWellPathIntersectionTools.h"
#include "RigWellLogExtractor.h"
#include "RimFishboneWellPath.h" #include "RimFishboneWellPath.h"
#include "RimFishboneWellPathCollection.h" #include "RimFishboneWellPathCollection.h"
#include "RimFishbonesCollection.h" #include "RimFishbonesCollection.h"
#include "RimFishbonesMultipleSubs.h" #include "RimFishbonesMultipleSubs.h"
#include "RimWellPath.h" #include "RimWellPath.h"
#include "RimWellPathCompletions.h" #include "RimWellPathCompletions.h"
#include "RigWellLogExtractor.h"
//================================================================================================== //==================================================================================================
/// ///
@ -42,10 +42,14 @@
struct WellBorePartForTransCalc struct WellBorePartForTransCalc
{ {
WellBorePartForTransCalc(cvf::Vec3d lengthsInCell, double wellRadius, double skinFactor, bool isMainBore, QString metaData) WellBorePartForTransCalc(cvf::Vec3d lengthsInCell, double wellRadius, double skinFactor, bool isMainBore, QString metaData)
: lengthsInCell(lengthsInCell), wellRadius(wellRadius), skinFactor(skinFactor), isMainBore(isMainBore), metaData(metaData) : lengthsInCell(lengthsInCell)
, wellRadius(wellRadius)
, skinFactor(skinFactor)
, isMainBore(isMainBore)
, metaData(metaData)
, intersectionWithWellMeasuredDepth(HUGE_VAL)
, lateralIndex(cvf::UNDEFINED_SIZE_T)
{ {
intersectionWithWellMeasuredDepth = HUGE_VAL;
lateralIndex = cvf::UNDEFINED_SIZE_T;
} }
cvf::Vec3d lengthsInCell; cvf::Vec3d lengthsInCell;
@ -61,7 +65,8 @@ struct WellBorePartForTransCalc
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWellBoreParts(std::map<size_t, std::vector<WellBorePartForTransCalc> >& wellBorePartsInCells, void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWellBoreParts(
std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
const RimWellPath* wellPath, const RimWellPath* wellPath,
const RicExportCompletionDataSettingsUi& settings) const RicExportCompletionDataSettingsUi& settings)
{ {
@ -69,42 +74,43 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
// Generate data // Generate data
const RigEclipseCaseData* caseData = settings.caseToApply()->eclipseCaseData(); const RigEclipseCaseData* caseData = settings.caseToApply()->eclipseCaseData();
RicMultiSegmentWellExportInfo exportInfo = RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMswExportInfo(settings.caseToApply(), wellPath); RicMultiSegmentWellExportInfo exportInfo =
RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMswExportInfo(settings.caseToApply(), wellPath);
RiaEclipseUnitTools::UnitSystem unitSystem = caseData->unitsType(); RiaEclipseUnitTools::UnitSystem unitSystem = caseData->unitsType();
bool isMainBore = false; bool isMainBore = false;
for (const RicWellSegmentLocation& location : exportInfo.wellSegmentLocations()) for (const RicWellSegmentLocation& location : exportInfo.wellSegmentLocations())
{ {
for (const RicWellSegmentCompletion& lateral : location.completions()) for (const RicWellSegmentCompletion& completion : location.completions())
{ {
for (const RicWellSubSegment& segment : lateral.subSegments()) for (const RicWellSubSegment& segment : completion.subSegments())
{ {
for (const RicWellSubSegmentCellIntersection& intersection : segment.intersections()) for (const RicWellSubSegmentCellIntersection& intersection : segment.intersections())
{ {
double diameter = location.holeDiameter(); double diameter = location.holeDiameter();
QString completionMetaData = (location.label() + QString(": Sub: %1 Lateral: %2").arg(location.subIndex()).arg(lateral.index())); QString completionMetaData =
WellBorePartForTransCalc wellBorePart = WellBorePartForTransCalc(intersection.lengthsInCell(), (location.label() + QString(": Sub: %1 Lateral: %2").arg(location.subIndex()).arg(completion.index()));
diameter / 2,
location.skinFactor(), WellBorePartForTransCalc wellBorePart = WellBorePartForTransCalc(
isMainBore, intersection.lengthsInCell(), diameter / 2, location.skinFactor(), isMainBore, completionMetaData);
completionMetaData);
wellBorePart.intersectionWithWellMeasuredDepth = location.measuredDepth(); wellBorePart.intersectionWithWellMeasuredDepth = location.measuredDepth();
wellBorePart.lateralIndex = lateral.index(); wellBorePart.lateralIndex = completion.index();
wellBorePartsInCells[intersection.globalCellIndex()].push_back(wellBorePart); wellBorePartsInCells[intersection.globalCellIndex()].push_back(wellBorePart);
} }
} }
} }
} }
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
std::vector<RigCompletionData> RicFishbonesTransmissibilityCalculationFeatureImp::generateFishboneCompdatValuesUsingAdjustedCellVolume(const RimWellPath* wellPath, std::vector<RigCompletionData>
RicFishbonesTransmissibilityCalculationFeatureImp::generateFishboneCompdatValuesUsingAdjustedCellVolume(
const RimWellPath* wellPath,
const RicExportCompletionDataSettingsUi& settings) const RicExportCompletionDataSettingsUi& settings)
{ {
std::vector<RigCompletionData> completionData; std::vector<RigCompletionData> completionData;
@ -114,7 +120,7 @@ std::vector<RigCompletionData> RicFishbonesTransmissibilityCalculationFeatureImp
return completionData; return completionData;
} }
std::map<size_t, std::vector<WellBorePartForTransCalc> > wellBorePartsInCells; //wellBore = main bore or fishbone lateral std::map<size_t, std::vector<WellBorePartForTransCalc>> wellBorePartsInCells; // wellBore = main bore or fishbone lateral
findFishboneLateralsWellBoreParts(wellBorePartsInCells, wellPath, settings); findFishboneLateralsWellBoreParts(wellBorePartsInCells, wellPath, settings);
findFishboneImportedLateralsWellBoreParts(wellBorePartsInCells, wellPath, settings); findFishboneImportedLateralsWellBoreParts(wellBorePartsInCells, wellPath, settings);
if (!wellBorePartsInCells.empty() && !settings.excludeMainBoreForFishbones) if (!wellBorePartsInCells.empty() && !settings.excludeMainBoreForFishbones)
@ -144,34 +150,36 @@ std::vector<RigCompletionData> RicFishbonesTransmissibilityCalculationFeatureImp
} }
else else
{ {
mainBoreDirection = RicWellPathExportCompletionDataFeatureImpl::calculateDirectionInCell(settings.caseToApply, mainBoreDirection = RicWellPathExportCompletionDataFeatureImpl::calculateDirectionInCell(
globalCellIndex, settings.caseToApply, globalCellIndex, wellBorePart.lengthsInCell);
wellBorePart.lengthsInCell);
} }
} }
for (WellBorePartForTransCalc wellBorePart : wellBoreParts) for (WellBorePartForTransCalc wellBorePart : wellBoreParts)
{ {
RigCompletionData completion(wellPath->completions()->wellNameForExport(), RigCompletionDataGridCell(globalCellIndex, settings.caseToApply->mainGrid()), wellBorePart.intersectionWithWellMeasuredDepth); RigCompletionData completion(wellPath->completions()->wellNameForExport(),
RigCompletionDataGridCell(globalCellIndex, settings.caseToApply->mainGrid()),
wellBorePart.intersectionWithWellMeasuredDepth);
completion.setSecondOrderingValue(wellBorePart.lateralIndex); completion.setSecondOrderingValue(wellBorePart.lateralIndex);
double transmissibility = 0.0; double transmissibility = 0.0;
if (wellBorePart.isMainBore) if (wellBorePart.isMainBore)
{ {
//No change in transmissibility for main bore // No change in transmissibility for main bore
transmissibility = RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibility(settings.caseToApply, transmissibility =
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibility(settings.caseToApply,
wellPath, wellPath,
wellBorePart.lengthsInCell, wellBorePart.lengthsInCell,
wellBorePart.skinFactor, wellBorePart.skinFactor,
wellBorePart.wellRadius, wellBorePart.wellRadius,
globalCellIndex, globalCellIndex,
settings.useLateralNTG); settings.useLateralNTG);
} }
else else
{ {
//Adjust transmissibility for fishbone laterals // Adjust transmissibility for fishbone laterals
transmissibility = RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibility(settings.caseToApply, transmissibility =
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibility(settings.caseToApply,
wellPath, wellPath,
wellBorePart.lengthsInCell, wellBorePart.lengthsInCell,
wellBorePart.skinFactor, wellBorePart.skinFactor,
@ -180,18 +188,13 @@ std::vector<RigCompletionData> RicFishbonesTransmissibilityCalculationFeatureImp
settings.useLateralNTG, settings.useLateralNTG,
numberOfLaterals, numberOfLaterals,
mainBoreDirection); mainBoreDirection);
} }
CellDirection direction = RicWellPathExportCompletionDataFeatureImpl::calculateDirectionInCell(settings.caseToApply, CellDirection direction = RicWellPathExportCompletionDataFeatureImpl::calculateDirectionInCell(
globalCellIndex, settings.caseToApply, globalCellIndex, wellBorePart.lengthsInCell);
wellBorePart.lengthsInCell);
completion.setTransAndWPImultBackgroundDataFromFishbone(transmissibility, completion.setTransAndWPImultBackgroundDataFromFishbone(
wellBorePart.skinFactor, transmissibility, wellBorePart.skinFactor, wellBorePart.wellRadius * 2, direction, wellBorePart.isMainBore);
wellBorePart.wellRadius *2,
direction,
wellBorePart.isMainBore);
completion.addMetadata(wellBorePart.metaData, QString::number(transmissibility)); completion.addMetadata(wellBorePart.metaData, QString::number(transmissibility));
@ -204,7 +207,8 @@ std::vector<RigCompletionData> RicFishbonesTransmissibilityCalculationFeatureImp
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLateralsWellBoreParts(std::map<size_t, std::vector<WellBorePartForTransCalc> >& wellBorePartsInCells, void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLateralsWellBoreParts(
std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
const RimWellPath* wellPath, const RimWellPath* wellPath,
const RicExportCompletionDataSettingsUi& settings) const RicExportCompletionDataSettingsUi& settings)
{ {
@ -220,23 +224,21 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLate
double diameter = wellPath->fishbonesCollection()->wellPathCollection()->holeDiameter(unitSystem); double diameter = wellPath->fishbonesCollection()->wellPathCollection()->holeDiameter(unitSystem);
for (const RimFishboneWellPath* fishbonesPath : wellPath->fishbonesCollection()->wellPathCollection()->wellPaths()) for (const RimFishboneWellPath* fishbonesPath : wellPath->fishbonesCollection()->wellPathCollection()->wellPaths())
{ {
std::vector<WellPathCellIntersectionInfo> intersectedCells = RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath(settings.caseToApply->eclipseCaseData(), std::vector<WellPathCellIntersectionInfo> intersectedCells =
fishbonesPath->coordinates(), RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath(
fishbonesPath->measuredDepths()); settings.caseToApply->eclipseCaseData(), fishbonesPath->coordinates(), fishbonesPath->measuredDepths());
for (auto& cell : intersectedCells)
for (const auto& cellIntersectionInfo : intersectedCells)
{ {
if (wellPathCells.count(cell.globCellIndex) ) continue; if (wellPathCells.count(cellIntersectionInfo.globCellIndex)) continue;
double skinFactor = wellPath->fishbonesCollection()->wellPathCollection()->skinFactor(); double skinFactor = wellPath->fishbonesCollection()->wellPathCollection()->skinFactor();
QString completionMetaData = fishbonesPath->name(); QString completionMetaData = fishbonesPath->name();
WellBorePartForTransCalc wellBorePart = WellBorePartForTransCalc(cell.intersectionLengthsInCellCS, WellBorePartForTransCalc wellBorePart = WellBorePartForTransCalc(
diameter / 2, cellIntersectionInfo.intersectionLengthsInCellCS, diameter / 2, skinFactor, isMainBore, completionMetaData);
skinFactor, wellBorePart.intersectionWithWellMeasuredDepth = cellIntersectionInfo.startMD;
isMainBore,
completionMetaData);
wellBorePart.intersectionWithWellMeasuredDepth = cell.startMD;
wellBorePartsInCells[cell.globCellIndex].push_back(wellBorePart); wellBorePartsInCells[cellIntersectionInfo.globCellIndex].push_back(wellBorePart);
} }
} }
} }
@ -244,7 +246,8 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLate
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicFishbonesTransmissibilityCalculationFeatureImp::findMainWellBoreParts(std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells, void RicFishbonesTransmissibilityCalculationFeatureImp::findMainWellBoreParts(
std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
const RimWellPath* wellPath, const RimWellPath* wellPath,
const RicExportCompletionDataSettingsUi& settings) const RicExportCompletionDataSettingsUi& settings)
{ {
@ -259,28 +262,24 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findMainWellBoreParts(st
double wellPathEndMD = 0.0; double wellPathEndMD = 0.0;
if (wellPathMD.size() > 1) wellPathEndMD = wellPathMD.back(); if (wellPathMD.size() > 1) wellPathEndMD = wellPathMD.back();
std::pair< std::vector<cvf::Vec3d>, std::vector<double> > fishbonePerfWellPathCoords = wellPath->wellPathGeometry()->clippedPointSubset(wellPath->fishbonesCollection()->startMD(), std::pair<std::vector<cvf::Vec3d>, std::vector<double>> fishbonePerfWellPathCoords =
wellPathEndMD); wellPath->wellPathGeometry()->clippedPointSubset(wellPath->fishbonesCollection()->startMD(), wellPathEndMD);
std::vector<WellPathCellIntersectionInfo> intersectedCellsIntersectionInfo = RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath(settings.caseToApply->eclipseCaseData(), std::vector<WellPathCellIntersectionInfo> intersectedCellsIntersectionInfo =
fishbonePerfWellPathCoords.first, RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath(
fishbonePerfWellPathCoords.second); settings.caseToApply->eclipseCaseData(), fishbonePerfWellPathCoords.first, fishbonePerfWellPathCoords.second);
if (!wellPath->fishbonesCollection()) return; if (!wellPath->fishbonesCollection()) return;
for (auto& cell : intersectedCellsIntersectionInfo) for (const auto& cellIntersectionInfo : intersectedCellsIntersectionInfo)
{ {
double skinFactor = wellPath->fishbonesCollection()->mainBoreSkinFactor(); double skinFactor = wellPath->fishbonesCollection()->mainBoreSkinFactor();
QString completionMetaData = wellPath->name() + " main bore"; QString completionMetaData = wellPath->name() + " main bore";
WellBorePartForTransCalc wellBorePart = WellBorePartForTransCalc(cell.intersectionLengthsInCellCS, WellBorePartForTransCalc wellBorePart = WellBorePartForTransCalc(
holeDiameter / 2, cellIntersectionInfo.intersectionLengthsInCellCS, holeDiameter / 2, skinFactor, isMainBore, completionMetaData);
skinFactor,
isMainBore,
completionMetaData);
wellBorePart.intersectionWithWellMeasuredDepth = cell.startMD; wellBorePart.intersectionWithWellMeasuredDepth = cellIntersectionInfo.startMD;
wellBorePartsInCells[cell.globCellIndex].push_back(wellBorePart); wellBorePartsInCells[cellIntersectionInfo.globCellIndex].push_back(wellBorePart);
} }
} }

View File

@ -21,9 +21,9 @@
#include "cvfBase.h" #include "cvfBase.h"
#include "cvfVector3.h" #include "cvfVector3.h"
#include <vector>
#include <map> #include <map>
#include <set> #include <set>
#include <vector>
class RigCompletionData; class RigCompletionData;
class RimWellPath; class RimWellPath;
@ -32,24 +32,23 @@ class RigEclipseCaseData;
struct WellBorePartForTransCalc; struct WellBorePartForTransCalc;
//================================================================================================== //==================================================================================================
/// ///
//================================================================================================== //==================================================================================================
class RicFishbonesTransmissibilityCalculationFeatureImp class RicFishbonesTransmissibilityCalculationFeatureImp
{ {
public: public:
static std::vector<RigCompletionData> generateFishboneCompdatValuesUsingAdjustedCellVolume(const RimWellPath* wellPath, static std::vector<RigCompletionData>
generateFishboneCompdatValuesUsingAdjustedCellVolume(const RimWellPath* wellPath,
const RicExportCompletionDataSettingsUi& settings); const RicExportCompletionDataSettingsUi& settings);
private: private:
static void findFishboneLateralsWellBoreParts(std::map<size_t, static void findFishboneLateralsWellBoreParts(std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
const RimWellPath* wellPath, const RimWellPath* wellPath,
const RicExportCompletionDataSettingsUi& settings); const RicExportCompletionDataSettingsUi& settings);
static void findFishboneImportedLateralsWellBoreParts(std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells, static void
findFishboneImportedLateralsWellBoreParts(std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
const RimWellPath* wellPath, const RimWellPath* wellPath,
const RicExportCompletionDataSettingsUi& settings); const RicExportCompletionDataSettingsUi& settings);