Merge branch 'dev' into pre-proto
@ -86,11 +86,11 @@ void RicExportFishbonesLateralsFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
if (!fishbone->isChecked()) continue;
|
||||
|
||||
for (size_t subIndex = 0; subIndex < fishbone->locationOfSubs().size(); subIndex++)
|
||||
for (auto& sub : fishbone->installedLateralIndices())
|
||||
{
|
||||
for (size_t lateralIndex = 0; lateralIndex < fishbone->lateralLengths().size(); lateralIndex++)
|
||||
for (size_t lateralIndex : sub.lateralIndices)
|
||||
{
|
||||
std::vector<std::pair<cvf::Vec3d, double>> coordsAndMD = fishbone->coordsAndMDForLateral(subIndex, lateralIndex);
|
||||
std::vector<std::pair<cvf::Vec3d, double>> coordsAndMD = fishbone->coordsAndMDForLateral(sub.subIndex, lateralIndex);
|
||||
|
||||
// Pad with "0" to get a total of two characters defining the sub index text
|
||||
QString subIndexText = QString("%1").arg(fishboneSubIndex++, 2, 10, QChar('0'));
|
||||
@ -106,12 +106,13 @@ void RicExportFishbonesLateralsFeature::onActionTriggered(bool isChecked)
|
||||
int numberOfDecimals = 2;
|
||||
|
||||
// Export X and Y unchanged, invert sign of Z to get TVD, export MD unchanged
|
||||
stream << formatNumber( coordMD.first.x(), numberOfDecimals);
|
||||
stream << " " << formatNumber( coordMD.first.y(), numberOfDecimals);
|
||||
stream << formatNumber(coordMD.first.x(), numberOfDecimals);
|
||||
stream << " " << formatNumber(coordMD.first.y(), numberOfDecimals);
|
||||
stream << " " << formatNumber(-coordMD.first.z(), numberOfDecimals);
|
||||
stream << " " << formatNumber( coordMD.second, numberOfDecimals) << endl;
|
||||
stream << " " << formatNumber(coordMD.second, numberOfDecimals) << endl;
|
||||
}
|
||||
stream << -999 << endl << endl;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,8 @@
|
||||
#include "cafSelectionManager.h"
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
|
||||
#include "cvfMath.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QMessageBox>
|
||||
#include <QDir>
|
||||
@ -170,12 +172,16 @@ void RicExportFishbonesWellSegmentsFeature::exportWellSegments(const RimWellPath
|
||||
RifEclipseDataTableFormatter formatter(stream);
|
||||
generateWelsegsTable(formatter, wellPath, settings, locations);
|
||||
generateCompsegsTable(formatter, wellPath, settings, locations);
|
||||
generateWsegvalvTable(formatter, wellPath, settings, locations);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseDataTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations)
|
||||
void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseDataTableFormatter& formatter,
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportWellSegmentsSettingsUi& settings,
|
||||
const std::vector<WellSegmentLocation>& locations)
|
||||
{
|
||||
formatter.keyword("WELSEGS");
|
||||
|
||||
@ -230,12 +236,12 @@ void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseDataT
|
||||
if (settings.lengthAndDepth() == RicExportWellSegmentsSettingsUi::INC)
|
||||
{
|
||||
depth = location.trueVerticalDepth - previousLocation.trueVerticalDepth;
|
||||
length = location.fishbonesSubs->locationOfSubs()[location.subIndex] - previousLocation.fishbonesSubs->locationOfSubs()[previousLocation.subIndex];
|
||||
length = location.fishbonesSubs->measuredDepth(location.subIndex) - previousLocation.fishbonesSubs->measuredDepth(previousLocation.subIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
depth += location.trueVerticalDepth - previousLocation.trueVerticalDepth;
|
||||
length += location.fishbonesSubs->locationOfSubs()[location.subIndex] - previousLocation.fishbonesSubs->locationOfSubs()[previousLocation.subIndex];
|
||||
length += location.fishbonesSubs->measuredDepth(location.subIndex) - previousLocation.fishbonesSubs->measuredDepth(previousLocation.subIndex);
|
||||
}
|
||||
|
||||
formatter.comment(QString("Segment for sub %1").arg(location.subIndex));
|
||||
@ -258,6 +264,16 @@ void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseDataT
|
||||
formatter.comment("Rough: MSW - Open Hole Roughness Factor");
|
||||
for (const WellSegmentLocation& location : locations)
|
||||
{
|
||||
formatter.comment("ICD");
|
||||
formatter.add(location.icdSegmentNumber).add(location.icdSegmentNumber);
|
||||
formatter.add(location.icdBranchNumber);
|
||||
formatter.add(location.segmentNumber);
|
||||
formatter.add(0.1); // ICDs have 0.1 length
|
||||
formatter.add(0); // Depth change
|
||||
formatter.add(-1.0); // Diam?
|
||||
formatter.add(-1.0); // Rough?
|
||||
formatter.rowCompleted();
|
||||
|
||||
for (const WellSegmentLateral& lateral : location.laterals)
|
||||
{
|
||||
formatter.comment(QString("%1 : Sub index %2 - Lateral %3").arg(location.fishbonesSubs->name()).arg(location.subIndex).arg(lateral.lateralIndex));
|
||||
@ -297,7 +313,10 @@ void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseDataT
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFishbonesWellSegmentsFeature::generateCompsegsTable(RifEclipseDataTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations)
|
||||
void RicExportFishbonesWellSegmentsFeature::generateCompsegsTable(RifEclipseDataTableFormatter& formatter,
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportWellSegmentsSettingsUi& settings,
|
||||
const std::vector<WellSegmentLocation>& locations)
|
||||
{
|
||||
RigMainGrid* grid = settings.caseToApply->eclipseCaseData()->mainGrid();
|
||||
formatter.keyword("COMPSEGS");
|
||||
@ -329,38 +348,54 @@ void RicExportFishbonesWellSegmentsFeature::generateCompsegsTable(RifEclipseData
|
||||
{
|
||||
for (const WellSegmentLateral& lateral : location.laterals)
|
||||
{
|
||||
double length = 0;
|
||||
double aggregatedLength = 0;
|
||||
for (const WellSegmentLateralIntersection& intersection : lateral.intersections)
|
||||
{
|
||||
length += intersection.length;
|
||||
|
||||
size_t i, j, k;
|
||||
grid->ijkFromCellIndex(intersection.cellIndex, &i, &j, &k);
|
||||
|
||||
formatter.addZeroBasedCellIndex(i).addZeroBasedCellIndex(j).addZeroBasedCellIndex(k);
|
||||
formatter.add(lateral.branchNumber);
|
||||
formatter.add(length);
|
||||
formatter.add("1*");
|
||||
switch (intersection.direction)
|
||||
{
|
||||
case POS_I:
|
||||
case NEG_I:
|
||||
formatter.add("I");
|
||||
break;
|
||||
case POS_J:
|
||||
case NEG_J:
|
||||
formatter.add("J");
|
||||
break;
|
||||
case POS_K:
|
||||
case NEG_K:
|
||||
formatter.add("K");
|
||||
break;
|
||||
}
|
||||
formatter.add(-1);
|
||||
formatter.add(aggregatedLength);
|
||||
formatter.add(aggregatedLength + intersection.length);
|
||||
formatter.rowCompleted();
|
||||
|
||||
aggregatedLength += intersection.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
formatter.tableCompleted();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFishbonesWellSegmentsFeature::generateWsegvalvTable(RifEclipseDataTableFormatter& formatter,
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportWellSegmentsSettingsUi& settings,
|
||||
const std::vector<WellSegmentLocation>& locations)
|
||||
{
|
||||
{
|
||||
formatter.keyword("WSEGVALV");
|
||||
std::vector<RifEclipseOutputTableColumn> header = {
|
||||
RifEclipseOutputTableColumn("Well Name"),
|
||||
RifEclipseOutputTableColumn("Seg No"),
|
||||
RifEclipseOutputTableColumn("Cv"),
|
||||
RifEclipseOutputTableColumn("Ac"),
|
||||
};
|
||||
formatter.header(header);
|
||||
}
|
||||
for (const WellSegmentLocation& location : locations)
|
||||
{
|
||||
formatter.add(wellPath->name());
|
||||
formatter.add(location.icdSegmentNumber);
|
||||
formatter.add(location.fishbonesSubs->icdFlowCoefficient());
|
||||
|
||||
double icdOrificeRadius = location.fishbonesSubs->icdOrificeDiameter() / 2;
|
||||
double icdArea = icdOrificeRadius * icdOrificeRadius * cvf::PI_D;
|
||||
formatter.add(icdArea * static_cast<double>(location.fishbonesSubs->icdCount()));
|
||||
formatter.rowCompleted();
|
||||
}
|
||||
formatter.tableCompleted();
|
||||
}
|
||||
|
@ -49,4 +49,5 @@ private:
|
||||
static void exportWellSegments(const RimWellPath* wellPath, const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs, const RicExportWellSegmentsSettingsUi& settings);
|
||||
static void generateWelsegsTable(RifEclipseDataTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations);
|
||||
static void generateCompsegsTable(RifEclipseDataTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations);
|
||||
static void generateWsegvalvTable(RifEclipseDataTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations);
|
||||
};
|
||||
|
@ -61,7 +61,7 @@ void RicNewFishbonesSubsAtMeasuredDepthFeature::onActionTriggered(bool isChecked
|
||||
|
||||
RimProject* proj;
|
||||
wellPath->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -82,7 +82,7 @@ RiuWellPathSelectionItem* RicNewFishbonesSubsAtMeasuredDepthFeature::wellPathSel
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFishbonesSubsAtMeasuredDepthFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
//actionToSetup->setIcon(QIcon(":/FractureSymbol16x16.png"));
|
||||
actionToSetup->setIcon(QIcon(":/FishBoneGroup16x16.png"));
|
||||
actionToSetup->setText("New Fishbones Subs Definition");
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ void RicNewFishbonesSubsFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
RimProject* proj;
|
||||
fishbonesCollection->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -82,7 +82,7 @@ RimFishbonesCollection* RicNewFishbonesSubsFeature::selectedFishbonesCollection(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFishbonesSubsFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
//actionToSetup->setIcon(QIcon(":/FractureSymbol16x16.png"));
|
||||
actionToSetup->setIcon(QIcon(":/FishBoneGroup16x16.png"));
|
||||
actionToSetup->setText("New Fishbones Subs Definition");
|
||||
}
|
||||
|
||||
|
@ -406,7 +406,6 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeature::generateP
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<size_t> RicWellPathExportCompletionDataFeature::findIntersectingCells(const RigEclipseCaseData* caseData, const std::vector<cvf::Vec3d>& coords)
|
||||
{
|
||||
const std::vector<cvf::Vec3d>& nodeCoords = caseData->mainGrid()->nodes();
|
||||
std::set<size_t> cells;
|
||||
|
||||
std::vector<HexIntersectionInfo> intersections = RigWellPathIntersectionTools::getIntersectedCells(caseData->mainGrid(), coords);
|
||||
@ -444,35 +443,6 @@ void RicWellPathExportCompletionDataFeature::markWellPathCells(const std::vector
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<size_t, double> RicWellPathExportCompletionDataFeature::computeLateralsPerCell(const std::vector<WellSegmentLocation>& segmentLocations, bool removeMainBoreCells)
|
||||
{
|
||||
std::map<size_t, double> lateralsPerCell;
|
||||
for (const WellSegmentLocation& location : segmentLocations)
|
||||
{
|
||||
for (const WellSegmentLateral& lateral : location.laterals)
|
||||
{
|
||||
for (const WellSegmentLateralIntersection& intersection : lateral.intersections)
|
||||
{
|
||||
if (removeMainBoreCells && intersection.mainBoreCell) continue;
|
||||
|
||||
auto match = lateralsPerCell.find(intersection.cellIndex);
|
||||
if (match == lateralsPerCell.end())
|
||||
{
|
||||
lateralsPerCell[intersection.cellIndex] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lateralsPerCell[intersection.cellIndex] = match->second + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return lateralsPerCell;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -512,12 +482,12 @@ std::vector<WellSegmentLocation> RicWellPathExportCompletionDataFeature::findWel
|
||||
std::vector<WellSegmentLocation> wellSegmentLocations;
|
||||
for (RimFishbonesMultipleSubs* subs : fishbonesSubs)
|
||||
{
|
||||
for (size_t subIndex = 0; subIndex < subs->locationOfSubs().size(); ++subIndex)
|
||||
for (auto& sub : subs->installedLateralIndices())
|
||||
{
|
||||
double measuredDepth = subs->locationOfSubs()[subIndex];
|
||||
double measuredDepth = subs->measuredDepth(sub.subIndex);
|
||||
cvf::Vec3d position = wellPath->wellPathGeometry()->interpolatedPointAlongWellPath(measuredDepth);
|
||||
WellSegmentLocation location = WellSegmentLocation(subs, measuredDepth, -position.z(), subIndex);
|
||||
for (size_t lateralIndex = 0; lateralIndex < subs->lateralLengths().size(); ++lateralIndex)
|
||||
WellSegmentLocation location = WellSegmentLocation(subs, measuredDepth, -position.z(), sub.subIndex);
|
||||
for (size_t lateralIndex : sub.lateralIndices)
|
||||
{
|
||||
location.laterals.push_back(WellSegmentLateral(lateralIndex));
|
||||
}
|
||||
@ -546,7 +516,7 @@ void RicWellPathExportCompletionDataFeature::calculateLateralIntersections(const
|
||||
double length = 0;
|
||||
double depth = 0;
|
||||
cvf::Vec3d startPoint = coords[0];
|
||||
int attachedSegmentNumber = location->segmentNumber;
|
||||
int attachedSegmentNumber = location->icdSegmentNumber;
|
||||
|
||||
for (size_t i = 1; i < coords.size() && intersection != intersections.cend(); ++i)
|
||||
{
|
||||
@ -561,7 +531,7 @@ void RicWellPathExportCompletionDataFeature::calculateLateralIntersections(const
|
||||
|
||||
length = 0;
|
||||
depth = 0;
|
||||
startPoint = intersection->startPoint;
|
||||
startPoint = intersection->endPoint;
|
||||
attachedSegmentNumber = *segmentNum;
|
||||
++intersection;
|
||||
}
|
||||
@ -586,6 +556,8 @@ void RicWellPathExportCompletionDataFeature::assignBranchAndSegmentNumbers(const
|
||||
for (WellSegmentLocation& location : *locations)
|
||||
{
|
||||
location.segmentNumber = ++segmentNumber;
|
||||
location.icdBranchNumber = ++branchNumber;
|
||||
location.icdSegmentNumber = ++segmentNumber;
|
||||
}
|
||||
// Then assign branch and segment numbers to each lateral parts
|
||||
for (WellSegmentLocation& location : *locations)
|
||||
|
@ -65,7 +65,10 @@ struct WellSegmentLateralIntersection {
|
||||
///
|
||||
//==================================================================================================
|
||||
struct WellSegmentLateral {
|
||||
WellSegmentLateral(size_t lateralIndex) : lateralIndex(lateralIndex) {}
|
||||
WellSegmentLateral(size_t lateralIndex)
|
||||
: lateralIndex(lateralIndex),
|
||||
branchNumber(0)
|
||||
{}
|
||||
|
||||
size_t lateralIndex;
|
||||
int branchNumber;
|
||||
@ -90,6 +93,8 @@ struct WellSegmentLocation {
|
||||
double trueVerticalDepth;
|
||||
size_t subIndex;
|
||||
int segmentNumber;
|
||||
int icdBranchNumber;
|
||||
int icdSegmentNumber;
|
||||
std::vector<WellSegmentLateral> laterals;
|
||||
};
|
||||
|
||||
@ -137,7 +142,6 @@ private:
|
||||
static std::vector<RigCompletionData> generateFishbonesWellPathCompdatValues(const RimWellPath* wellPath, const RicExportCompletionDataSettingsUi& settings);
|
||||
static std::vector<RigCompletionData> generatePerforationsCompdatValues(const RimWellPath* wellPath, const RicExportCompletionDataSettingsUi& settings);
|
||||
|
||||
static std::map<size_t, double> computeLateralsPerCell(const std::vector<WellSegmentLocation>& segmentLocations, bool removeMainBoreCells);
|
||||
static std::vector<size_t> findIntersectingCells(const RigEclipseCaseData* grid, const std::vector<cvf::Vec3d>& coords);
|
||||
static void markWellPathCells(const std::vector<size_t>& wellPathCells, std::vector<WellSegmentLocation>* locations);
|
||||
static bool wellSegmentLocationOrdering(const WellSegmentLocation& first, const WellSegmentLocation& second);
|
||||
|
@ -80,7 +80,7 @@ void RicWellPathImportCompletionsFileFeature::onActionTriggered(bool isChecked)
|
||||
void RicWellPathImportCompletionsFileFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setText("Import Completions from File");
|
||||
actionToSetup->setIcon(QIcon(":/Well.png"));
|
||||
actionToSetup->setIcon(QIcon(":/FishBoneGroupFromFile16x16.png"));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -89,11 +89,11 @@ void RivFishbonesSubsPartMgr::buildParts(caf::DisplayCoordTransform* displayCoor
|
||||
|
||||
RivPipeGeometryGenerator geoGenerator;
|
||||
|
||||
for (size_t subIndex = 0; subIndex < m_rimFishbonesSubs->locationOfSubs().size(); subIndex++)
|
||||
for (auto& sub : m_rimFishbonesSubs->installedLateralIndices())
|
||||
{
|
||||
for (size_t lateralIndex = 0; lateralIndex < m_rimFishbonesSubs->lateralLengths().size(); lateralIndex++)
|
||||
for (size_t lateralIndex : sub.lateralIndices)
|
||||
{
|
||||
std::vector<cvf::Vec3d> lateralDomainCoords = m_rimFishbonesSubs->coordsForLateral(subIndex, lateralIndex);
|
||||
std::vector<cvf::Vec3d> lateralDomainCoords = m_rimFishbonesSubs->coordsForLateral(sub.subIndex, lateralIndex);
|
||||
|
||||
std::vector<cvf::Vec3d> displayCoords;
|
||||
for (auto domainCoord : lateralDomainCoords)
|
||||
|
@ -267,9 +267,7 @@ void RivGridPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCellC
|
||||
cvf::Vec2fArray& surfaceCoords = *m_surfaceFacesTextureCoords.p();
|
||||
for (cvf::Vec2f& vec : surfaceCoords)
|
||||
{
|
||||
{
|
||||
vec[1] = 0.5;
|
||||
}
|
||||
vec[1] = 0.5;
|
||||
}
|
||||
m_opacityLevel = 0.5;
|
||||
}
|
||||
|
@ -80,14 +80,14 @@ void RimCompletionCellIntersectionCalc::calculateWellPathIntersections(const Rim
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCompletionCellIntersectionCalc::calculateFishbonesIntersections(const RimFishbonesMultipleSubs* fishbonesSubs, const RigMainGrid* grid, std::vector<double>& values)
|
||||
{
|
||||
for (size_t subIndex = 0; subIndex < fishbonesSubs->locationOfSubs().size(); ++subIndex)
|
||||
for (auto& sub : fishbonesSubs->installedLateralIndices())
|
||||
{
|
||||
for (size_t lateralIndex = 0; lateralIndex < fishbonesSubs->lateralCountPerSub(); ++lateralIndex)
|
||||
for (size_t lateralIndex : sub.lateralIndices)
|
||||
{
|
||||
std::vector<HexIntersectionInfo> intersections = RigWellPathIntersectionTools::getIntersectedCells(grid, fishbonesSubs->coordsForLateral(subIndex, lateralIndex));
|
||||
std::vector<HexIntersectionInfo> intersections = RigWellPathIntersectionTools::getIntersectedCells(grid, fishbonesSubs->coordsForLateral(sub.subIndex, lateralIndex));
|
||||
for (auto& intersection : intersections)
|
||||
{
|
||||
values[intersection.m_hexIndex] = RimDefines::FISHBONE;
|
||||
values[intersection.m_hexIndex] = RimDefines::FISHBONES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ CAF_PDM_SOURCE_INIT(RimFishboneWellPath, "WellPathCompletion");
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFishboneWellPath::RimFishboneWellPath()
|
||||
{
|
||||
CAF_PDM_InitObject("WellPathCompletion", ":/Well.png", "", "");
|
||||
CAF_PDM_InitObject("WellPathCompletion", ":/FishBoneLateralFromFile16x16.png", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_coordinates, "Coordinates", "Coordinates", "", "", "");
|
||||
m_coordinates.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitFieldNoDefault(&m_measuredDepths, "MeasuredDepth", "MeasuredDepth", "", "", "");
|
||||
|
@ -38,7 +38,7 @@ CAF_PDM_SOURCE_INIT(RimFishboneWellPathCollection, "WellPathCompletionCollection
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFishboneWellPathCollection::RimFishboneWellPathCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("WellPathCompletions", ":/WellCollection.png", "", "");
|
||||
CAF_PDM_InitObject("WellPathCompletions", ":/FishBoneGroupFromFile16x16.png", "", "");
|
||||
|
||||
m_name.uiCapability()->setUiHidden(true);
|
||||
m_name = "Well Paths";
|
||||
@ -103,7 +103,7 @@ void RimFishboneWellPathCollection::appendCompletion(RimFishboneWellPath* comple
|
||||
firstAncestorOrThisOfTypeAsserted(project);
|
||||
if (project)
|
||||
{
|
||||
project->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
project->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ CAF_PDM_SOURCE_INIT(RimFishbonesCollection, "FishbonesCollection");
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFishbonesCollection::RimFishbonesCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("Fishbones", ":/Folder.png", "", "");
|
||||
CAF_PDM_InitObject("Fishbones", ":/FishBones16x16.png", "", "");
|
||||
|
||||
m_name.uiCapability()->setUiHidden(true);
|
||||
m_name = "Fishbones";
|
||||
|
@ -57,7 +57,7 @@ namespace caf {
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFishbonesMultipleSubs::RimFishbonesMultipleSubs()
|
||||
{
|
||||
CAF_PDM_InitObject("FishbonesMultipleSubs", ":/Default.png", "", "");
|
||||
CAF_PDM_InitObject("FishbonesMultipleSubs", ":/FishBoneGroup16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitField(&fishbonesColor, "FishbonesColor", cvf::Color3f(0.999f, 0.333f, 0.999f), "Fishbones Color", "", "", "");
|
||||
|
||||
@ -72,11 +72,11 @@ RimFishbonesMultipleSubs::RimFishbonesMultipleSubs()
|
||||
CAF_PDM_InitField(&m_lateralOpenHoleRoghnessFactor, "LateralOpenHoleRoghnessFactor", 0.001, "Open Hole Roghness Factor [m]", "", "", "");
|
||||
CAF_PDM_InitField(&m_lateralTubingRoghnessFactor, "LateralTubingRoghnessFactor", 1e-5, "Tubing Roghness Factor [m]", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_lateralLengthFraction, "LateralLengthFraction", 0.8, "Length Fraction [0..1]", "", "", "");
|
||||
CAF_PDM_InitField(&m_lateralInstallFraction, "LateralInstallFraction", 0.7, "Install Fraction [0..1]", "", "", "");
|
||||
CAF_PDM_InitField(&m_lateralInstallSuccessFraction, "LateralInstallSuccessFraction", 0.7, "Install Success Rate [0..1]", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_icdCount, "IcdCount", size_t(2), "ICDs per Sub", "", "", "");
|
||||
CAF_PDM_InitField(&m_icdOrificeDiameter, "IcdOrificeDiameter", 7.0, "ICD Orifice Diameter [mm]", "", "", "");
|
||||
CAF_PDM_InitField(&m_icdFlowCoefficient, "IcdFlowCoeficcient", -1.0, "ICD Flow Coefficient", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_locationOfSubs, "LocationOfSubs", "Measured Depths [m]", "", "", "");
|
||||
m_locationOfSubs.uiCapability()->setUiEditorTypeName(caf::PdmUiListEditor::uiEditorTypeName());
|
||||
@ -102,6 +102,8 @@ RimFishbonesMultipleSubs::RimFishbonesMultipleSubs()
|
||||
m_name.uiCapability()->setUiReadOnly(true);
|
||||
|
||||
m_rigFishbonesGeometry = std::unique_ptr<RigFisbonesGeometry>(new RigFisbonesGeometry(this));
|
||||
|
||||
computeSubLateralIndices();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -125,14 +127,17 @@ void RimFishbonesMultipleSubs::setMeasuredDepthAndCount(double measuredDepth, do
|
||||
|
||||
computeRangesAndLocations();
|
||||
computeRotationAngles();
|
||||
computeSubLateralIndices();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RimFishbonesMultipleSubs::locationOfSubs() const
|
||||
double RimFishbonesMultipleSubs::measuredDepth(size_t subIndex) const
|
||||
{
|
||||
return m_locationOfSubs;
|
||||
CVF_ASSERT(subIndex < m_locationOfSubs().size());
|
||||
|
||||
return m_locationOfSubs()[subIndex];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -176,14 +181,6 @@ double RimFishbonesMultipleSubs::tubingDiameter() const
|
||||
return m_lateralTubingDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RimFishbonesMultipleSubs::lateralCountPerSub() const
|
||||
{
|
||||
return m_lateralCountPerSub;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -277,9 +274,17 @@ void RimFishbonesMultipleSubs::fieldChangedByUi(const caf::PdmFieldHandle* chang
|
||||
computeRotationAngles();
|
||||
}
|
||||
|
||||
if (recomputeLocations ||
|
||||
changedField == &m_locationOfSubs ||
|
||||
changedField == &m_lateralInstallSuccessFraction ||
|
||||
changedField == &m_lateralCountPerSub)
|
||||
{
|
||||
computeSubLateralIndices();
|
||||
}
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -381,14 +386,8 @@ void RimFishbonesMultipleSubs::defineUiOrdering(QString uiConfigName, caf::PdmUi
|
||||
lateralConfigGroup->add(&m_fixedInstallationRotationAngle);
|
||||
}
|
||||
|
||||
lateralConfigGroup->add(&m_lateralInstallSuccessFraction);
|
||||
|
||||
{
|
||||
caf::PdmUiGroup* successGroup = lateralConfigGroup->addNewGroup("Installation Success Fractions");
|
||||
successGroup->setCollapsedByDefault(true);
|
||||
|
||||
successGroup->add(&m_lateralLengthFraction);
|
||||
successGroup->add(&m_lateralInstallFraction);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
@ -405,6 +404,7 @@ void RimFishbonesMultipleSubs::defineUiOrdering(QString uiConfigName, caf::PdmUi
|
||||
mswGroup->add(&m_lateralTubingRoghnessFactor);
|
||||
mswGroup->add(&m_icdCount);
|
||||
mswGroup->add(&m_icdOrificeDiameter);
|
||||
mswGroup->add(&m_icdFlowCoefficient);
|
||||
}
|
||||
|
||||
// Visibility
|
||||
@ -451,6 +451,7 @@ void RimFishbonesMultipleSubs::initAfterRead()
|
||||
{
|
||||
computeRotationAngles();
|
||||
}
|
||||
computeSubLateralIndices();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -472,11 +473,11 @@ cvf::BoundingBox RimFishbonesMultipleSubs::boundingBoxInDomainCoords()
|
||||
{
|
||||
cvf::BoundingBox bb;
|
||||
|
||||
for (size_t i = 0; i < m_locationOfSubs().size(); i++)
|
||||
for (auto& sub : installedLateralIndices())
|
||||
{
|
||||
for (size_t lateralIndex = 0; lateralIndex < m_lateralCountPerSub; lateralIndex++)
|
||||
for (size_t lateralIndex : sub.lateralIndices)
|
||||
{
|
||||
std::vector<cvf::Vec3d> coords = coordsForLateral(i, lateralIndex);
|
||||
std::vector<cvf::Vec3d> coords = coordsForLateral(sub.subIndex, lateralIndex);
|
||||
|
||||
for (auto c : coords)
|
||||
{
|
||||
@ -503,6 +504,36 @@ void RimFishbonesMultipleSubs::computeRotationAngles()
|
||||
m_installationRotationAngles = vals;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishbonesMultipleSubs::computeSubLateralIndices()
|
||||
{
|
||||
m_subLateralIndices.clear();
|
||||
for (size_t subIndex = 0; subIndex < m_locationOfSubs().size(); ++subIndex)
|
||||
{
|
||||
SubLateralIndex subLateralIndex{ subIndex };
|
||||
for (size_t lateralIndex = 0; lateralIndex < m_lateralCountPerSub(); ++lateralIndex)
|
||||
{
|
||||
subLateralIndex.lateralIndices.push_back(lateralIndex);
|
||||
}
|
||||
m_subLateralIndices.push_back(subLateralIndex);
|
||||
}
|
||||
double numLaterals = static_cast<double>(m_locationOfSubs().size() * m_lateralCountPerSub);
|
||||
int numToRemove = static_cast<int>(std::round((1 - m_lateralInstallSuccessFraction) * numLaterals));
|
||||
srand(m_randomSeed());
|
||||
while (numToRemove > 0)
|
||||
{
|
||||
int subIndexToRemove;
|
||||
do {
|
||||
subIndexToRemove = rand() % m_subLateralIndices.size();
|
||||
} while (m_subLateralIndices[subIndexToRemove].lateralIndices.empty());
|
||||
int lateralIndexToRemove = rand() % m_subLateralIndices[subIndexToRemove].lateralIndices.size();
|
||||
m_subLateralIndices[subIndexToRemove].lateralIndices.erase(m_subLateralIndices[subIndexToRemove].lateralIndices.begin() + lateralIndexToRemove);
|
||||
--numToRemove;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -35,6 +35,15 @@
|
||||
|
||||
class RigFisbonesGeometry;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
struct SubLateralIndex {
|
||||
size_t subIndex;
|
||||
std::vector<size_t> lateralIndices;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
@ -64,18 +73,22 @@ public:
|
||||
|
||||
void setMeasuredDepthAndCount(double measuredDepth, double spacing, int subCount);
|
||||
|
||||
std::vector<double> locationOfSubs() const;
|
||||
double measuredDepth(size_t subIndex) const;
|
||||
double rotationAngle(size_t subIndex) const;
|
||||
|
||||
double rotationAngle(size_t index) const;
|
||||
double exitAngle() const;
|
||||
double buildAngle() const;
|
||||
|
||||
double tubingDiameter() const;
|
||||
double holeDiameter() const { return m_pipeProperties()->holeDiameter(); }
|
||||
double openHoleRoughnessFactor() const { return m_lateralOpenHoleRoghnessFactor(); }
|
||||
size_t lateralCountPerSub() const;
|
||||
double icdOrificeDiameter() const { return m_icdOrificeDiameter(); }
|
||||
double icdFlowCoefficient() const { return m_icdFlowCoefficient(); }
|
||||
size_t icdCount() const { return m_icdCount(); }
|
||||
std::vector<double> lateralLengths() const;
|
||||
|
||||
const std::vector<SubLateralIndex>& installedLateralIndices() const { return m_subLateralIndices; };
|
||||
|
||||
std::vector<cvf::Vec3d> coordsForLateral(size_t subIndex, size_t lateralIndex) const;
|
||||
std::vector<std::pair<cvf::Vec3d, double>> coordsAndMDForLateral(size_t subIndex, size_t lateralIndex) const;
|
||||
|
||||
@ -95,10 +108,11 @@ protected:
|
||||
private:
|
||||
void computeRangesAndLocations();
|
||||
void computeRotationAngles();
|
||||
void computeSubLateralIndices();
|
||||
|
||||
static std::vector<double> locationsFromStartSpacingAndCount(double start, double spacing, size_t count);
|
||||
static int randomValueFromRange(int min, int max);
|
||||
|
||||
|
||||
private:
|
||||
caf::PdmField<size_t> m_lateralCountPerSub;
|
||||
caf::PdmField<QString> m_lateralLength;
|
||||
@ -111,11 +125,11 @@ private:
|
||||
caf::PdmField<double> m_lateralOpenHoleRoghnessFactor;
|
||||
caf::PdmField<double> m_lateralTubingRoghnessFactor;
|
||||
|
||||
caf::PdmField<double> m_lateralLengthFraction;
|
||||
caf::PdmField<double> m_lateralInstallFraction;
|
||||
caf::PdmField<double> m_lateralInstallSuccessFraction;
|
||||
|
||||
caf::PdmField<size_t> m_icdCount;
|
||||
caf::PdmField<double> m_icdOrificeDiameter;
|
||||
caf::PdmField<double> m_icdFlowCoefficient;
|
||||
|
||||
caf::PdmField<caf::AppEnum<LocationType> > m_subsLocationMode;
|
||||
caf::PdmField<double> m_rangeStart;
|
||||
@ -132,5 +146,8 @@ private:
|
||||
|
||||
caf::PdmChildField<RimFishbonesPipeProperties*> m_pipeProperties;
|
||||
|
||||
caf::PdmField<uint> m_randomSeed;
|
||||
|
||||
std::unique_ptr<RigFisbonesGeometry> m_rigFishbonesGeometry;
|
||||
std::vector<SubLateralIndex> m_subLateralIndices;
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ CAF_PDM_SOURCE_INIT(RimPerforationCollection, "PerforationCollection");
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPerforationCollection::RimPerforationCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("Perforations", ":/Folder.png", "", "");
|
||||
CAF_PDM_InitObject("Perforations", ":/PerforationIntervals16x16.png", "", "");
|
||||
|
||||
m_name.uiCapability()->setUiHidden(true);
|
||||
m_name = "Perforations";
|
||||
@ -77,7 +77,7 @@ void RimPerforationCollection::appendPerforation(RimPerforationInterval* perfora
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -36,7 +36,7 @@ CAF_PDM_SOURCE_INIT(RimPerforationInterval, "Perforation");
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPerforationInterval::RimPerforationInterval()
|
||||
{
|
||||
CAF_PDM_InitObject("Perforation", ":/Default.png", "", "");
|
||||
CAF_PDM_InitObject("Perforation", ":/PerforationInterval16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_startMD, "StartMeasuredDepth", 0.0, "Start MD [m]", "", "", "");
|
||||
CAF_PDM_InitField(&m_endMD, "EndMeasuredDepth", 0.0, "End MD [m]", "", "", "");
|
||||
@ -145,7 +145,7 @@ void RimPerforationInterval::fieldChangedByUi(const caf::PdmFieldHandle* changed
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -32,7 +32,7 @@ CAF_PDM_SOURCE_INIT(RimWellPathCompletions, "WellPathCompletions");
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPathCompletions::RimWellPathCompletions()
|
||||
{
|
||||
CAF_PDM_InitObject("Completions", ":/WellCollection.png", "", "");
|
||||
CAF_PDM_InitObject("Completions", ":/CompletionsSymbol16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_perforationCollection, "Perforations", "Perforations", "", "", "");
|
||||
m_perforationCollection = new RimPerforationCollection;
|
||||
|
@ -80,7 +80,7 @@ namespace caf
|
||||
{
|
||||
addItem(RimDefines::WELL_PATH, "WELL_PATH", "Well Path");
|
||||
addItem(RimDefines::PERFORATION_INTERVAL, "PERFORATION_INTERVAL", "Perforation Interval");
|
||||
addItem(RimDefines::FISHBONE, "FISHBONE", "Fishbone");
|
||||
addItem(RimDefines::FISHBONES, "FISHBONES", "Fishbones");
|
||||
|
||||
setDefault(RimDefines::WELL_PATH);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
enum CompletionType {
|
||||
WELL_PATH,
|
||||
PERFORATION_INTERVAL,
|
||||
FISHBONE
|
||||
FISHBONES
|
||||
};
|
||||
|
||||
static bool isPerCellFaceResult(const QString& resultName);
|
||||
|
@ -249,7 +249,7 @@ RimEclipseView* RimEclipseCase::createCopyAndAddView(const RimEclipseView* sourc
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseCase::removeResult(RimDefines::ResultCatType type, const QString& resultName)
|
||||
void RimEclipseCase::removeEclipseResultAndScheduleRedrawAllViews(RimDefines::ResultCatType type, const QString& resultName)
|
||||
{
|
||||
m_matrixModelResults->clearScalarResult(type, resultName);
|
||||
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
RimEclipseView* createAndAddReservoirView();
|
||||
RimEclipseView* createCopyAndAddView(const RimEclipseView* sourceView);
|
||||
|
||||
void removeResult(RimDefines::ResultCatType type, const QString& resultName);
|
||||
void removeEclipseResultAndScheduleRedrawAllViews(RimDefines::ResultCatType type, const QString& resultName);
|
||||
|
||||
virtual QString locationOnDisc() const { return QString(); }
|
||||
virtual QString gridFileName() const { return QString(); }
|
||||
|
@ -387,7 +387,7 @@ void RimEclipseCellColors::updateLegendData(size_t currentTimeStep)
|
||||
std::vector< std::tuple<QString, int, cvf::Color3ub> > categories;
|
||||
|
||||
caf::AppEnum<RimDefines::CompletionType> wellPath(RimDefines::WELL_PATH);
|
||||
caf::AppEnum<RimDefines::CompletionType> fishbone(RimDefines::FISHBONE);
|
||||
caf::AppEnum<RimDefines::CompletionType> fishbone(RimDefines::FISHBONES);
|
||||
caf::AppEnum<RimDefines::CompletionType> perforationInterval(RimDefines::PERFORATION_INTERVAL);
|
||||
|
||||
categories.push_back(std::make_tuple(wellPath.uiText(), wellPath.index(), cvf::Color3::RED));
|
||||
|
@ -767,11 +767,19 @@ bool RimProject::showPlotWindow() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::removeResult(RimDefines::ResultCatType type, const QString & resultName)
|
||||
void RimProject::reloadCompletionTypeResultsInAllViews()
|
||||
{
|
||||
removeEclipseResultAndRedrawAllViews(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::removeEclipseResultAndRedrawAllViews(RimDefines::ResultCatType type, const QString & resultName)
|
||||
{
|
||||
for (RimEclipseCase* eclipseCase : activeOilField()->analysisModels->cases)
|
||||
{
|
||||
eclipseCase->removeResult(type, resultName);
|
||||
eclipseCase->removeEclipseResultAndScheduleRedrawAllViews(type, resultName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,8 @@ public:
|
||||
bool show3DWindow() const;
|
||||
bool showPlotWindow() const;
|
||||
|
||||
void removeResult(RimDefines::ResultCatType type, const QString& resultName);
|
||||
void reloadCompletionTypeResultsInAllViews();
|
||||
|
||||
|
||||
protected:
|
||||
// Overridden methods
|
||||
@ -122,6 +123,7 @@ protected:
|
||||
|
||||
private:
|
||||
void appendScriptItems(QMenu* menu, RimScriptCollection* scriptCollection);
|
||||
void removeEclipseResultAndRedrawAllViews(RimDefines::ResultCatType type, const QString& resultName);
|
||||
|
||||
private:
|
||||
caf::PdmField<QString> m_projectFileVersionString;
|
||||
|
@ -1406,12 +1406,12 @@ void RimReservoirCellResultsStorage::computeCompletionTypeForTimeStep(size_t tim
|
||||
{
|
||||
size_t completionTypeResultIndex = m_cellResults->findScalarResultIndex(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
|
||||
if (m_cellResults->cellScalarResults(completionTypeResultIndex).size() != timeStep)
|
||||
if (m_cellResults->cellScalarResults(completionTypeResultIndex).size() < cellResults()->maxTimeStepCount())
|
||||
{
|
||||
m_cellResults->cellScalarResults(completionTypeResultIndex).resize(timeStep);
|
||||
m_cellResults->cellScalarResults(completionTypeResultIndex).resize(cellResults()->maxTimeStepCount());
|
||||
}
|
||||
|
||||
std::vector<double>& completionTypeResult = m_cellResults->cellScalarResults(completionTypeResultIndex, 0);
|
||||
std::vector<double>& completionTypeResult = m_cellResults->cellScalarResults(completionTypeResultIndex, timeStep);
|
||||
|
||||
size_t resultValues = m_ownerMainGrid->globalCellArray().size();
|
||||
|
||||
|
@ -254,7 +254,7 @@ void RimWellPath::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
if (changedField == &showWellPath)
|
||||
{
|
||||
proj->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -218,7 +218,7 @@ void RimWellPathCollection::addWellPaths( QStringList filePaths )
|
||||
|
||||
RimProject* proj;
|
||||
firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
RigCompletionData::RigCompletionData(const QString wellName, const IJKCellIndex cellIndex)
|
||||
RigCompletionData::RigCompletionData(const QString wellName, const IJKCellIndex& cellIndex)
|
||||
: m_wellName(wellName),
|
||||
m_cellIndex(cellIndex),
|
||||
m_saturation(HUGE_VAL),
|
||||
|
@ -91,7 +91,7 @@ struct RigCompletionMetaData {
|
||||
class RigCompletionData : public cvf::Object
|
||||
{
|
||||
public:
|
||||
RigCompletionData(const QString wellName, const IJKCellIndex cellIndex);
|
||||
RigCompletionData(const QString wellName, const IJKCellIndex& cellIndex);
|
||||
~RigCompletionData();
|
||||
RigCompletionData(const RigCompletionData& other);
|
||||
|
||||
|
@ -39,16 +39,30 @@ RigFisbonesGeometry::RigFisbonesGeometry(RimFishbonesMultipleSubs* fishbonesSub)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::pair<cvf::Vec3d, double>> RigFisbonesGeometry::coordsForLateral(size_t subIndex, size_t lateralIndex) const
|
||||
{
|
||||
CVF_ASSERT(subIndex < m_fishbonesSub->locationOfSubs().size());
|
||||
CVF_ASSERT(lateralIndex < m_fishbonesSub->lateralLengths().size());
|
||||
|
||||
bool found = false;
|
||||
for (auto& sub : m_fishbonesSub->installedLateralIndices())
|
||||
{
|
||||
if (sub.subIndex == subIndex)
|
||||
{
|
||||
auto it = std::find(sub.lateralIndices.begin(), sub.lateralIndices.end(), lateralIndex);
|
||||
if (it != sub.lateralIndices.end())
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
CVF_ASSERT(found);
|
||||
|
||||
cvf::Vec3d position;
|
||||
cvf::Vec3d lateralInitialDirection;
|
||||
cvf::Mat4d buildAngleRotationMatrix;
|
||||
|
||||
computeLateralPositionAndOrientation(subIndex, lateralIndex, &position, &lateralInitialDirection, &buildAngleRotationMatrix);
|
||||
|
||||
return computeCoordsAlongLateral(m_fishbonesSub->locationOfSubs()[subIndex], m_fishbonesSub->lateralLengths()[lateralIndex], position, lateralInitialDirection, buildAngleRotationMatrix);
|
||||
return computeCoordsAlongLateral(m_fishbonesSub->measuredDepth(subIndex), m_fishbonesSub->lateralLengths()[lateralIndex], position, lateralInitialDirection, buildAngleRotationMatrix);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -62,7 +76,7 @@ void RigFisbonesGeometry::computeLateralPositionAndOrientation(size_t subIndex,
|
||||
RigWellPath* rigWellPath = wellPath->wellPathGeometry();
|
||||
CVF_ASSERT(rigWellPath);
|
||||
|
||||
double measuredDepth = m_fishbonesSub->locationOfSubs()[subIndex];
|
||||
double measuredDepth = m_fishbonesSub->measuredDepth(subIndex);
|
||||
|
||||
cvf::Vec3d position = rigWellPath->interpolatedPointAlongWellPath(measuredDepth);
|
||||
|
||||
|
BIN
ApplicationCode/Resources/CompletionsSymbol16x16.png
Normal file
After Width: | Height: | Size: 260 B |
BIN
ApplicationCode/Resources/FishBoneGroup16x16.png
Normal file
After Width: | Height: | Size: 516 B |
BIN
ApplicationCode/Resources/FishBoneGroupFromFile16x16.png
Normal file
After Width: | Height: | Size: 736 B |
BIN
ApplicationCode/Resources/FishBoneLateralFromFile16x16.png
Normal file
After Width: | Height: | Size: 550 B |
BIN
ApplicationCode/Resources/FishBones16x16.png
Normal file
After Width: | Height: | Size: 625 B |
BIN
ApplicationCode/Resources/PerforationInterval16x16.png
Normal file
After Width: | Height: | Size: 544 B |
BIN
ApplicationCode/Resources/PerforationIntervals16x16.png
Normal file
After Width: | Height: | Size: 611 B |
@ -80,6 +80,13 @@
|
||||
<file>RightAxis16x16.png</file>
|
||||
<file>BottomAxis16x16.png</file>
|
||||
<file>Axes16x16.png</file>
|
||||
<file>FishBones16x16.png</file>
|
||||
<file>FishBoneGroup16x16.png</file>
|
||||
<file>FishBoneGroupFromFile16x16.png</file>
|
||||
<file>FishBoneLateralFromFile16x16.png</file>
|
||||
<file>PerforationInterval16x16.png</file>
|
||||
<file>PerforationIntervals16x16.png</file>
|
||||
<file>CompletionsSymbol16x16.png</file>
|
||||
<file>WellAllocPlots16x16.png</file>
|
||||
<file>WellAllocPlot16x16.png</file>
|
||||
<file>WellFlowPlot16x16.png</file>
|
||||
|