Whitespace

This commit is contained in:
Magne Sjaastad 2018-10-11 10:25:54 +02:00
parent 256e5de30c
commit bebd21aa47

View File

@ -77,8 +77,20 @@
class SubSegmentIntersectionInfo
{
public:
SubSegmentIntersectionInfo(size_t globCellIndex, double startTVD, double endTVD, double startMD, double endMD, cvf::Vec3d lengthsInCell)
: globCellIndex(globCellIndex), startTVD(startTVD), endTVD(endTVD), startMD(startMD), endMD(endMD), intersectionLengthsInCellCS(lengthsInCell) {}
SubSegmentIntersectionInfo(size_t globCellIndex,
double startTVD,
double endTVD,
double startMD,
double endMD,
cvf::Vec3d lengthsInCell)
: globCellIndex(globCellIndex)
, startTVD(startTVD)
, endTVD(endTVD)
, startMD(startMD)
, endMD(endMD)
, intersectionLengthsInCellCS(lengthsInCell)
{
}
size_t globCellIndex;
double startTVD;
@ -200,8 +212,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
if (exportSettings.includePerforations)
{
std::vector<RigCompletionData> perforationCompletionData =
generatePerforationsCompdatValues(wellPath, wellPath->perforationIntervalCollection()->perforations(), exportSettings);
std::vector<RigCompletionData> perforationCompletionData = generatePerforationsCompdatValues(
wellPath, wellPath->perforationIntervalCollection()->perforations(), exportSettings);
appendCompletionData(&completionsPerEclipseCellAllCompletionTypes, perforationCompletionData);
appendCompletionData(&completionsPerEclipseCellPerforations, perforationCompletionData);
@ -230,8 +242,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
exportSettings.caseToApply(),
reportItems,
fractureTransmissibilityExportInformationStream.get(),
RicExportFractureCompletionsImpl::PressureDepletionParameters(
exportSettings.transScalingType(),
RicExportFractureCompletionsImpl::PressureDepletionParameters(exportSettings.transScalingType(),
exportSettings.transScalingCorrection(),
exportSettings.transScalingTimeStep(),
exportSettings.transScalingSummaryWBHP(),
@ -278,8 +289,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
exportSettings.caseToApply(),
simWell,
fractureTransmissibilityExportInformationStream.get(),
RicExportFractureCompletionsImpl::PressureDepletionParameters(
exportSettings.transScalingType(),
RicExportFractureCompletionsImpl::PressureDepletionParameters(exportSettings.transScalingType(),
exportSettings.transScalingCorrection(),
exportSettings.transScalingTimeStep(),
exportSettings.transScalingSummaryWBHP(),
@ -556,7 +566,8 @@ std::vector<RigCompletionData>
exportSettings.includePerforations = true;
exportSettings.includeFractures = true;
completionsPerEclipseCell = generatePerforationsCompdatValues(wellPath, wellPath->perforationIntervalCollection()->perforations(), exportSettings);
completionsPerEclipseCell = generatePerforationsCompdatValues(
wellPath, wellPath->perforationIntervalCollection()->perforations(), exportSettings);
}
return completionsPerEclipseCell;
@ -790,7 +801,7 @@ void RicWellPathExportCompletionDataFeatureImpl::generateCompsegTables(RifEclips
}
{
std::set<RigCompletionData::CompletionType> completionTypes = { RigCompletionData::PERFORATION };
std::set<RigCompletionData::CompletionType> completionTypes = {RigCompletionData::PERFORATION};
generateCompsegTable(formatter, exportInfo, false, completionTypes);
if (exportInfo.hasSubGridIntersections())
{
@ -1661,9 +1672,7 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
cell.globCellIndex,
wellPath->perforationIntervalCollection()->nonDarcyParameters());
double kh = calculateKh(settings.caseToApply,
cell.intersectionLengthsInCellCS,
cell.globCellIndex);
double kh = calculateKh(settings.caseToApply, cell.intersectionLengthsInCellCS, cell.globCellIndex);
completion.setTransAndWPImultBackgroundDataFromPerforation(
transmissibility, interval->skinFactor(), interval->diameter(unitSystem), dFactor, kh, direction);
@ -1709,8 +1718,7 @@ RicMswExportInfo RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMs
exportInfo.setLinerDiameter(wellPath->fishbonesCollection()->mswParameters()->linerDiameter(unitSystem));
exportInfo.setRoughnessFactor(wellPath->fishbonesCollection()->mswParameters()->roughnessFactor(unitSystem));
double maxSegmentLength = enableSegmentSplitting
? wellPath->fishbonesCollection()->mswParameters()->maxSegmentLength()
double maxSegmentLength = enableSegmentSplitting ? wellPath->fishbonesCollection()->mswParameters()->maxSegmentLength()
: std::numeric_limits<double>::infinity();
bool foundSubGridIntersections = false;
double subStartMD = wellPath->fishbonesCollection()->startMD();
@ -1752,7 +1760,8 @@ RicMswExportInfo RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMs
QString label = QString("Lateral %1").arg(lateralIndex);
location.addCompletion(RicMswCompletion(RigCompletionData::FISHBONES, label, lateralIndex));
}
assignFishbonesLateralIntersections(caseToApply, subs, &location, &foundSubGridIntersections, maxSegmentLength);
assignFishbonesLateralIntersections(
caseToApply, subs, &location, &foundSubGridIntersections, maxSegmentLength);
}
exportInfo.addWellSegmentLocation(location);
@ -1804,7 +1813,8 @@ RicMswExportInfo
RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath(caseToApply->eclipseCaseData(), coords, mds);
double maxSegmentLength = wellPath->fractureCollection()->mswParameters()->maxSegmentLength();
std::vector<SubSegmentIntersectionInfo> subSegIntersections = spiltIntersectionSegmentsToMaxLength(wellPathGeometry, intersections, maxSegmentLength);
std::vector<SubSegmentIntersectionInfo> subSegIntersections =
spiltIntersectionSegmentsToMaxLength(wellPathGeometry, intersections, maxSegmentLength);
double initialMD = 0.0;
if (wellPath->fractureCollection()->referenceMDType() == RimWellPathFractureCollection::MANUAL_REFERENCE_MD)
@ -1871,7 +1881,7 @@ RicMswExportInfo
RicExportFractureCompletionsImpl::generateCompdatValues(caseToApply,
wellPath->completions()->wellNameForExport(),
wellPath->wellPathGeometry(),
{ fracture },
{fracture},
nullptr,
nullptr);
@ -1910,7 +1920,8 @@ RicMswExportInfo RicWellPathExportCompletionDataFeatureImpl::generatePerforation
RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath(caseToApply->eclipseCaseData(), coords, mds);
double maxSegmentLength = wellPath->perforationIntervalCollection()->mswParameters()->maxSegmentLength();
std::vector<SubSegmentIntersectionInfo> subSegIntersections = spiltIntersectionSegmentsToMaxLength(wellPathGeometry, intersections, maxSegmentLength);
std::vector<SubSegmentIntersectionInfo> subSegIntersections =
spiltIntersectionSegmentsToMaxLength(wellPathGeometry, intersections, maxSegmentLength);
double initialMD = 0.0;
for (WellPathCellIntersectionInfo intersection : intersections)
@ -1960,10 +1971,12 @@ RicMswExportInfo RicWellPathExportCompletionDataFeatureImpl::generatePerforation
double intervalStartMD = interval->startMD();
double intervalEndMD = interval->endMD();
if(cellIntInfo.endMD > intervalStartMD && cellIntInfo.startMD < intervalEndMD)
if (cellIntInfo.endMD > intervalStartMD && cellIntInfo.startMD < intervalEndMD)
{
std::vector<RigCompletionData> completionData = generatePerforationsCompdatValues(wellPath, {interval}, exportSettings);
assignPerforationIntervalIntersections(caseToApply, interval, completionData, &location, &cellIntInfo, &foundSubGridIntersections);
std::vector<RigCompletionData> completionData =
generatePerforationsCompdatValues(wellPath, {interval}, exportSettings);
assignPerforationIntervalIntersections(
caseToApply, interval, completionData, &location, &cellIntInfo, &foundSubGridIntersections);
}
}
@ -2024,7 +2037,8 @@ void RicWellPathExportCompletionDataFeatureImpl::assignFishbonesLateralIntersect
RigWellPath pathGeometry;
pathGeometry.m_wellPathPoints = lateralCoords;
pathGeometry.m_measuredDepths = lateralMDs;
std::vector<SubSegmentIntersectionInfo> subSegIntersections = spiltIntersectionSegmentsToMaxLength(&pathGeometry, intersections, maxSegmentLength);
std::vector<SubSegmentIntersectionInfo> subSegIntersections =
spiltIntersectionSegmentsToMaxLength(&pathGeometry, intersections, maxSegmentLength);
double previousExitMD = lateralMDs.front();
double previousExitTVD = -lateralCoords.front().z();
@ -2094,7 +2108,8 @@ void RicWellPathExportCompletionDataFeatureImpl::assignFractureIntersections(con
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicWellPathExportCompletionDataFeatureImpl::assignPerforationIntervalIntersections(const RimEclipseCase* caseToApply,
void RicWellPathExportCompletionDataFeatureImpl::assignPerforationIntervalIntersections(
const RimEclipseCase* caseToApply,
const RimPerforationInterval* interval,
const std::vector<RigCompletionData>& completionData,
RicMswSegment* location,
@ -2118,7 +2133,8 @@ void RicWellPathExportCompletionDataFeatureImpl::assignPerforationIntervalInters
cvf::Vec3st localIJK(cell.localCellIndexI(), cell.localCellIndexJ(), cell.localCellIndexK());
RicMswSubSegmentCellIntersection intersection(cell.lgrName(), cell.globalCellIndex(), localIJK, cellIntInfo->intersectionLengthsInCellCS);
RicMswSubSegmentCellIntersection intersection(
cell.lgrName(), cell.globalCellIndex(), localIJK, cellIntInfo->intersectionLengthsInCellCS);
subSegment.addIntersection(intersection);
}
intervalCompletion.addSubSegment(subSegment);
@ -2294,8 +2310,9 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibility(Rim
cvf::ref<RigResultAccessor> permzAccessObject =
RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMZ");
if (dxAccessObject.isNull() || dyAccessObject.isNull() || dzAccessObject.isNull() ||
permxAccessObject.isNull() || permyAccessObject.isNull() || permzAccessObject.isNull()) return std::numeric_limits<double>::infinity();
if (dxAccessObject.isNull() || dyAccessObject.isNull() || dzAccessObject.isNull() || permxAccessObject.isNull() ||
permyAccessObject.isNull() || permzAccessObject.isNull())
return std::numeric_limits<double>::infinity();
double ntg = 1.0;
{
@ -2362,12 +2379,13 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateDFactor(RimEclipseCa
cvf::ref<RigResultAccessor> permzAccessObject =
RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMZ");
if (permxAccessObject.isNull() || permyAccessObject.isNull() || permzAccessObject.isNull()) return std::numeric_limits<double>::infinity();
if (permxAccessObject.isNull() || permyAccessObject.isNull() || permzAccessObject.isNull())
return std::numeric_limits<double>::infinity();
double permx = permxAccessObject->cellScalarGlobIdx(globalCellIndex);
double permy = permyAccessObject->cellScalarGlobIdx(globalCellIndex);
double permz = permzAccessObject->cellScalarGlobIdx(globalCellIndex);
double totalPerm = permx + 0*permy + 0*permz; // TODO: Calculate total perm
double totalPerm = permx + 0 * permy + 0 * permz; // TODO: Calculate total perm
eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PORO");
cvf::ref<RigResultAccessor> poroAccessObject =
@ -2416,7 +2434,8 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateKh(RimEclipseCase* e
cvf::ref<RigResultAccessor> permzAccessObject =
RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMZ");
if (permxAccessObject.isNull() || permyAccessObject.isNull() || permzAccessObject.isNull()) return std::numeric_limits<double>::infinity();
if (permxAccessObject.isNull() || permyAccessObject.isNull() || permzAccessObject.isNull())
return std::numeric_limits<double>::infinity();
double permx = permxAccessObject->cellScalarGlobIdx(globalCellIndex);
double permy = permyAccessObject->cellScalarGlobIdx(globalCellIndex);
@ -2617,7 +2636,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWellSegments(
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RicWellPathExportCompletionDataFeatureImpl::createPressureDepletionFileNameSuffix(const RicExportCompletionDataSettingsUi& exportSettings)
QString RicWellPathExportCompletionDataFeatureImpl::createPressureDepletionFileNameSuffix(
const RicExportCompletionDataSettingsUi& exportSettings)
{
QString suffix;
if (exportSettings.transScalingType() != RicExportFractureCompletionsImpl::NO_CORRECTION)
@ -2685,7 +2705,8 @@ const RimWellPath* findWellPathFromExportName(const QString& wellNameForExport)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<SubSegmentIntersectionInfo> spiltIntersectionSegmentsToMaxLength(const RigWellPath* pathGeometry,
std::vector<SubSegmentIntersectionInfo>
spiltIntersectionSegmentsToMaxLength(const RigWellPath* pathGeometry,
const std::vector<WellPathCellIntersectionInfo>& intersections,
double maxSegmentLength)
{
@ -2717,7 +2738,7 @@ std::vector<SubSegmentIntersectionInfo> spiltIntersectionSegmentsToMaxLength(con
double currEndMd = currStartMd;
double lastTvd = -intersection.startPoint.z();
for(int segIndex = 0; segIndex < segCount; segIndex++)
for (int segIndex = 0; segIndex < segCount; segIndex++)
{
bool lasti = segIndex == (segCount - 1);
currEndMd = currStartMd + effectiveMaxSegLen;