mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1512 Compute COMPDAT for imported well path branches
This commit is contained in:
parent
a5f00147df
commit
69e9b9701b
@ -26,6 +26,8 @@
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimFishbonesMultipleSubs.h"
|
||||
#include "RimFishbonesCollection.h"
|
||||
#include "RimFishboneWellPath.h"
|
||||
#include "RimFishboneWellPathCollection.h"
|
||||
#include "RimPerforationInterval.h"
|
||||
#include "RimPerforationCollection.h"
|
||||
#include "RimExportCompletionDataSettings.h"
|
||||
@ -163,6 +165,8 @@ void RicWellPathExportCompletionDataFeature::exportCompletions(const std::vector
|
||||
{
|
||||
std::vector<RigCompletionData> fishbonesCompletionData = generateFishbonesCompdatValues(wellPath, exportSettings);
|
||||
appendCompletionData(&completionData, fishbonesCompletionData);
|
||||
std::vector<RigCompletionData> fishbonesWellPathCompletionData = generateFishbonesWellPathCompdatValues(wellPath, exportSettings);
|
||||
appendCompletionData(&completionData, fishbonesWellPathCompletionData);
|
||||
}
|
||||
|
||||
// Merge map into a vector of values
|
||||
@ -323,24 +327,8 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeature::generateF
|
||||
RigCompletionData completion(wellPath->name(), IJKCellIndex(i, j, k));
|
||||
completion.addMetadata(location.fishbonesSubs->name(), QString("Sub: %1 Lateral: %2").arg(location.subIndex).arg(lateral.lateralIndex));
|
||||
double diameter = location.fishbonesSubs->holeRadius() / 1000 * 2;
|
||||
switch (intersection.direction)
|
||||
{
|
||||
case POS_I:
|
||||
case NEG_I:
|
||||
completion.setFromFishbone(diameter, CellDirection::DIR_I);
|
||||
break;
|
||||
case POS_J:
|
||||
case NEG_J:
|
||||
completion.setFromFishbone(diameter, CellDirection::DIR_J);
|
||||
break;
|
||||
case POS_K:
|
||||
case NEG_K:
|
||||
completion.setFromFishbone(diameter, CellDirection::DIR_K);
|
||||
break;
|
||||
default:
|
||||
completion.setFromFishbone(diameter, CellDirection::DIR_UNDEF);
|
||||
break;
|
||||
}
|
||||
CellDirection direction = wellPathCellDirectionToCellDirection(completion.direction);
|
||||
completion.setFromFishbone(diameter, direction);
|
||||
completionData.push_back(completion);
|
||||
}
|
||||
}
|
||||
@ -349,6 +337,32 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeature::generateF
|
||||
return completionData;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RigCompletionData> RicWellPathExportCompletionDataFeature::generateFishbonesWellPathCompdatValues(const RimWellPath* wellPath, const RimExportCompletionDataSettings & settings)
|
||||
{
|
||||
std::vector<RigCompletionData> completionData;
|
||||
|
||||
double diameter = wellPath->fishbonesCollection()->wellPathCollection()->holeRadius() / 1000 * 2;
|
||||
for (const RimFishboneWellPath* fishbonesPath : wellPath->fishbonesCollection()->wellPathCollection()->wellPaths())
|
||||
{
|
||||
std::vector<WellPathCellIntersectionInfo> intersectedCells = RigWellPathIntersectionTools::findCellsIntersectedByPath(settings.caseToApply->eclipseCaseData(), fishbonesPath->coordinates());
|
||||
for (auto& cell : intersectedCells)
|
||||
{
|
||||
size_t i, j, k;
|
||||
settings.caseToApply->eclipseCaseData()->mainGrid()->ijkFromCellIndex(cell.cellIndex, &i, &j, &k);
|
||||
RigCompletionData completion(wellPath->name(), IJKCellIndex(i, j, k));
|
||||
completion.addMetadata(fishbonesPath->name(), "");
|
||||
CellDirection direction = wellPathCellDirectionToCellDirection(cell.direction);
|
||||
completion.setFromFishbone(diameter, direction);
|
||||
completionData.push_back(completion);
|
||||
}
|
||||
}
|
||||
|
||||
return completionData;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -367,25 +381,8 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeature::generateP
|
||||
RigCompletionData completion(wellPath->name(), IJKCellIndex(i, j, k));
|
||||
completion.addMetadata("Perforation", QString("StartMD: %1 - EndMD: %2").arg(interval->startMD()).arg(interval->endMD()));
|
||||
double diameter = interval->radius() * 2;
|
||||
switch (cell.direction)
|
||||
{
|
||||
case POS_I:
|
||||
case NEG_I:
|
||||
completion.setFromPerforation(diameter, CellDirection::DIR_I);
|
||||
break;
|
||||
case POS_J:
|
||||
case NEG_J:
|
||||
completion.setFromPerforation(diameter, CellDirection::DIR_J);
|
||||
break;
|
||||
case POS_K:
|
||||
case NEG_K:
|
||||
completion.setFromPerforation(diameter, CellDirection::DIR_K);
|
||||
break;
|
||||
default:
|
||||
completion.setFromPerforation(diameter, CellDirection::DIR_UNDEF);
|
||||
break;
|
||||
}
|
||||
|
||||
CellDirection direction = wellPathCellDirectionToCellDirection(cell.direction);
|
||||
completion.setFromPerforation(diameter, direction);
|
||||
completionData.push_back(completion);
|
||||
}
|
||||
}
|
||||
@ -604,3 +601,28 @@ void RicWellPathExportCompletionDataFeature::appendCompletionData(std::map<IJKCe
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
CellDirection RicWellPathExportCompletionDataFeature::wellPathCellDirectionToCellDirection(WellPathCellDirection direction)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case POS_I:
|
||||
case NEG_I:
|
||||
CellDirection::DIR_I;
|
||||
break;
|
||||
case POS_J:
|
||||
case NEG_J:
|
||||
CellDirection::DIR_J;
|
||||
break;
|
||||
case POS_K:
|
||||
case NEG_K:
|
||||
CellDirection::DIR_K;
|
||||
break;
|
||||
default:
|
||||
CellDirection::DIR_UNDEF;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -134,6 +134,7 @@ private:
|
||||
static void generateWpimultTable(RifEclipseOutputTableFormatter& formatter, const std::vector<RigCompletionData>& completionData);
|
||||
|
||||
static std::vector<RigCompletionData> generateFishbonesCompdatValues(const RimWellPath* wellPath, const RimExportCompletionDataSettings& settings);
|
||||
static std::vector<RigCompletionData> generateFishbonesWellPathCompdatValues(const RimWellPath* wellPath, const RimExportCompletionDataSettings& settings);
|
||||
static std::vector<RigCompletionData> generatePerforationsCompdatValues(const RimWellPath* wellPath, const RimExportCompletionDataSettings& settings);
|
||||
|
||||
static std::map<size_t, double> computeLateralsPerCell(const std::vector<WellSegmentLocation>& segmentLocations, bool removeMainBoreCells);
|
||||
@ -146,4 +147,5 @@ private:
|
||||
|
||||
static void appendCompletionData(std::map<IJKCellIndex, RigCompletionData>* completionData, const std::vector<RigCompletionData>& data);
|
||||
|
||||
static CellDirection wellPathCellDirectionToCellDirection(WellPathCellDirection direction);
|
||||
};
|
||||
|
@ -55,8 +55,8 @@ public:
|
||||
void setCoordinates(std::vector< cvf::Vec3d > coordinates);
|
||||
void setMeasuredDepths(std::vector< double > measuredDepths);
|
||||
|
||||
std::vector< cvf::Vec3d > coordinates() { return m_coordinates(); }
|
||||
std::vector< double > measuredDepths() { return m_measuredDepths(); }
|
||||
std::vector< cvf::Vec3d > coordinates() const { return m_coordinates(); }
|
||||
std::vector< double > measuredDepths() const { return m_measuredDepths(); }
|
||||
private:
|
||||
QString displayCoordinates() const;
|
||||
|
||||
|
@ -63,6 +63,21 @@ void RimFishboneWellPathCollection::fieldChangedByUi(const caf::PdmFieldHandle*
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<const RimFishboneWellPath*> RimFishboneWellPathCollection::wellPaths() const
|
||||
{
|
||||
std::vector<const RimFishboneWellPath*> paths;
|
||||
|
||||
for (const RimFishboneWellPath* path : m_wellPaths)
|
||||
{
|
||||
paths.push_back(path);
|
||||
}
|
||||
|
||||
return paths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -44,6 +44,9 @@ public:
|
||||
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
|
||||
std::vector<const RimFishboneWellPath*> wellPaths() const;
|
||||
double holeRadius() const { return m_pipeProperties->holeRadius(); }
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user