mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3233, #3234 Multi segment well fracture: make lengths relative and implement along the well fractures.
This commit is contained in:
parent
e1c3c830cf
commit
5c635fa42d
@ -58,9 +58,9 @@ const cvf::Vec3d& RicWellSubSegmentCellIntersection::lengthsInCell() const
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicWellSubSegment::RicWellSubSegment(double startMD,
|
||||
double deltaMD,
|
||||
double startTVD,
|
||||
double deltaTVD)
|
||||
double deltaMD,
|
||||
double startTVD,
|
||||
double deltaTVD)
|
||||
: m_startMD(startMD)
|
||||
, m_deltaMD(deltaMD)
|
||||
, m_startTVD(startTVD)
|
||||
@ -162,9 +162,11 @@ std::vector<RicWellSubSegmentCellIntersection>& RicWellSubSegment::intersections
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicWellSegmentCompletion::RicWellSegmentCompletion(RigCompletionData::CompletionType completionType,
|
||||
const QString& label,
|
||||
size_t index /* = cvf::UNDEFINED_SIZE_T */,
|
||||
int branchNumber /*= 0*/)
|
||||
: m_completionType(completionType)
|
||||
, m_label(label)
|
||||
, m_index(index)
|
||||
, m_branchNumber(branchNumber)
|
||||
{
|
||||
@ -178,6 +180,14 @@ RigCompletionData::CompletionType RicWellSegmentCompletion::completionType() con
|
||||
return m_completionType;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const QString& RicWellSegmentCompletion::label() const
|
||||
{
|
||||
return m_label;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -229,14 +239,18 @@ const std::vector<RicWellSubSegment>& RicWellSegmentCompletion::subSegments() co
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicWellSegmentLocation::RicWellSegmentLocation(const QString& label,
|
||||
double measuredDepth,
|
||||
double trueVerticalDepth,
|
||||
size_t subIndex,
|
||||
int segmentNumber /*= -1*/)
|
||||
RicMswWellSegment::RicMswWellSegment(const QString& label,
|
||||
double startMD,
|
||||
double endMD,
|
||||
double startTVD,
|
||||
double endTVD,
|
||||
size_t subIndex,
|
||||
int segmentNumber /*= -1*/)
|
||||
: m_label(label)
|
||||
, m_measuredDepth(measuredDepth)
|
||||
, m_trueVerticalDepth(trueVerticalDepth)
|
||||
, m_startMD(startMD)
|
||||
, m_endMD(endMD)
|
||||
, m_startTVD(startTVD)
|
||||
, m_endTVD(endTVD)
|
||||
, m_effectiveDiameter(0.15)
|
||||
, m_holeDiameter(RicMultiSegmentWellExportInfo::defaultDoubleValue())
|
||||
, m_openHoleRoughnessFactor(5.0e-5)
|
||||
@ -251,7 +265,7 @@ RicWellSegmentLocation::RicWellSegmentLocation(const QString& label,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RicWellSegmentLocation::label() const
|
||||
QString RicMswWellSegment::label() const
|
||||
{
|
||||
return m_label;
|
||||
}
|
||||
@ -259,23 +273,55 @@ QString RicWellSegmentLocation::label() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::measuredDepth() const
|
||||
double RicMswWellSegment::startMD() const
|
||||
{
|
||||
return m_measuredDepth;
|
||||
return m_startMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::trueVerticalDepth() const
|
||||
double RicMswWellSegment::endMD() const
|
||||
{
|
||||
return m_trueVerticalDepth;
|
||||
return m_endMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::effectiveDiameter() const
|
||||
double RicMswWellSegment::deltaMD() const
|
||||
{
|
||||
return m_endMD - m_startMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswWellSegment::startTVD() const
|
||||
{
|
||||
return m_startTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswWellSegment::endTVD() const
|
||||
{
|
||||
return m_endTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswWellSegment::deltaTVD() const
|
||||
{
|
||||
return m_endTVD - m_startTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswWellSegment::effectiveDiameter() const
|
||||
{
|
||||
return m_effectiveDiameter;
|
||||
}
|
||||
@ -283,7 +329,7 @@ double RicWellSegmentLocation::effectiveDiameter() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::holeDiameter() const
|
||||
double RicMswWellSegment::holeDiameter() const
|
||||
{
|
||||
return m_holeDiameter;
|
||||
}
|
||||
@ -291,7 +337,7 @@ double RicWellSegmentLocation::holeDiameter() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::openHoleRoughnessFactor() const
|
||||
double RicMswWellSegment::openHoleRoughnessFactor() const
|
||||
{
|
||||
return m_openHoleRoughnessFactor;
|
||||
}
|
||||
@ -299,7 +345,7 @@ double RicWellSegmentLocation::openHoleRoughnessFactor() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::skinFactor() const
|
||||
double RicMswWellSegment::skinFactor() const
|
||||
{
|
||||
return m_skinFactor;
|
||||
}
|
||||
@ -307,7 +353,7 @@ double RicWellSegmentLocation::skinFactor() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::icdFlowCoefficient() const
|
||||
double RicMswWellSegment::icdFlowCoefficient() const
|
||||
{
|
||||
return m_icdFlowCoefficient;
|
||||
}
|
||||
@ -315,7 +361,7 @@ double RicWellSegmentLocation::icdFlowCoefficient() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::icdArea() const
|
||||
double RicMswWellSegment::icdArea() const
|
||||
{
|
||||
return m_icdArea;
|
||||
}
|
||||
@ -323,7 +369,7 @@ double RicWellSegmentLocation::icdArea() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RicWellSegmentLocation::subIndex() const
|
||||
size_t RicMswWellSegment::subIndex() const
|
||||
{
|
||||
return m_subIndex;
|
||||
}
|
||||
@ -331,7 +377,7 @@ size_t RicWellSegmentLocation::subIndex() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicWellSegmentLocation::segmentNumber() const
|
||||
int RicMswWellSegment::segmentNumber() const
|
||||
{
|
||||
return m_segmentNumber;
|
||||
}
|
||||
@ -339,7 +385,7 @@ int RicWellSegmentLocation::segmentNumber() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<RicWellSegmentCompletion>& RicWellSegmentLocation::completions() const
|
||||
const std::vector<RicWellSegmentCompletion>& RicMswWellSegment::completions() const
|
||||
{
|
||||
return m_completions;
|
||||
}
|
||||
@ -347,7 +393,7 @@ const std::vector<RicWellSegmentCompletion>& RicWellSegmentLocation::completions
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RicWellSegmentCompletion>& RicWellSegmentLocation::completions()
|
||||
std::vector<RicWellSegmentCompletion>& RicMswWellSegment::completions()
|
||||
{
|
||||
return m_completions;
|
||||
}
|
||||
@ -355,7 +401,7 @@ std::vector<RicWellSegmentCompletion>& RicWellSegmentLocation::completions()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setEffectiveDiameter(double effectiveDiameter)
|
||||
void RicMswWellSegment::setEffectiveDiameter(double effectiveDiameter)
|
||||
{
|
||||
m_effectiveDiameter = effectiveDiameter;
|
||||
}
|
||||
@ -363,7 +409,7 @@ void RicWellSegmentLocation::setEffectiveDiameter(double effectiveDiameter)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setHoleDiameter(double holeDiameter)
|
||||
void RicMswWellSegment::setHoleDiameter(double holeDiameter)
|
||||
{
|
||||
m_holeDiameter = holeDiameter;
|
||||
}
|
||||
@ -371,7 +417,7 @@ void RicWellSegmentLocation::setHoleDiameter(double holeDiameter)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setOpenHoleRoughnessFactor(double roughnessFactor)
|
||||
void RicMswWellSegment::setOpenHoleRoughnessFactor(double roughnessFactor)
|
||||
{
|
||||
m_openHoleRoughnessFactor = roughnessFactor;
|
||||
}
|
||||
@ -379,7 +425,7 @@ void RicWellSegmentLocation::setOpenHoleRoughnessFactor(double roughnessFactor)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setSkinFactor(double skinFactor)
|
||||
void RicMswWellSegment::setSkinFactor(double skinFactor)
|
||||
{
|
||||
m_skinFactor = skinFactor;
|
||||
}
|
||||
@ -387,7 +433,7 @@ void RicWellSegmentLocation::setSkinFactor(double skinFactor)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setIcdFlowCoefficient(double icdFlowCoefficient)
|
||||
void RicMswWellSegment::setIcdFlowCoefficient(double icdFlowCoefficient)
|
||||
{
|
||||
m_icdFlowCoefficient = icdFlowCoefficient;
|
||||
}
|
||||
@ -395,7 +441,7 @@ void RicWellSegmentLocation::setIcdFlowCoefficient(double icdFlowCoefficient)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setIcdArea(double icdArea)
|
||||
void RicMswWellSegment::setIcdArea(double icdArea)
|
||||
{
|
||||
m_icdArea = icdArea;
|
||||
}
|
||||
@ -403,7 +449,7 @@ void RicWellSegmentLocation::setIcdArea(double icdArea)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setSegmentNumber(int segmentNumber)
|
||||
void RicMswWellSegment::setSegmentNumber(int segmentNumber)
|
||||
{
|
||||
m_segmentNumber = segmentNumber;
|
||||
}
|
||||
@ -411,7 +457,7 @@ void RicWellSegmentLocation::setSegmentNumber(int segmentNumber)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::addCompletion(const RicWellSegmentCompletion& completion)
|
||||
void RicMswWellSegment::addCompletion(const RicWellSegmentCompletion& completion)
|
||||
{
|
||||
m_completions.push_back(completion);
|
||||
}
|
||||
@ -419,9 +465,9 @@ void RicWellSegmentLocation::addCompletion(const RicWellSegmentCompletion& compl
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicWellSegmentLocation::operator<(const RicWellSegmentLocation& rhs) const
|
||||
bool RicMswWellSegment::operator<(const RicMswWellSegment& rhs) const
|
||||
{
|
||||
return measuredDepth() < rhs.measuredDepth();
|
||||
return startMD() < rhs.startMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -479,7 +525,7 @@ void RicMultiSegmentWellExportInfo::setHasSubGridIntersections(bool subGridInter
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMultiSegmentWellExportInfo::addWellSegmentLocation(const RicWellSegmentLocation& location)
|
||||
void RicMultiSegmentWellExportInfo::addWellSegmentLocation(const RicMswWellSegment& location)
|
||||
{
|
||||
m_wellSegmentLocations.push_back(location);
|
||||
}
|
||||
@ -583,7 +629,7 @@ double RicMultiSegmentWellExportInfo::defaultDoubleValue()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<RicWellSegmentLocation>& RicMultiSegmentWellExportInfo::wellSegmentLocations() const
|
||||
const std::vector<RicMswWellSegment>& RicMultiSegmentWellExportInfo::wellSegmentLocations() const
|
||||
{
|
||||
return m_wellSegmentLocations;
|
||||
}
|
||||
@ -591,7 +637,7 @@ const std::vector<RicWellSegmentLocation>& RicMultiSegmentWellExportInfo::wellSe
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RicWellSegmentLocation>& RicMultiSegmentWellExportInfo::wellSegmentLocations()
|
||||
std::vector<RicMswWellSegment>& RicMultiSegmentWellExportInfo::wellSegmentLocations()
|
||||
{
|
||||
return m_wellSegmentLocations;
|
||||
}
|
||||
|
@ -58,9 +58,9 @@ class RicWellSubSegment
|
||||
{
|
||||
public:
|
||||
RicWellSubSegment(double startMD,
|
||||
double deltaMD,
|
||||
double startTVD,
|
||||
double deltaTVD);
|
||||
double deltaMD,
|
||||
double startTVD,
|
||||
double deltaTVD);
|
||||
|
||||
double startMD() const;
|
||||
double deltaMD() const;
|
||||
@ -95,39 +95,50 @@ private:
|
||||
class RicWellSegmentCompletion
|
||||
{
|
||||
public:
|
||||
RicWellSegmentCompletion(RigCompletionData::CompletionType completionType, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT);
|
||||
RicWellSegmentCompletion(RigCompletionData::CompletionType completionType, const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT);
|
||||
|
||||
RigCompletionData::CompletionType completionType() const;
|
||||
const QString& label() const;
|
||||
size_t index() const;
|
||||
int branchNumber() const;
|
||||
void setBranchNumber(int branchNumber);
|
||||
|
||||
void addSubSegment(const RicWellSubSegment& subSegment);
|
||||
std::vector<RicWellSubSegment>& subSegments();
|
||||
const std::vector<RicWellSubSegment>& subSegments() const;
|
||||
|
||||
std::vector<RicWellSubSegment>& subSegments();
|
||||
const std::vector<RicWellSubSegment>& subSegments() const;
|
||||
|
||||
private:
|
||||
RigCompletionData::CompletionType m_completionType;
|
||||
QString m_label;
|
||||
size_t m_index;
|
||||
int m_branchNumber;
|
||||
std::vector<RicWellSubSegment> m_subSegments;
|
||||
std::vector<RicWellSubSegment> m_subSegments;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicWellSegmentLocation
|
||||
class RicMswWellSegment
|
||||
{
|
||||
public:
|
||||
RicWellSegmentLocation(const QString& label,
|
||||
double measuredDepth,
|
||||
double trueVerticalDepth,
|
||||
size_t subIndex = cvf::UNDEFINED_SIZE_T,
|
||||
int segmentNumber = -1);
|
||||
RicMswWellSegment(const QString& label,
|
||||
double startMD,
|
||||
double endMD,
|
||||
double startTVD,
|
||||
double endTVD,
|
||||
size_t subIndex = cvf::UNDEFINED_SIZE_T,
|
||||
int segmentNumber = -1);
|
||||
|
||||
QString label() const;
|
||||
double measuredDepth() const;
|
||||
double trueVerticalDepth() const;
|
||||
|
||||
double startMD() const;
|
||||
double endMD() const;
|
||||
double deltaMD() const;
|
||||
double startTVD() const;
|
||||
double endTVD() const;
|
||||
double deltaTVD() const;
|
||||
|
||||
double effectiveDiameter() const;
|
||||
double holeDiameter() const;
|
||||
double openHoleRoughnessFactor() const;
|
||||
@ -150,12 +161,14 @@ public:
|
||||
void setSegmentNumber(int segmentNumber);
|
||||
void addCompletion(const RicWellSegmentCompletion& completion);
|
||||
|
||||
bool operator<(const RicWellSegmentLocation& rhs) const;
|
||||
bool operator<(const RicMswWellSegment& rhs) const;
|
||||
|
||||
private:
|
||||
QString m_label;
|
||||
double m_measuredDepth;
|
||||
double m_trueVerticalDepth;
|
||||
double m_startMD;
|
||||
double m_endMD;
|
||||
double m_startTVD;
|
||||
double m_endTVD;
|
||||
double m_effectiveDiameter;
|
||||
double m_holeDiameter;
|
||||
double m_linerDiameter;
|
||||
@ -184,7 +197,7 @@ public:
|
||||
void setRoughnessFactor(double roughnessFactor);
|
||||
void setHasSubGridIntersections(bool subGridIntersections);
|
||||
|
||||
void addWellSegmentLocation(const RicWellSegmentLocation& location);
|
||||
void addWellSegmentLocation(const RicMswWellSegment& location);
|
||||
void sortLocations();
|
||||
|
||||
const RimWellPath* wellPath() const;
|
||||
@ -199,8 +212,8 @@ public:
|
||||
bool hasSubGridIntersections() const;
|
||||
static double defaultDoubleValue();
|
||||
|
||||
const std::vector<RicWellSegmentLocation>& wellSegmentLocations() const;
|
||||
std::vector<RicWellSegmentLocation>& wellSegmentLocations();
|
||||
const std::vector<RicMswWellSegment>& wellSegmentLocations() const;
|
||||
std::vector<RicMswWellSegment>& wellSegmentLocations();
|
||||
|
||||
private:
|
||||
const RimWellPath* m_wellPath;
|
||||
@ -213,6 +226,6 @@ private:
|
||||
QString m_pressureDropText;
|
||||
bool m_hasSubGridIntersections;
|
||||
|
||||
std::vector<RicWellSegmentLocation> m_wellSegmentLocations;
|
||||
std::vector<RicMswWellSegment> m_wellSegmentLocations;
|
||||
};
|
||||
|
||||
|
@ -449,24 +449,22 @@ void RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(RifEclipse
|
||||
{
|
||||
formatter.comment("Main stem");
|
||||
|
||||
double depth = 0;
|
||||
double length = 0;
|
||||
double previousMD = startMD;
|
||||
double previousTVD = startTVD;
|
||||
|
||||
for (const RicWellSegmentLocation& location : exportInfo.wellSegmentLocations())
|
||||
for (const RicMswWellSegment& location : exportInfo.wellSegmentLocations())
|
||||
{
|
||||
double depth = 0;
|
||||
double length = 0;
|
||||
|
||||
if (exportInfo.lengthAndDepthText() == QString("INC"))
|
||||
{
|
||||
depth = location.trueVerticalDepth() - previousTVD;
|
||||
length = location.measuredDepth() - previousMD;
|
||||
depth = location.deltaTVD();
|
||||
length = location.deltaMD();
|
||||
}
|
||||
else
|
||||
{
|
||||
depth += location.trueVerticalDepth() - previousTVD;
|
||||
length += location.measuredDepth() - previousMD;
|
||||
depth = location.endTVD();
|
||||
length = location.endMD();
|
||||
}
|
||||
QString comment = QString("Segment for %1").arg(location.label());
|
||||
QString comment = location.label();
|
||||
if (location.subIndex() != cvf::UNDEFINED_SIZE_T)
|
||||
{
|
||||
comment += QString(", sub %1").arg(location.subIndex());
|
||||
@ -480,9 +478,6 @@ void RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(RifEclipse
|
||||
formatter.add(exportInfo.linerDiameter());
|
||||
formatter.add(exportInfo.roughnessFactor());
|
||||
formatter.rowCompleted();
|
||||
|
||||
previousMD = location.measuredDepth();
|
||||
previousTVD = location.trueVerticalDepth();
|
||||
}
|
||||
}
|
||||
|
||||
@ -490,7 +485,7 @@ void RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(RifEclipse
|
||||
formatter.comment("Laterals");
|
||||
formatter.comment("Diam: MSW - Tubing Radius");
|
||||
formatter.comment("Rough: MSW - Open Hole Roughness Factor");
|
||||
for (const RicWellSegmentLocation& location : exportInfo.wellSegmentLocations())
|
||||
for (const RicMswWellSegment& location : exportInfo.wellSegmentLocations())
|
||||
{
|
||||
if (location.completions().empty())
|
||||
{
|
||||
@ -501,7 +496,7 @@ void RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(RifEclipse
|
||||
{
|
||||
if (completion.completionType() == RigCompletionData::ICD) // Found ICD
|
||||
{
|
||||
formatter.comment("ICD");
|
||||
formatter.comment(completion.label());
|
||||
formatter.add(completion.subSegments().front().segmentNumber());
|
||||
formatter.add(completion.subSegments().front().segmentNumber());
|
||||
formatter.add(completion.branchNumber());
|
||||
@ -515,14 +510,14 @@ void RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(RifEclipse
|
||||
else {
|
||||
if (completion.completionType() == RigCompletionData::FISHBONES)
|
||||
{
|
||||
formatter.comment(QString("%1 : Sub index %2 - Lateral %3")
|
||||
formatter.comment(QString("%1 : Sub index %2 - %3")
|
||||
.arg(location.label())
|
||||
.arg(location.subIndex())
|
||||
.arg(completion.index()));
|
||||
.arg(completion.label()));
|
||||
}
|
||||
else if (completion.completionType() == RigCompletionData::FRACTURE)
|
||||
{
|
||||
formatter.comment(QString("%1").arg(location.label()));
|
||||
formatter.comment(QString("%1 connected to %2").arg(completion.label()).arg(location.label()));
|
||||
}
|
||||
for (const RicWellSubSegment& subSegment : completion.subSegments())
|
||||
{
|
||||
@ -613,22 +608,25 @@ void RicWellPathExportCompletionDataFeatureImpl::generateCompsegTable(RifEclipse
|
||||
formatter.header(allHeaders);
|
||||
}
|
||||
|
||||
for (const RicWellSegmentLocation& location : exportInfo.wellSegmentLocations())
|
||||
for (const RicMswWellSegment& location : exportInfo.wellSegmentLocations())
|
||||
{
|
||||
double startMD = location.startMD();
|
||||
|
||||
for (const RicWellSegmentCompletion& completion : location.completions())
|
||||
{
|
||||
double aggregatedLength = 0;
|
||||
if (completion.completionType() == RigCompletionData::FRACTURE)
|
||||
{
|
||||
aggregatedLength = location.measuredDepth();
|
||||
}
|
||||
for (const RicWellSubSegment& segment : completion.subSegments())
|
||||
{
|
||||
if (completion.completionType() == RigCompletionData::ICD)
|
||||
{
|
||||
startMD = segment.startMD();
|
||||
}
|
||||
|
||||
for (const RicWellSubSegmentCellIntersection& intersection : segment.intersections())
|
||||
{
|
||||
bool isSubGridIntersection = !intersection.gridName().isEmpty();
|
||||
if (isSubGridIntersection == exportSubGridIntersections)
|
||||
{
|
||||
double relativeStartLength = segment.startMD() - startMD;
|
||||
if (exportSubGridIntersections)
|
||||
{
|
||||
formatter.add(intersection.gridName());
|
||||
@ -636,14 +634,10 @@ void RicWellPathExportCompletionDataFeatureImpl::generateCompsegTable(RifEclipse
|
||||
cvf::Vec3st ijk = intersection.gridLocalCellIJK();
|
||||
formatter.addZeroBasedCellIndex(ijk.x()).addZeroBasedCellIndex(ijk.y()).addZeroBasedCellIndex(ijk.z());
|
||||
formatter.add(completion.branchNumber());
|
||||
formatter.add(aggregatedLength);
|
||||
formatter.add(aggregatedLength + segment.deltaMD());
|
||||
formatter.add(relativeStartLength);
|
||||
formatter.add(relativeStartLength + segment.deltaMD());
|
||||
formatter.rowCompleted();
|
||||
}
|
||||
if (completion.completionType() == RigCompletionData::FISHBONES)
|
||||
{
|
||||
aggregatedLength += segment.deltaMD();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -668,7 +662,7 @@ void RicWellPathExportCompletionDataFeatureImpl::generateWsegvalvTable(RifEclips
|
||||
};
|
||||
formatter.header(header);
|
||||
}
|
||||
for (const RicWellSegmentLocation& location : exportInfo.wellSegmentLocations())
|
||||
for (const RicMswWellSegment& location : exportInfo.wellSegmentLocations())
|
||||
{
|
||||
for (const RicWellSegmentCompletion& completion : location.completions())
|
||||
{
|
||||
@ -1259,15 +1253,19 @@ RicMultiSegmentWellExportInfo RicWellPathExportCompletionDataFeatureImpl::genera
|
||||
exportInfo.setRoughnessFactor(wellPath->fishbonesCollection()->roughnessFactor(unitSystem));
|
||||
|
||||
bool foundSubGridIntersections = false;
|
||||
double startMD = wellPath->fishbonesCollection()->startMD();
|
||||
for (RimFishbonesMultipleSubs* subs : fishbonesSubs)
|
||||
{
|
||||
for (auto& sub : subs->installedLateralIndices())
|
||||
{
|
||||
double measuredDepth = subs->measuredDepth(sub.subIndex);
|
||||
cvf::Vec3d position = wellPath->wellPathGeometry()->interpolatedPointAlongWellPath(measuredDepth);
|
||||
double endMD = subs->measuredDepth(sub.subIndex);
|
||||
cvf::Vec3d position = wellPath->wellPathGeometry()->interpolatedPointAlongWellPath(startMD);
|
||||
cvf::Vec3d endPosition = wellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD);
|
||||
double startTVD = -position.z();
|
||||
double endTVD = -endPosition.z();
|
||||
|
||||
RicWellSegmentLocation location =
|
||||
RicWellSegmentLocation(subs->generatedName(), measuredDepth, -position.z(), sub.subIndex);
|
||||
RicMswWellSegment location =
|
||||
RicMswWellSegment(subs->generatedName(), startMD, endMD, startTVD, endTVD, sub.subIndex);
|
||||
location.setEffectiveDiameter(subs->effectiveDiameter(unitSystem));
|
||||
location.setHoleDiameter(subs->holeDiameter(unitSystem));
|
||||
location.setOpenHoleRoughnessFactor(subs->openHoleRoughnessFactor(unitSystem));
|
||||
@ -1277,18 +1275,21 @@ RicMultiSegmentWellExportInfo RicWellPathExportCompletionDataFeatureImpl::genera
|
||||
location.setIcdArea(icdOrificeRadius * icdOrificeRadius * cvf::PI_D * subs->icdCount());
|
||||
|
||||
// Add completion for ICD
|
||||
RicWellSegmentCompletion icdCompletion(RigCompletionData::ICD);
|
||||
RicWellSubSegment icdSegment(measuredDepth, 0.1, -position.z(), 0.0);
|
||||
RicWellSegmentCompletion icdCompletion(RigCompletionData::ICD, QString("ICD"));
|
||||
RicWellSubSegment icdSegment(endMD, 0.1, -endPosition.z(), 0.0);
|
||||
icdCompletion.addSubSegment(icdSegment);
|
||||
location.addCompletion(icdCompletion);
|
||||
|
||||
for (size_t lateralIndex : sub.lateralIndices)
|
||||
{
|
||||
location.addCompletion(RicWellSegmentCompletion(RigCompletionData::FISHBONES, lateralIndex));
|
||||
QString label = QString("Lateral %1").arg(lateralIndex);
|
||||
location.addCompletion(RicWellSegmentCompletion(RigCompletionData::FISHBONES, label, lateralIndex));
|
||||
}
|
||||
assignFishbonesLateralIntersections(caseToApply, subs, &location, &foundSubGridIntersections);
|
||||
|
||||
exportInfo.addWellSegmentLocation(location);
|
||||
|
||||
startMD = endMD;
|
||||
}
|
||||
}
|
||||
exportInfo.setHasSubGridIntersections(foundSubGridIntersections);
|
||||
@ -1330,12 +1331,6 @@ RicMultiSegmentWellExportInfo RicWellPathExportCompletionDataFeatureImpl::genera
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = caseToApply->eclipseCaseData()->unitsType();
|
||||
|
||||
RicMultiSegmentWellExportInfo exportInfo(wellPath,
|
||||
unitSystem,
|
||||
0.0,
|
||||
QString("INC"),
|
||||
QString("HF-"));
|
||||
|
||||
const RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
const std::vector<cvf::Vec3d>& coords = wellPathGeometry->wellPathPoints();
|
||||
const std::vector<double>& mds = wellPathGeometry->measureDepths();
|
||||
@ -1345,8 +1340,18 @@ RicMultiSegmentWellExportInfo RicWellPathExportCompletionDataFeatureImpl::genera
|
||||
RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath(
|
||||
caseToApply->eclipseCaseData(), coords, mds);
|
||||
|
||||
double previousExitMD = mds.front();
|
||||
double previousExitTVD = -coords.front().z();
|
||||
double initialMD = mds.front();
|
||||
|
||||
if (!intersections.empty())
|
||||
{
|
||||
initialMD = intersections.front().startMD;
|
||||
}
|
||||
|
||||
RicMultiSegmentWellExportInfo exportInfo(wellPath,
|
||||
unitSystem,
|
||||
initialMD,
|
||||
QString("INC"),
|
||||
QString("HF-"));
|
||||
|
||||
bool foundSubGridIntersections = false;
|
||||
|
||||
@ -1354,6 +1359,9 @@ RicMultiSegmentWellExportInfo RicWellPathExportCompletionDataFeatureImpl::genera
|
||||
int mainBoreSegment = 0;
|
||||
for (const auto& cellIntInfo : intersections)
|
||||
{
|
||||
double startTVD = -cellIntInfo.startPoint.z();
|
||||
double endTVD = -cellIntInfo.endPoint.z();
|
||||
|
||||
size_t localGridIdx = 0u;
|
||||
const RigGridBase* localGrid = grid->gridAndGridLocalIdxFromGlobalCellIdx(cellIntInfo.globCellIndex, &localGridIdx);
|
||||
QString gridName;
|
||||
@ -1366,31 +1374,34 @@ RicMultiSegmentWellExportInfo RicWellPathExportCompletionDataFeatureImpl::genera
|
||||
size_t i = 0u, j = 0u, k = 0u;
|
||||
localGrid->ijkFromCellIndex(localGridIdx, &i, &j, &k);
|
||||
QString label = QString("Main stem segment %1").arg(++mainBoreSegment);
|
||||
RicWellSegmentLocation location(label, cellIntInfo.endMD, -cellIntInfo.endPoint.z());
|
||||
exportInfo.addWellSegmentLocation(location);
|
||||
RicMswWellSegment location(label, cellIntInfo.startMD, cellIntInfo.endMD, startTVD, endTVD);
|
||||
|
||||
previousExitMD = cellIntInfo.endMD;
|
||||
previousExitTVD = -cellIntInfo.endPoint.z();
|
||||
}
|
||||
// Check if fractures are to be assigned to current main bore segment
|
||||
for (RimWellPathFracture* fracture : fractures)
|
||||
{
|
||||
double fractureStartMD = fracture->fractureMD();
|
||||
if (fracture->fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
{
|
||||
double perforationLength = fracture->fractureTemplate()->perforationLength();
|
||||
fractureStartMD -= 0.5 * perforationLength;
|
||||
}
|
||||
|
||||
if (cvf::Math::valueInRange(fractureStartMD, cellIntInfo.startMD, cellIntInfo.endMD))
|
||||
{
|
||||
cvf::Vec3d position = wellPath->wellPathGeometry()->interpolatedPointAlongWellPath(fractureStartMD);
|
||||
|
||||
// Fractures
|
||||
for (RimWellPathFracture* fracture : fractures)
|
||||
{
|
||||
double measuredDepth = fracture->fractureMD();
|
||||
cvf::Vec3d position = wellPath->wellPathGeometry()->interpolatedPointAlongWellPath(measuredDepth);
|
||||
RicWellSegmentLocation location(fracture->name(), measuredDepth, -position.z(), 0);
|
||||
std::vector<RimFracture*> fractureVector(1, fracture);
|
||||
std::vector<RigCompletionData> completionData =
|
||||
RicExportFractureCompletionsImpl::generateCompdatValues(caseToApply,
|
||||
wellPath->completions()->wellNameForExport(),
|
||||
wellPath->wellPathGeometry(),
|
||||
fractureVector,
|
||||
nullptr,
|
||||
nullptr);
|
||||
|
||||
std::vector<RimFracture*> fractureVector(1, fracture);
|
||||
std::vector<RigCompletionData> completionData =
|
||||
RicExportFractureCompletionsImpl::generateCompdatValues(caseToApply,
|
||||
wellPath->completions()->wellNameForExport(),
|
||||
wellPath->wellPathGeometry(),
|
||||
fractureVector,
|
||||
nullptr,
|
||||
nullptr);
|
||||
|
||||
|
||||
assignFractureIntersections(caseToApply, fracture, completionData, &location, &foundSubGridIntersections);
|
||||
assignFractureIntersections(caseToApply, fracture, completionData, &location, &foundSubGridIntersections);
|
||||
}
|
||||
}
|
||||
|
||||
exportInfo.addWellSegmentLocation(location);
|
||||
}
|
||||
@ -1407,7 +1418,7 @@ RicMultiSegmentWellExportInfo RicWellPathExportCompletionDataFeatureImpl::genera
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeatureImpl::assignFishbonesLateralIntersections(const RimEclipseCase* caseToApply,
|
||||
const RimFishbonesMultipleSubs* fishbonesSubs,
|
||||
RicWellSegmentLocation* location,
|
||||
RicMswWellSegment* location,
|
||||
bool* foundSubGridIntersections)
|
||||
{
|
||||
CVF_ASSERT(foundSubGridIntersections != nullptr);
|
||||
@ -1461,14 +1472,14 @@ void RicWellPathExportCompletionDataFeatureImpl::assignFishbonesLateralIntersect
|
||||
size_t i = 0u, j = 0u, k = 0u;
|
||||
localGrid->ijkFromCellIndex(localGridIdx, &i, &j, &k);
|
||||
RicWellSubSegment subSegment (previousExitMD,
|
||||
cellIntInfo.endMD - previousExitMD,
|
||||
previousExitTVD,
|
||||
cellIntInfo.endPoint.z() - previousExitTVD);
|
||||
cellIntInfo.endMD - previousExitMD,
|
||||
previousExitTVD,
|
||||
cellIntInfo.endPoint.z() - previousExitTVD);
|
||||
|
||||
RicWellSubSegmentCellIntersection intersection(gridName,
|
||||
cellIntInfo.globCellIndex,
|
||||
cvf::Vec3st(i, j, k),
|
||||
cellIntInfo.intersectionLengthsInCellCS);
|
||||
cellIntInfo.globCellIndex,
|
||||
cvf::Vec3st(i, j, k),
|
||||
cellIntInfo.intersectionLengthsInCellCS);
|
||||
subSegment.addIntersection(intersection);
|
||||
completion.addSubSegment(subSegment);
|
||||
|
||||
@ -1484,18 +1495,28 @@ void RicWellPathExportCompletionDataFeatureImpl::assignFishbonesLateralIntersect
|
||||
void RicWellPathExportCompletionDataFeatureImpl::assignFractureIntersections(const RimEclipseCase* caseToApply,
|
||||
const RimWellPathFracture* fracture,
|
||||
const std::vector<RigCompletionData>& completionData,
|
||||
RicWellSegmentLocation* location,
|
||||
RicMswWellSegment* location,
|
||||
bool* foundSubGridIntersections)
|
||||
{
|
||||
CVF_ASSERT(foundSubGridIntersections != nullptr);
|
||||
const RigMainGrid* grid = caseToApply->eclipseCaseData()->mainGrid();
|
||||
|
||||
double fractureMD = fracture->fractureMD();
|
||||
RicWellSegmentCompletion fractureCompletion(RigCompletionData::FRACTURE);
|
||||
RicWellSubSegment subSegment(fracture->fractureMD(),
|
||||
fracture->fractureTemplate()->computeFractureWidth(fracture),
|
||||
0.0,
|
||||
0.0);
|
||||
RicWellSegmentCompletion fractureCompletion(RigCompletionData::FRACTURE, fracture->name());
|
||||
double position = fracture->fractureMD();
|
||||
double width = fracture->fractureTemplate()->computeFractureWidth(fracture);
|
||||
|
||||
if (fracture->fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
{
|
||||
double perforationLength = fracture->fractureTemplate()->perforationLength();
|
||||
position -= 0.5 * perforationLength;
|
||||
width = perforationLength;
|
||||
}
|
||||
|
||||
RicWellSubSegment subSegment(position,
|
||||
width,
|
||||
0.0,
|
||||
0.0);
|
||||
for (const RigCompletionData& compIntersection : completionData)
|
||||
{
|
||||
|
||||
@ -1503,9 +1524,9 @@ void RicWellPathExportCompletionDataFeatureImpl::assignFractureIntersections(con
|
||||
cvf::Vec3st localIJK(cell.localCellIndexI(), cell.localCellIndexJ(), cell.localCellIndexK());
|
||||
|
||||
RicWellSubSegmentCellIntersection intersection(cell.lgrName(),
|
||||
cell.globalCellIndex(),
|
||||
localIJK,
|
||||
cvf::Vec3d::ZERO);
|
||||
cell.globalCellIndex(),
|
||||
localIJK,
|
||||
cvf::Vec3d::ZERO);
|
||||
subSegment.addIntersection(intersection);
|
||||
}
|
||||
fractureCompletion.addSubSegment(subSegment);
|
||||
@ -1516,7 +1537,7 @@ void RicWellPathExportCompletionDataFeatureImpl::assignFractureIntersections(con
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeatureImpl::assignBranchAndSegmentNumbers(const RimEclipseCase* caseToApply,
|
||||
RicWellSegmentLocation* location,
|
||||
RicMswWellSegment* location,
|
||||
int* branchNum,
|
||||
int* segmentNum)
|
||||
{
|
||||
@ -1563,7 +1584,7 @@ void RicWellPathExportCompletionDataFeatureImpl::assignBranchAndSegmentNumbers(c
|
||||
int branchNumber = 1;
|
||||
|
||||
// First loop over the locations so that each segment on the main stem is an incremental number
|
||||
for (RicWellSegmentLocation& location : exportInfo->wellSegmentLocations())
|
||||
for (RicMswWellSegment& location : exportInfo->wellSegmentLocations())
|
||||
{
|
||||
location.setSegmentNumber(++segmentNumber);
|
||||
for (RicWellSegmentCompletion& completion : location.completions())
|
||||
@ -1577,7 +1598,7 @@ void RicWellPathExportCompletionDataFeatureImpl::assignBranchAndSegmentNumbers(c
|
||||
}
|
||||
|
||||
// Then assign branch and segment numbers to each completion sub segment
|
||||
for (RicWellSegmentLocation& location : exportInfo->wellSegmentLocations())
|
||||
for (RicMswWellSegment& location : exportInfo->wellSegmentLocations())
|
||||
{
|
||||
assignBranchAndSegmentNumbers(caseToApply, &location, &branchNumber, &segmentNumber);
|
||||
}
|
||||
|
@ -134,17 +134,17 @@ private:
|
||||
|
||||
static void assignFishbonesLateralIntersections(const RimEclipseCase* caseToApply,
|
||||
const RimFishbonesMultipleSubs* fishbonesSubs,
|
||||
RicWellSegmentLocation* location,
|
||||
RicMswWellSegment* location,
|
||||
bool* foundSubGridIntersections);
|
||||
|
||||
static void assignFractureIntersections(const RimEclipseCase* caseToApply,
|
||||
const RimWellPathFracture* fracture,
|
||||
const std::vector<RigCompletionData>& completionData,
|
||||
RicWellSegmentLocation* location,
|
||||
RicMswWellSegment* location,
|
||||
bool* foundSubGridIntersections);
|
||||
|
||||
static void assignBranchAndSegmentNumbers(const RimEclipseCase* caseToApply,
|
||||
RicWellSegmentLocation* location,
|
||||
RicMswWellSegment* location,
|
||||
int* branchNum,
|
||||
int* segmentNum);
|
||||
static void assignBranchAndSegmentNumbers(const RimEclipseCase* caseToApply,
|
||||
|
Loading…
Reference in New Issue
Block a user