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;
|
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.setFromFracture(trans, fracture->fractureTemplate()->skinFactor());
|
||||||
compDat.addMetadata(fracture->name(), QString::number(trans));
|
compDat.addMetadata(fracture->name(), QString::number(trans));
|
||||||
fractureCompletions.push_back(compDat);
|
fractureCompletions.push_back(compDat);
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::Vec3d lengthsInCell;
|
cvf::Vec3d lengthsInCell;
|
||||||
@@ -51,6 +53,9 @@ struct WellBorePartForTransCalc
|
|||||||
double skinFactor;
|
double skinFactor;
|
||||||
QString metaData;
|
QString metaData;
|
||||||
bool isMainBore;
|
bool isMainBore;
|
||||||
|
|
||||||
|
double intersectionWithWellMeasuredDepth;
|
||||||
|
size_t lateralIndex;
|
||||||
};
|
};
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -81,6 +86,9 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
|
|||||||
isMainBore,
|
isMainBore,
|
||||||
completionMetaData);
|
completionMetaData);
|
||||||
|
|
||||||
|
wellBorePart.intersectionWithWellMeasuredDepth = location.measuredDepth;
|
||||||
|
wellBorePart.lateralIndex = lateral.lateralIndex;
|
||||||
|
|
||||||
wellBorePartsInCells[intersection.globalCellIndex].push_back(wellBorePart);
|
wellBorePartsInCells[intersection.globalCellIndex].push_back(wellBorePart);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -135,7 +143,8 @@ std::vector<RigCompletionData> RicFishbonesTransmissibilityCalculationFeatureImp
|
|||||||
|
|
||||||
for (WellBorePartForTransCalc wellBorePart : wellBoreParts)
|
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;
|
double transmissibility = 0.0;
|
||||||
if (wellBorePart.isMainBore)
|
if (wellBorePart.isMainBore)
|
||||||
@@ -212,6 +221,8 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLate
|
|||||||
skinFactor,
|
skinFactor,
|
||||||
isMainBore,
|
isMainBore,
|
||||||
completionMetaData);
|
completionMetaData);
|
||||||
|
wellBorePart.intersectionWithWellMeasuredDepth = cell.startMD;
|
||||||
|
|
||||||
wellBorePartsInCells[cell.globCellIndex].push_back(wellBorePart);
|
wellBorePartsInCells[cell.globCellIndex].push_back(wellBorePart);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -249,6 +260,8 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findMainWellBoreParts(st
|
|||||||
isMainBore,
|
isMainBore,
|
||||||
completionMetaData);
|
completionMetaData);
|
||||||
|
|
||||||
|
wellBorePart.intersectionWithWellMeasuredDepth = cell.startMD;
|
||||||
|
|
||||||
wellBorePartsInCells[cell.globCellIndex].push_back(wellBorePart);
|
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;
|
double totalTrans = 0.0;
|
||||||
|
|
||||||
@@ -772,7 +773,8 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
|||||||
if (!cellIsActive) continue;
|
if (!cellIsActive) continue;
|
||||||
|
|
||||||
RigCompletionData completion(wellPath->completions()->wellNameForExport(),
|
RigCompletionData completion(wellPath->completions()->wellNameForExport(),
|
||||||
RigCompletionDataGridCell(cell.globCellIndex, settings.caseToApply->mainGrid()));
|
RigCompletionDataGridCell(cell.globCellIndex, settings.caseToApply->mainGrid()),
|
||||||
|
cell.startMD);
|
||||||
|
|
||||||
CellDirection direction =
|
CellDirection direction =
|
||||||
calculateDirectionInCell(settings.caseToApply, cell.globCellIndex, cell.intersectionLengthsInCellCS);
|
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_wellName(wellName)
|
||||||
, m_cellIndex(cellIndex)
|
, m_cellIndex(cellIndex)
|
||||||
, m_saturation(HUGE_VAL)
|
, m_saturation(HUGE_VAL)
|
||||||
@@ -45,6 +45,8 @@ RigCompletionData::RigCompletionData(const QString wellName, const RigCompletion
|
|||||||
, m_isMainBore(false)
|
, m_isMainBore(false)
|
||||||
, m_readyForExport(false)
|
, m_readyForExport(false)
|
||||||
, m_completionType(CT_UNDEFINED)
|
, 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);
|
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;
|
return m_cellIndex < other.m_cellIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,6 +113,14 @@ void RigCompletionData::setFromFracture(double transmissibility, double skinFact
|
|||||||
m_skinFactor = skinFactor;
|
m_skinFactor = skinFactor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RigCompletionData::setSecondOrderingValue(double orderingValue)
|
||||||
|
{
|
||||||
|
m_secondOrderingValue = orderingValue;
|
||||||
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
@@ -300,6 +325,22 @@ bool RigCompletionData::readyForExport() const
|
|||||||
return m_readyForExport;
|
return m_readyForExport;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
double RigCompletionData::firstOrderingValue() const
|
||||||
|
{
|
||||||
|
return m_firstOrderingValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
double RigCompletionData::secondOrderingValue() const
|
||||||
|
{
|
||||||
|
return m_secondOrderingValue;
|
||||||
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
@@ -333,20 +374,22 @@ bool RigCompletionData::onlyOneIsDefaulted(double first, double second)
|
|||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
void RigCompletionData::copy(RigCompletionData& target, const RigCompletionData& from)
|
void RigCompletionData::copy(RigCompletionData& target, const RigCompletionData& from)
|
||||||
{
|
{
|
||||||
target.m_metadata = from.m_metadata;
|
target.m_metadata = from.m_metadata;
|
||||||
target.m_wellName = from.m_wellName;
|
target.m_wellName = from.m_wellName;
|
||||||
target.m_cellIndex = from.m_cellIndex;
|
target.m_cellIndex = from.m_cellIndex;
|
||||||
target.m_connectionState = from.m_connectionState;
|
target.m_connectionState = from.m_connectionState;
|
||||||
target.m_saturation = from.m_saturation;
|
target.m_saturation = from.m_saturation;
|
||||||
target.m_transmissibility = from.m_transmissibility;
|
target.m_transmissibility = from.m_transmissibility;
|
||||||
target.m_diameter = from.m_diameter;
|
target.m_diameter = from.m_diameter;
|
||||||
target.m_kh = from.m_kh;
|
target.m_kh = from.m_kh;
|
||||||
target.m_skinFactor = from.m_skinFactor;
|
target.m_skinFactor = from.m_skinFactor;
|
||||||
target.m_dFactor = from.m_dFactor;
|
target.m_dFactor = from.m_dFactor;
|
||||||
target.m_direction = from.m_direction;
|
target.m_direction = from.m_direction;
|
||||||
target.m_isMainBore = from.m_isMainBore;
|
target.m_isMainBore = from.m_isMainBore;
|
||||||
target.m_readyForExport = from.m_readyForExport;
|
target.m_readyForExport = from.m_readyForExport;
|
||||||
target.m_count = from.m_count;
|
target.m_count = from.m_count;
|
||||||
target.m_wpimult = from.m_wpimult;
|
target.m_wpimult = from.m_wpimult;
|
||||||
target.m_completionType = from.m_completionType;
|
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
|
CT_UNDEFINED
|
||||||
};
|
};
|
||||||
|
|
||||||
RigCompletionData(const QString wellName, const RigCompletionDataGridCell& cellIndex);
|
RigCompletionData(const QString wellName, const RigCompletionDataGridCell& cellIndex, double orderingValue);
|
||||||
~RigCompletionData();
|
~RigCompletionData();
|
||||||
RigCompletionData(const RigCompletionData& other);
|
RigCompletionData(const RigCompletionData& other);
|
||||||
|
|
||||||
@@ -76,6 +76,7 @@ public:
|
|||||||
RigCompletionData& operator=(const RigCompletionData& other);
|
RigCompletionData& operator=(const RigCompletionData& other);
|
||||||
|
|
||||||
void setFromFracture(double transmissibility, double skinFactor);
|
void setFromFracture(double transmissibility, double skinFactor);
|
||||||
|
void setSecondOrderingValue(double orderingValue);
|
||||||
|
|
||||||
void setTransAndWPImultBackgroundDataFromFishbone(double transmissibility,
|
void setTransAndWPImultBackgroundDataFromFishbone(double transmissibility,
|
||||||
double skinFactor,
|
double skinFactor,
|
||||||
@@ -116,6 +117,9 @@ public:
|
|||||||
bool isMainBore() const;
|
bool isMainBore() const;
|
||||||
bool readyForExport() const;
|
bool readyForExport() const;
|
||||||
|
|
||||||
|
double firstOrderingValue() const;
|
||||||
|
double secondOrderingValue() const;
|
||||||
|
|
||||||
std::vector<RigCompletionMetaData> m_metadata;
|
std::vector<RigCompletionMetaData> m_metadata;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -138,6 +142,9 @@ private:
|
|||||||
|
|
||||||
CompletionType m_completionType;
|
CompletionType m_completionType;
|
||||||
|
|
||||||
|
double m_firstOrderingValue;
|
||||||
|
double m_secondOrderingValue;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static bool onlyOneIsDefaulted(double first, double second);
|
static bool onlyOneIsDefaulted(double first, double second);
|
||||||
static void copy(RigCompletionData& target, const RigCompletionData& from);
|
static void copy(RigCompletionData& target, const RigCompletionData& from);
|
||||||
|
|||||||
Reference in New Issue
Block a user