mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1968 Export Completions : Improve ordering
This commit is contained in:
@@ -348,7 +348,10 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
|
||||
eclCellIdxToTransPrFractureMap[externalCell.m_globalCellIdx][fracture] = trans;
|
||||
|
||||
RigCompletionData compDat(wellPathName, RigCompletionDataGridCell(externalCell.m_globalCellIdx, caseToApply->mainGrid()));
|
||||
RigCompletionData compDat(wellPathName,
|
||||
RigCompletionDataGridCell(externalCell.m_globalCellIdx, caseToApply->mainGrid()),
|
||||
fracture->fractureMD());
|
||||
|
||||
compDat.setFromFracture(trans, fracture->fractureTemplate()->skinFactor());
|
||||
compDat.addMetadata(fracture->name(), QString::number(trans));
|
||||
fractureCompletions.push_back(compDat);
|
||||
|
||||
@@ -44,6 +44,8 @@ struct WellBorePartForTransCalc
|
||||
WellBorePartForTransCalc(cvf::Vec3d lengthsInCell, double wellRadius, double skinFactor, bool isMainBore, QString metaData)
|
||||
: lengthsInCell(lengthsInCell), wellRadius(wellRadius), skinFactor(skinFactor), isMainBore(isMainBore), metaData(metaData)
|
||||
{
|
||||
intersectionWithWellMeasuredDepth = HUGE_VAL;
|
||||
lateralIndex = cvf::UNDEFINED_SIZE_T;
|
||||
}
|
||||
|
||||
cvf::Vec3d lengthsInCell;
|
||||
@@ -51,6 +53,9 @@ struct WellBorePartForTransCalc
|
||||
double skinFactor;
|
||||
QString metaData;
|
||||
bool isMainBore;
|
||||
|
||||
double intersectionWithWellMeasuredDepth;
|
||||
size_t lateralIndex;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -81,6 +86,9 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
|
||||
isMainBore,
|
||||
completionMetaData);
|
||||
|
||||
wellBorePart.intersectionWithWellMeasuredDepth = location.measuredDepth;
|
||||
wellBorePart.lateralIndex = lateral.lateralIndex;
|
||||
|
||||
wellBorePartsInCells[intersection.globalCellIndex].push_back(wellBorePart);
|
||||
|
||||
}
|
||||
@@ -135,7 +143,8 @@ std::vector<RigCompletionData> RicFishbonesTransmissibilityCalculationFeatureImp
|
||||
|
||||
for (WellBorePartForTransCalc wellBorePart : wellBoreParts)
|
||||
{
|
||||
RigCompletionData completion(wellPath->completions()->wellNameForExport(), RigCompletionDataGridCell(globalCellIndex, settings.caseToApply->mainGrid()));
|
||||
RigCompletionData completion(wellPath->completions()->wellNameForExport(), RigCompletionDataGridCell(globalCellIndex, settings.caseToApply->mainGrid()), wellBorePart.intersectionWithWellMeasuredDepth);
|
||||
completion.setSecondOrderingValue(wellBorePart.lateralIndex);
|
||||
|
||||
double transmissibility = 0.0;
|
||||
if (wellBorePart.isMainBore)
|
||||
@@ -212,6 +221,8 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLate
|
||||
skinFactor,
|
||||
isMainBore,
|
||||
completionMetaData);
|
||||
wellBorePart.intersectionWithWellMeasuredDepth = cell.startMD;
|
||||
|
||||
wellBorePartsInCells[cell.globCellIndex].push_back(wellBorePart);
|
||||
}
|
||||
}
|
||||
@@ -249,6 +260,8 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findMainWellBoreParts(st
|
||||
isMainBore,
|
||||
completionMetaData);
|
||||
|
||||
wellBorePart.intersectionWithWellMeasuredDepth = cell.startMD;
|
||||
|
||||
wellBorePartsInCells[cell.globCellIndex].push_back(wellBorePart);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -346,7 +346,8 @@ RigCompletionData
|
||||
}
|
||||
}
|
||||
|
||||
RigCompletionData resultCompletion(wellName, cellIndexIJK);
|
||||
RigCompletionData resultCompletion(wellName, cellIndexIJK, completions[0].firstOrderingValue());
|
||||
resultCompletion.setSecondOrderingValue(completions[0].secondOrderingValue());
|
||||
|
||||
double totalTrans = 0.0;
|
||||
|
||||
@@ -772,7 +773,8 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
||||
if (!cellIsActive) continue;
|
||||
|
||||
RigCompletionData completion(wellPath->completions()->wellNameForExport(),
|
||||
RigCompletionDataGridCell(cell.globCellIndex, settings.caseToApply->mainGrid()));
|
||||
RigCompletionDataGridCell(cell.globCellIndex, settings.caseToApply->mainGrid()),
|
||||
cell.startMD);
|
||||
|
||||
CellDirection direction =
|
||||
calculateDirectionInCell(settings.caseToApply, cell.globCellIndex, cell.intersectionLengthsInCellCS);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
RigCompletionData::RigCompletionData(const QString wellName, const RigCompletionDataGridCell& cellIndex)
|
||||
RigCompletionData::RigCompletionData(const QString wellName, const RigCompletionDataGridCell& cellIndex, double orderingValue)
|
||||
: m_wellName(wellName)
|
||||
, m_cellIndex(cellIndex)
|
||||
, m_saturation(HUGE_VAL)
|
||||
@@ -45,6 +45,8 @@ RigCompletionData::RigCompletionData(const QString wellName, const RigCompletion
|
||||
, m_isMainBore(false)
|
||||
, m_readyForExport(false)
|
||||
, m_completionType(CT_UNDEFINED)
|
||||
, m_firstOrderingValue(orderingValue)
|
||||
, m_secondOrderingValue(HUGE_VAL)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -71,6 +73,21 @@ bool RigCompletionData::operator<(const RigCompletionData& other) const
|
||||
return (m_wellName < other.m_wellName);
|
||||
}
|
||||
|
||||
if (m_completionType != other.m_completionType)
|
||||
{
|
||||
return (m_completionType < other.m_completionType);
|
||||
}
|
||||
|
||||
if (m_firstOrderingValue != other.m_firstOrderingValue)
|
||||
{
|
||||
return (m_firstOrderingValue < other.m_firstOrderingValue);
|
||||
}
|
||||
|
||||
if (m_secondOrderingValue != other.m_secondOrderingValue)
|
||||
{
|
||||
return (m_secondOrderingValue < other.m_secondOrderingValue);
|
||||
}
|
||||
|
||||
return m_cellIndex < other.m_cellIndex;
|
||||
}
|
||||
|
||||
@@ -96,6 +113,14 @@ void RigCompletionData::setFromFracture(double transmissibility, double skinFact
|
||||
m_skinFactor = skinFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigCompletionData::setSecondOrderingValue(double orderingValue)
|
||||
{
|
||||
m_secondOrderingValue = orderingValue;
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
@@ -300,6 +325,22 @@ bool RigCompletionData::readyForExport() const
|
||||
return m_readyForExport;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigCompletionData::firstOrderingValue() const
|
||||
{
|
||||
return m_firstOrderingValue;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigCompletionData::secondOrderingValue() const
|
||||
{
|
||||
return m_secondOrderingValue;
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
@@ -349,4 +390,6 @@ void RigCompletionData::copy(RigCompletionData& target, const RigCompletionData&
|
||||
target.m_count = from.m_count;
|
||||
target.m_wpimult = from.m_wpimult;
|
||||
target.m_completionType = from.m_completionType;
|
||||
target.m_firstOrderingValue = from.m_firstOrderingValue;
|
||||
target.m_secondOrderingValue = from.m_secondOrderingValue;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
CT_UNDEFINED
|
||||
};
|
||||
|
||||
RigCompletionData(const QString wellName, const RigCompletionDataGridCell& cellIndex);
|
||||
RigCompletionData(const QString wellName, const RigCompletionDataGridCell& cellIndex, double orderingValue);
|
||||
~RigCompletionData();
|
||||
RigCompletionData(const RigCompletionData& other);
|
||||
|
||||
@@ -76,6 +76,7 @@ public:
|
||||
RigCompletionData& operator=(const RigCompletionData& other);
|
||||
|
||||
void setFromFracture(double transmissibility, double skinFactor);
|
||||
void setSecondOrderingValue(double orderingValue);
|
||||
|
||||
void setTransAndWPImultBackgroundDataFromFishbone(double transmissibility,
|
||||
double skinFactor,
|
||||
@@ -116,6 +117,9 @@ public:
|
||||
bool isMainBore() const;
|
||||
bool readyForExport() const;
|
||||
|
||||
double firstOrderingValue() const;
|
||||
double secondOrderingValue() const;
|
||||
|
||||
std::vector<RigCompletionMetaData> m_metadata;
|
||||
|
||||
private:
|
||||
@@ -138,6 +142,9 @@ private:
|
||||
|
||||
CompletionType m_completionType;
|
||||
|
||||
double m_firstOrderingValue;
|
||||
double m_secondOrderingValue;
|
||||
|
||||
private:
|
||||
static bool onlyOneIsDefaulted(double first, double second);
|
||||
static void copy(RigCompletionData& target, const RigCompletionData& from);
|
||||
|
||||
Reference in New Issue
Block a user