mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-11 07:56:08 -06:00
#3198 Support LGR when exporting fishbone completions for multi segment wells.
* Also refactor RicMultiSegmentWellExportInfo to remove public member variables.
This commit is contained in:
parent
ffd545c75c
commit
2987e6128d
@ -184,11 +184,11 @@ void RicExportFishbonesWellSegmentsFeature::exportWellSegments(const RimWellPath
|
||||
return;
|
||||
}
|
||||
|
||||
RicMultiSegmentWellExportInfo exportInfo = RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMSWExportInfo(settings.caseToApply, wellPath, fishbonesSubs);
|
||||
RicMultiSegmentWellExportInfo exportInfo = RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMswExportInfo(settings.caseToApply, wellPath, fishbonesSubs);
|
||||
|
||||
QTextStream stream(&exportFile);
|
||||
RifEclipseDataTableFormatter formatter(stream);
|
||||
RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(formatter, exportInfo);
|
||||
RicWellPathExportCompletionDataFeatureImpl::generateCompsegsTable(formatter, exportInfo);
|
||||
RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable (formatter, exportInfo);
|
||||
RicWellPathExportCompletionDataFeatureImpl::generateCompsegTables(formatter, exportInfo);
|
||||
RicWellPathExportCompletionDataFeatureImpl::generateWsegvalvTable(formatter, exportInfo);
|
||||
}
|
||||
|
@ -69,29 +69,29 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
|
||||
|
||||
// Generate data
|
||||
const RigEclipseCaseData* caseData = settings.caseToApply()->eclipseCaseData();
|
||||
RicMultiSegmentWellExportInfo exportInfo = RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMSWExportInfo(settings.caseToApply(), wellPath);
|
||||
RicMultiSegmentWellExportInfo exportInfo = RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMswExportInfo(settings.caseToApply(), wellPath);
|
||||
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = caseData->unitsType();
|
||||
bool isMainBore = false;
|
||||
|
||||
for (const RicWellSegmentLocation& location : exportInfo.wellSegmentLocations())
|
||||
{
|
||||
for (const RicWellSegmentLateral& lateral : location.laterals)
|
||||
for (const RicWellSegmentLateral& lateral : location.laterals())
|
||||
{
|
||||
for (const RicWellSegmentLateralIntersection& intersection : lateral.intersections)
|
||||
for (const RicWellSegmentLateralIntersection& intersection : lateral.intersections())
|
||||
{
|
||||
double diameter = location.holeDiameter;
|
||||
QString completionMetaData = (location.label + QString(": Sub: %1 Lateral: %2").arg(location.subIndex).arg(lateral.lateralIndex));
|
||||
WellBorePartForTransCalc wellBorePart = WellBorePartForTransCalc(intersection.lengthsInCell,
|
||||
double diameter = location.holeDiameter();
|
||||
QString completionMetaData = (location.label() + QString(": Sub: %1 Lateral: %2").arg(location.subIndex()).arg(lateral.lateralIndex()));
|
||||
WellBorePartForTransCalc wellBorePart = WellBorePartForTransCalc(intersection.lengthsInCell(),
|
||||
diameter / 2,
|
||||
location.skinFactor,
|
||||
location.skinFactor(),
|
||||
isMainBore,
|
||||
completionMetaData);
|
||||
|
||||
wellBorePart.intersectionWithWellMeasuredDepth = location.measuredDepth;
|
||||
wellBorePart.lateralIndex = lateral.lateralIndex;
|
||||
wellBorePart.intersectionWithWellMeasuredDepth = location.measuredDepth();
|
||||
wellBorePart.lateralIndex = lateral.lateralIndex();
|
||||
|
||||
wellBorePartsInCells[intersection.globalCellIndex].push_back(wellBorePart);
|
||||
wellBorePartsInCells[intersection.gridLocalCellIndex()].push_back(wellBorePart);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -3,13 +3,453 @@
|
||||
#include "RigWellPath.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicWellSegmentLateralIntersection::RicWellSegmentLateralIntersection(const QString& gridName,
|
||||
size_t gridLocalCellIndex,
|
||||
const cvf::Vec3st& gridLocalCellIJK,
|
||||
double startMD,
|
||||
double deltaMD,
|
||||
double startTVD,
|
||||
double deltaTVD,
|
||||
const cvf::Vec3d& lengthsInCell)
|
||||
: m_gridName(gridName)
|
||||
, m_gridLocalCellIndex(gridLocalCellIndex)
|
||||
, m_gridLocalCellIJK(gridLocalCellIJK)
|
||||
, m_startMD(startMD)
|
||||
, m_deltaMD(deltaMD)
|
||||
, m_startTVD(startTVD)
|
||||
, m_deltaTVD(deltaTVD)
|
||||
, m_lengthsInCell(lengthsInCell)
|
||||
, m_segmentNumber(std::numeric_limits<int>::infinity())
|
||||
, m_attachedSegmentNumber(std::numeric_limits<int>::infinity())
|
||||
, m_mainBoreCell(false)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const QString& RicWellSegmentLateralIntersection::gridName() const
|
||||
{
|
||||
return m_gridName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RicWellSegmentLateralIntersection::gridLocalCellIndex() const
|
||||
{
|
||||
return m_gridLocalCellIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3st RicWellSegmentLateralIntersection::gridLocalCellIJK() const
|
||||
{
|
||||
return m_gridLocalCellIJK;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLateralIntersection::startMD() const
|
||||
{
|
||||
return m_startMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLateralIntersection::deltaMD() const
|
||||
{
|
||||
return m_deltaMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLateralIntersection::startTVD() const
|
||||
{
|
||||
return m_startTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLateralIntersection::deltaTVD() const
|
||||
{
|
||||
return m_deltaTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const cvf::Vec3d& RicWellSegmentLateralIntersection::lengthsInCell() const
|
||||
{
|
||||
return m_lengthsInCell;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicWellSegmentLateralIntersection::segmentNumber() const
|
||||
{
|
||||
return m_segmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicWellSegmentLateralIntersection::attachedSegmentNumber() const
|
||||
{
|
||||
return m_attachedSegmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicWellSegmentLateralIntersection::isMainBoreCell() const
|
||||
{
|
||||
return m_mainBoreCell;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLateralIntersection::setSegmentNumber(int segmentNumber)
|
||||
{
|
||||
m_segmentNumber = segmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLateralIntersection::setAttachedSegmentNumber(int attachedSegmentNumber)
|
||||
{
|
||||
m_attachedSegmentNumber = attachedSegmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLateralIntersection::setIsMainBoreCell(bool isMainBoreCell)
|
||||
{
|
||||
m_mainBoreCell = isMainBoreCell;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicWellSegmentLateral::RicWellSegmentLateral(size_t lateralIndex, int branchNumber /*= 0*/)
|
||||
: m_lateralIndex(lateralIndex)
|
||||
, m_branchNumber(branchNumber)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RicWellSegmentLateral::lateralIndex() const
|
||||
{
|
||||
return m_lateralIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicWellSegmentLateral::branchNumber() const
|
||||
{
|
||||
return m_branchNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLateral::setBranchNumber(int branchNumber)
|
||||
{
|
||||
m_branchNumber = branchNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLateral::addIntersection(const RicWellSegmentLateralIntersection& intersection)
|
||||
{
|
||||
m_intersections.push_back(intersection);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RicWellSegmentLateralIntersection>& RicWellSegmentLateral::intersections()
|
||||
{
|
||||
return m_intersections;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<RicWellSegmentLateralIntersection>& RicWellSegmentLateral::intersections() const
|
||||
{
|
||||
return m_intersections;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicWellSegmentLocation::RicWellSegmentLocation(const QString& label,
|
||||
double measuredDepth,
|
||||
double trueVerticalDepth,
|
||||
size_t subIndex,
|
||||
int segmentNumber /*= -1*/)
|
||||
: m_label(label)
|
||||
, m_measuredDepth(measuredDepth)
|
||||
, m_trueVerticalDepth(trueVerticalDepth)
|
||||
, m_effectiveDiameter(0.15)
|
||||
, m_holeDiameter(RicMultiSegmentWellExportInfo::defaultDoubleValue())
|
||||
, m_openHoleRoughnessFactor(5.0e-5)
|
||||
, m_skinFactor(RicMultiSegmentWellExportInfo::defaultDoubleValue())
|
||||
, m_icdFlowCoefficient(RicMultiSegmentWellExportInfo::defaultDoubleValue())
|
||||
, m_icdArea(RicMultiSegmentWellExportInfo::defaultDoubleValue())
|
||||
, m_subIndex(subIndex)
|
||||
, m_segmentNumber(segmentNumber)
|
||||
, m_icdBranchNumber(-1)
|
||||
, m_icdSegmentNumber(-1)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RicWellSegmentLocation::label() const
|
||||
{
|
||||
return m_label;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::measuredDepth() const
|
||||
{
|
||||
return m_measuredDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::trueVerticalDepth() const
|
||||
{
|
||||
return m_trueVerticalDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::effectiveDiameter() const
|
||||
{
|
||||
return m_effectiveDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::holeDiameter() const
|
||||
{
|
||||
return m_holeDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::openHoleRoughnessFactor() const
|
||||
{
|
||||
return m_openHoleRoughnessFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::skinFactor() const
|
||||
{
|
||||
return m_skinFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::icdFlowCoefficient() const
|
||||
{
|
||||
return m_icdFlowCoefficient;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicWellSegmentLocation::icdArea() const
|
||||
{
|
||||
return m_icdArea;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RicWellSegmentLocation::subIndex() const
|
||||
{
|
||||
return m_subIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicWellSegmentLocation::segmentNumber() const
|
||||
{
|
||||
return m_segmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicWellSegmentLocation::icdBranchNumber() const
|
||||
{
|
||||
return m_icdBranchNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicWellSegmentLocation::icdSegmentNumber() const
|
||||
{
|
||||
return m_icdSegmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<RicWellSegmentLateral>& RicWellSegmentLocation::laterals() const
|
||||
{
|
||||
return m_laterals;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RicWellSegmentLateral>& RicWellSegmentLocation::laterals()
|
||||
{
|
||||
return m_laterals;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setEffectiveDiameter(double effectiveDiameter)
|
||||
{
|
||||
m_effectiveDiameter = effectiveDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setHoleDiameter(double holeDiameter)
|
||||
{
|
||||
m_holeDiameter = holeDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setOpenHoleRoughnessFactor(double roughnessFactor)
|
||||
{
|
||||
m_openHoleRoughnessFactor = roughnessFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setSkinFactor(double skinFactor)
|
||||
{
|
||||
m_skinFactor = skinFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setIcdFlowCoefficient(double icdFlowCoefficient)
|
||||
{
|
||||
m_icdFlowCoefficient = icdFlowCoefficient;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setIcdArea(double icdArea)
|
||||
{
|
||||
m_icdArea = icdArea;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setSegmentNumber(int segmentNumber)
|
||||
{
|
||||
m_segmentNumber = segmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setIcdBranchNumber(int icdBranchNumber)
|
||||
{
|
||||
m_icdBranchNumber = icdBranchNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::setIcdSegmentNumber(int icdSegmentNumber)
|
||||
{
|
||||
m_icdSegmentNumber = icdSegmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellSegmentLocation::addLateral(const RicWellSegmentLateral& lateral)
|
||||
{
|
||||
m_laterals.push_back(lateral);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicWellSegmentLocation::operator<(const RicWellSegmentLocation& rhs) const
|
||||
{
|
||||
return measuredDepth < rhs.measuredDepth;
|
||||
return measuredDepth() < rhs.measuredDepth();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMultiSegmentWellExportInfo::RicMultiSegmentWellExportInfo(const RimWellPath* wellPath,
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem,
|
||||
double initialMD,
|
||||
const QString& lengthAndDepthText,
|
||||
const QString& pressureDropText)
|
||||
: m_wellPath(wellPath)
|
||||
, m_initialMD(initialMD)
|
||||
, m_unitSystem(unitSystem)
|
||||
, m_topWellBoreVolume(RicMultiSegmentWellExportInfo::defaultDoubleValue())
|
||||
, m_linerDiameter(0.15)
|
||||
, m_roughnessFactor(5.0e-5)
|
||||
, m_lengthAndDepthText(lengthAndDepthText)
|
||||
, m_pressureDropText(pressureDropText)
|
||||
, m_hasSubGridIntersections(false)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -36,6 +476,14 @@ void RicMultiSegmentWellExportInfo::setRoughnessFactor(double roughnessFactor)
|
||||
m_roughnessFactor = roughnessFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMultiSegmentWellExportInfo::setHasSubGridIntersections(bool subGridIntersections)
|
||||
{
|
||||
m_hasSubGridIntersections = subGridIntersections;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -124,6 +572,22 @@ QString RicMultiSegmentWellExportInfo::pressureDropText() const
|
||||
return m_pressureDropText;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicMultiSegmentWellExportInfo::hasSubGridIntersections() const
|
||||
{
|
||||
return m_hasSubGridIntersections;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMultiSegmentWellExportInfo::defaultDoubleValue()
|
||||
{
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -31,94 +31,132 @@ class RimFishbonesMultipleSubs;
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
struct RicWellSegmentLateralIntersection
|
||||
class RicWellSegmentLateralIntersection
|
||||
{
|
||||
RicWellSegmentLateralIntersection(size_t globalCellIndex,
|
||||
const cvf::Vec3st& cellIJK,
|
||||
double length,
|
||||
double depth,
|
||||
const cvf::Vec3d& lengthsInCell)
|
||||
: segmentNumber(std::numeric_limits<int>::infinity())
|
||||
, attachedSegmentNumber(std::numeric_limits<int>::infinity())
|
||||
, globalCellIndex(globalCellIndex)
|
||||
, cellIJK(cellIJK)
|
||||
, mdFromPreviousIntersection(length)
|
||||
, tvdChangeFromPreviousIntersection(depth)
|
||||
, lengthsInCell(lengthsInCell)
|
||||
, mainBoreCell(false)
|
||||
{
|
||||
}
|
||||
int segmentNumber;
|
||||
int attachedSegmentNumber;
|
||||
size_t globalCellIndex;
|
||||
cvf::Vec3st cellIJK;
|
||||
bool mainBoreCell;
|
||||
double mdFromPreviousIntersection;
|
||||
double tvdChangeFromPreviousIntersection;
|
||||
cvf::Vec3d lengthsInCell;
|
||||
public:
|
||||
RicWellSegmentLateralIntersection(const QString& gridName, // Pass in empty string for main grid
|
||||
size_t gridLocalCellIndex,
|
||||
const cvf::Vec3st& gridLocalCellIJK,
|
||||
double startMD,
|
||||
double deltaMD,
|
||||
double startTVD,
|
||||
double deltaTVD,
|
||||
const cvf::Vec3d& lengthsInCell);
|
||||
|
||||
const QString& gridName() const;
|
||||
size_t gridLocalCellIndex() const;
|
||||
cvf::Vec3st gridLocalCellIJK() const;
|
||||
double startMD() const;
|
||||
double deltaMD() const;
|
||||
double startTVD() const;
|
||||
double deltaTVD() const;
|
||||
const cvf::Vec3d& lengthsInCell() const;
|
||||
|
||||
int segmentNumber() const;
|
||||
int attachedSegmentNumber() const;
|
||||
bool isMainBoreCell() const;
|
||||
|
||||
void setSegmentNumber(int segmentNumber);
|
||||
void setAttachedSegmentNumber(int attachedSegmentNumber);
|
||||
void setIsMainBoreCell(bool isMainBoreCell);
|
||||
|
||||
private:
|
||||
QString m_gridName;
|
||||
size_t m_gridLocalCellIndex;
|
||||
cvf::Vec3st m_gridLocalCellIJK;
|
||||
double m_startMD;
|
||||
double m_deltaMD;
|
||||
double m_startTVD;
|
||||
double m_deltaTVD;
|
||||
cvf::Vec3d m_lengthsInCell;
|
||||
int m_segmentNumber;
|
||||
int m_attachedSegmentNumber;
|
||||
bool m_mainBoreCell;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
struct RicWellSegmentLateral
|
||||
class RicWellSegmentLateral
|
||||
{
|
||||
RicWellSegmentLateral(size_t lateralIndex)
|
||||
: lateralIndex(lateralIndex)
|
||||
, branchNumber(0)
|
||||
{
|
||||
}
|
||||
public:
|
||||
RicWellSegmentLateral(size_t lateralIndex, int branchNumber = 0);
|
||||
|
||||
size_t lateralIndex;
|
||||
int branchNumber;
|
||||
std::vector<RicWellSegmentLateralIntersection> intersections;
|
||||
size_t lateralIndex() const;
|
||||
int branchNumber() const;
|
||||
void setBranchNumber(int branchNumber);
|
||||
|
||||
void addIntersection(const RicWellSegmentLateralIntersection& intersection);
|
||||
std::vector<RicWellSegmentLateralIntersection>& intersections();
|
||||
const std::vector<RicWellSegmentLateralIntersection>& intersections() const;
|
||||
|
||||
private:
|
||||
size_t m_lateralIndex;
|
||||
int m_branchNumber;
|
||||
std::vector<RicWellSegmentLateralIntersection> m_intersections;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
struct RicWellSegmentLocation
|
||||
class RicWellSegmentLocation
|
||||
{
|
||||
public:
|
||||
RicWellSegmentLocation(const QString& label,
|
||||
double measuredDepth,
|
||||
double trueVerticalDepth,
|
||||
size_t subIndex,
|
||||
int segmentNumber = -1)
|
||||
: label(label)
|
||||
, measuredDepth(measuredDepth)
|
||||
, trueVerticalDepth(trueVerticalDepth)
|
||||
, effectiveDiameter(0.15)
|
||||
, holeDiameter(std::numeric_limits<double>::infinity())
|
||||
, openHoleRoughnessFactor(5.0e-5)
|
||||
, skinFactor(std::numeric_limits<double>::infinity())
|
||||
, icdFlowCoefficient(std::numeric_limits<double>::infinity())
|
||||
, icdArea(std::numeric_limits<double>::infinity())
|
||||
, subIndex(subIndex)
|
||||
, segmentNumber(segmentNumber)
|
||||
, icdBranchNumber(-1)
|
||||
, icdSegmentNumber(-1)
|
||||
{
|
||||
}
|
||||
int segmentNumber = -1);
|
||||
|
||||
QString label() const;
|
||||
double measuredDepth() const;
|
||||
double trueVerticalDepth() const;
|
||||
double effectiveDiameter() const;
|
||||
double holeDiameter() const;
|
||||
double openHoleRoughnessFactor() const;
|
||||
double skinFactor() const;
|
||||
double icdFlowCoefficient() const;
|
||||
double icdArea() const;
|
||||
|
||||
size_t subIndex() const;
|
||||
int segmentNumber() const;
|
||||
int icdBranchNumber() const;
|
||||
int icdSegmentNumber() const;
|
||||
|
||||
const std::vector<RicWellSegmentLateral>& laterals() const;
|
||||
std::vector<RicWellSegmentLateral>& laterals();
|
||||
|
||||
void setEffectiveDiameter(double effectiveDiameter);
|
||||
void setHoleDiameter(double holeDiameter);
|
||||
void setOpenHoleRoughnessFactor(double roughnessFactor);
|
||||
void setSkinFactor(double skinFactor);
|
||||
void setIcdFlowCoefficient(double icdFlowCoefficient);
|
||||
void setIcdArea(double icdArea);
|
||||
void setSegmentNumber(int segmentNumber);
|
||||
void setIcdBranchNumber(int icdBranchNumber);
|
||||
void setIcdSegmentNumber(int icdSegmentNumber);
|
||||
void addLateral(const RicWellSegmentLateral& lateral);
|
||||
|
||||
bool operator<(const RicWellSegmentLocation& rhs) const;
|
||||
|
||||
QString label;
|
||||
double measuredDepth;
|
||||
double trueVerticalDepth;
|
||||
double effectiveDiameter;
|
||||
double holeDiameter;
|
||||
double linerDiameter;
|
||||
double openHoleRoughnessFactor;
|
||||
double skinFactor;
|
||||
double icdFlowCoefficient;
|
||||
double icdArea;
|
||||
private:
|
||||
QString m_label;
|
||||
double m_measuredDepth;
|
||||
double m_trueVerticalDepth;
|
||||
double m_effectiveDiameter;
|
||||
double m_holeDiameter;
|
||||
double m_linerDiameter;
|
||||
double m_openHoleRoughnessFactor;
|
||||
double m_skinFactor;
|
||||
double m_icdFlowCoefficient;
|
||||
double m_icdArea;
|
||||
|
||||
size_t subIndex;
|
||||
int segmentNumber;
|
||||
int icdBranchNumber;
|
||||
int icdSegmentNumber;
|
||||
size_t m_subIndex;
|
||||
int m_segmentNumber;
|
||||
int m_icdBranchNumber;
|
||||
int m_icdSegmentNumber;
|
||||
|
||||
std::vector<RicWellSegmentLateral> laterals;
|
||||
std::vector<RicWellSegmentLateral> m_laterals;
|
||||
};
|
||||
|
||||
class RicMultiSegmentWellExportInfo
|
||||
@ -128,20 +166,13 @@ public:
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem,
|
||||
double initialMD,
|
||||
const QString& lengthAndDepthText,
|
||||
const QString& pressureDropText)
|
||||
: m_wellPath(wellPath)
|
||||
, m_initialMD(initialMD)
|
||||
, m_unitSystem(unitSystem)
|
||||
, m_topWellBoreVolume(std::numeric_limits<double>::infinity())
|
||||
, m_linerDiameter(0.15)
|
||||
, m_roughnessFactor(5.0e-5)
|
||||
, m_lengthAndDepthText(lengthAndDepthText)
|
||||
, m_pressureDropText(pressureDropText)
|
||||
{}
|
||||
|
||||
const QString& pressureDropText);
|
||||
|
||||
void setTopWellBoreVolume(double topWellBoreVolume);
|
||||
void setLinerDiameter(double linerDiameter);
|
||||
void setRoughnessFactor(double roughnessFactor);
|
||||
void setHasSubGridIntersections(bool subGridIntersections);
|
||||
|
||||
void addWellSegmentLocation(const RicWellSegmentLocation& location);
|
||||
void sortLocations();
|
||||
|
||||
@ -151,14 +182,16 @@ public:
|
||||
double initialTVD() const;
|
||||
double topWellBoreVolume() const;
|
||||
double linerDiameter() const;
|
||||
double roughnessFactor() const;
|
||||
double roughnessFactor() const;
|
||||
QString lengthAndDepthText() const;
|
||||
QString pressureDropText() const;
|
||||
bool hasSubGridIntersections() const;
|
||||
static double defaultDoubleValue();
|
||||
|
||||
const std::vector<RicWellSegmentLocation>& wellSegmentLocations() const;
|
||||
std::vector<RicWellSegmentLocation>& wellSegmentLocations();
|
||||
std::vector<RicWellSegmentLocation>& wellSegmentLocations();
|
||||
|
||||
protected:
|
||||
private:
|
||||
const RimWellPath* m_wellPath;
|
||||
RiaEclipseUnitTools::UnitSystem m_unitSystem;
|
||||
double m_initialMD;
|
||||
@ -167,6 +200,7 @@ protected:
|
||||
double m_roughnessFactor;
|
||||
QString m_lengthAndDepthText;
|
||||
QString m_pressureDropText;
|
||||
bool m_hasSubGridIntersections;
|
||||
|
||||
std::vector<RicWellSegmentLocation> m_wellSegmentLocations;
|
||||
};
|
||||
|
@ -422,7 +422,7 @@ void RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(RifEclipse
|
||||
formatter.add(exportInfo.wellPath()->name());
|
||||
formatter.add(startTVD);
|
||||
formatter.add(startMD);
|
||||
formatter.add(exportInfo.topWellBoreVolume());
|
||||
formatter.addValueOrDefaultMarker(exportInfo.topWellBoreVolume(), RicMultiSegmentWellExportInfo::defaultDoubleValue());
|
||||
formatter.add(exportInfo.lengthAndDepthText());
|
||||
formatter.add(exportInfo.pressureDropText());
|
||||
|
||||
@ -455,27 +455,27 @@ void RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(RifEclipse
|
||||
{
|
||||
if (exportInfo.lengthAndDepthText() == QString("INC"))
|
||||
{
|
||||
depth = location.trueVerticalDepth - previousTVD;
|
||||
length = location.measuredDepth - previousMD;
|
||||
depth = location.trueVerticalDepth() - previousTVD;
|
||||
length = location.measuredDepth() - previousMD;
|
||||
}
|
||||
else
|
||||
{
|
||||
depth += location.trueVerticalDepth - previousTVD;
|
||||
length += location.measuredDepth - previousMD;
|
||||
depth += location.trueVerticalDepth() - previousTVD;
|
||||
length += location.measuredDepth() - previousMD;
|
||||
}
|
||||
|
||||
formatter.comment(QString("Segment for sub %1").arg(location.subIndex));
|
||||
formatter.add(location.segmentNumber).add(location.segmentNumber);
|
||||
formatter.comment(QString("Segment for sub %1").arg(location.subIndex()));
|
||||
formatter.add(location.segmentNumber()).add(location.segmentNumber());
|
||||
formatter.add(1); // All segments on main stem are branch 1
|
||||
formatter.add(location.segmentNumber - 1); // All main stem segments are connected to the segment below them
|
||||
formatter.add(location.segmentNumber() - 1); // All main stem segments are connected to the segment below them
|
||||
formatter.add(length);
|
||||
formatter.add(depth);
|
||||
formatter.add(exportInfo.linerDiameter());
|
||||
formatter.add(exportInfo.roughnessFactor());
|
||||
formatter.rowCompleted();
|
||||
|
||||
previousMD = location.measuredDepth;
|
||||
previousTVD = location.trueVerticalDepth;
|
||||
previousMD = location.measuredDepth();
|
||||
previousTVD = location.trueVerticalDepth();
|
||||
}
|
||||
}
|
||||
|
||||
@ -486,46 +486,46 @@ void RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(RifEclipse
|
||||
for (const RicWellSegmentLocation& location : exportInfo.wellSegmentLocations())
|
||||
{
|
||||
formatter.comment("ICD");
|
||||
formatter.add(location.icdSegmentNumber).add(location.icdSegmentNumber);
|
||||
formatter.add(location.icdBranchNumber);
|
||||
formatter.add(location.segmentNumber);
|
||||
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(exportInfo.linerDiameter());
|
||||
formatter.add(exportInfo.roughnessFactor());
|
||||
formatter.rowCompleted();
|
||||
|
||||
for (const RicWellSegmentLateral& lateral : location.laterals)
|
||||
for (const RicWellSegmentLateral& lateral : location.laterals())
|
||||
{
|
||||
formatter.comment(QString("%1 : Sub index %2 - Lateral %3")
|
||||
.arg(location.label)
|
||||
.arg(location.subIndex)
|
||||
.arg(lateral.lateralIndex));
|
||||
.arg(location.label())
|
||||
.arg(location.subIndex())
|
||||
.arg(lateral.lateralIndex()));
|
||||
|
||||
double depth = 0;
|
||||
double length = 0;
|
||||
|
||||
for (const RicWellSegmentLateralIntersection& intersection : lateral.intersections)
|
||||
for (const RicWellSegmentLateralIntersection& intersection : lateral.intersections())
|
||||
{
|
||||
double depth = 0;
|
||||
double length = 0;
|
||||
|
||||
if (exportInfo.lengthAndDepthText() == QString("INC"))
|
||||
{
|
||||
depth = intersection.tvdChangeFromPreviousIntersection;
|
||||
length = intersection.mdFromPreviousIntersection;
|
||||
depth = intersection.deltaTVD();
|
||||
length = intersection.deltaMD();
|
||||
}
|
||||
else
|
||||
{
|
||||
depth += intersection.tvdChangeFromPreviousIntersection;
|
||||
length += intersection.mdFromPreviousIntersection;
|
||||
depth = intersection.startTVD() + intersection.deltaTVD();
|
||||
length = intersection.startMD() + intersection.deltaMD();
|
||||
}
|
||||
double diameter = location.effectiveDiameter;
|
||||
formatter.add(intersection.segmentNumber);
|
||||
formatter.add(intersection.segmentNumber);
|
||||
formatter.add(lateral.branchNumber);
|
||||
formatter.add(intersection.attachedSegmentNumber);
|
||||
double diameter = location.effectiveDiameter();
|
||||
formatter.add(intersection.segmentNumber());
|
||||
formatter.add(intersection.segmentNumber());
|
||||
formatter.add(lateral.branchNumber());
|
||||
formatter.add(intersection.attachedSegmentNumber());
|
||||
formatter.add(length);
|
||||
formatter.add(depth);
|
||||
formatter.add(diameter);
|
||||
formatter.add(location.openHoleRoughnessFactor);
|
||||
formatter.add(location.openHoleRoughnessFactor());
|
||||
formatter.rowCompleted();
|
||||
}
|
||||
}
|
||||
@ -538,10 +538,31 @@ void RicWellPathExportCompletionDataFeatureImpl::generateWelsegsTable(RifEclipse
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeatureImpl::generateCompsegsTable(RifEclipseDataTableFormatter& formatter,
|
||||
const RicMultiSegmentWellExportInfo& exportInfo)
|
||||
void RicWellPathExportCompletionDataFeatureImpl::generateCompsegTables(RifEclipseDataTableFormatter& formatter, const RicMultiSegmentWellExportInfo& exportInfo)
|
||||
{
|
||||
formatter.keyword("COMPSEGS");
|
||||
generateCompsegTable(formatter, exportInfo, false);
|
||||
if (exportInfo.hasSubGridIntersections())
|
||||
{
|
||||
generateCompsegTable(formatter, exportInfo, true);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeatureImpl::generateCompsegTable(RifEclipseDataTableFormatter& formatter,
|
||||
const RicMultiSegmentWellExportInfo& exportInfo,
|
||||
bool exportSubGridIntersections)
|
||||
{
|
||||
if (exportSubGridIntersections)
|
||||
{
|
||||
formatter.keyword("COMPSEGL");
|
||||
}
|
||||
else
|
||||
{
|
||||
formatter.keyword("COMPSEGS");
|
||||
}
|
||||
|
||||
{
|
||||
std::vector<RifEclipseOutputTableColumn> header = {RifEclipseOutputTableColumn("Name")};
|
||||
formatter.header(header);
|
||||
@ -550,33 +571,47 @@ void RicWellPathExportCompletionDataFeatureImpl::generateCompsegsTable(RifEclips
|
||||
}
|
||||
|
||||
{
|
||||
std::vector<RifEclipseOutputTableColumn> header = {RifEclipseOutputTableColumn("I"),
|
||||
RifEclipseOutputTableColumn("J"),
|
||||
RifEclipseOutputTableColumn("K"),
|
||||
RifEclipseOutputTableColumn("Branch no"),
|
||||
RifEclipseOutputTableColumn("Start Length"),
|
||||
RifEclipseOutputTableColumn("End Length"),
|
||||
RifEclipseOutputTableColumn("Dir Pen"),
|
||||
RifEclipseOutputTableColumn("End Range"),
|
||||
RifEclipseOutputTableColumn("Connection Depth")};
|
||||
formatter.header(header);
|
||||
std::vector<RifEclipseOutputTableColumn> allHeaders;
|
||||
if (exportSubGridIntersections)
|
||||
{
|
||||
allHeaders.push_back(RifEclipseOutputTableColumn("Grid"));
|
||||
}
|
||||
|
||||
std::vector<RifEclipseOutputTableColumn> commonHeaders = {RifEclipseOutputTableColumn("I"),
|
||||
RifEclipseOutputTableColumn("J"),
|
||||
RifEclipseOutputTableColumn("K"),
|
||||
RifEclipseOutputTableColumn("Branch no"),
|
||||
RifEclipseOutputTableColumn("Start Length"),
|
||||
RifEclipseOutputTableColumn("End Length"),
|
||||
RifEclipseOutputTableColumn("Dir Pen"),
|
||||
RifEclipseOutputTableColumn("End Range"),
|
||||
RifEclipseOutputTableColumn("Connection Depth")};
|
||||
allHeaders.insert(allHeaders.end(), commonHeaders.begin(), commonHeaders.end());
|
||||
formatter.header(allHeaders);
|
||||
}
|
||||
|
||||
for (const RicWellSegmentLocation& location : exportInfo.wellSegmentLocations())
|
||||
{
|
||||
for (const RicWellSegmentLateral& lateral : location.laterals)
|
||||
for (const RicWellSegmentLateral& lateral : location.laterals())
|
||||
{
|
||||
double aggregatedLength = 0;
|
||||
for (const RicWellSegmentLateralIntersection& intersection : lateral.intersections)
|
||||
for (const RicWellSegmentLateralIntersection& intersection : lateral.intersections())
|
||||
{
|
||||
cvf::Vec3st ijk = intersection.cellIJK;
|
||||
formatter.addZeroBasedCellIndex(ijk.x()).addZeroBasedCellIndex(ijk.y()).addZeroBasedCellIndex(ijk.z());
|
||||
formatter.add(lateral.branchNumber);
|
||||
formatter.add(aggregatedLength);
|
||||
formatter.add(aggregatedLength + intersection.mdFromPreviousIntersection);
|
||||
formatter.rowCompleted();
|
||||
|
||||
aggregatedLength += intersection.mdFromPreviousIntersection;
|
||||
bool isSubGridIntersection = !intersection.gridName().isEmpty();
|
||||
if (isSubGridIntersection == exportSubGridIntersections)
|
||||
{
|
||||
if (exportSubGridIntersections)
|
||||
{
|
||||
formatter.add(intersection.gridName());
|
||||
}
|
||||
cvf::Vec3st ijk = intersection.gridLocalCellIJK();
|
||||
formatter.addZeroBasedCellIndex(ijk.x()).addZeroBasedCellIndex(ijk.y()).addZeroBasedCellIndex(ijk.z());
|
||||
formatter.add(lateral.branchNumber());
|
||||
formatter.add(aggregatedLength);
|
||||
formatter.add(aggregatedLength + intersection.deltaMD());
|
||||
formatter.rowCompleted();
|
||||
}
|
||||
aggregatedLength += intersection.deltaMD();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -603,9 +638,9 @@ void RicWellPathExportCompletionDataFeatureImpl::generateWsegvalvTable(RifEclips
|
||||
for (const RicWellSegmentLocation& location : exportInfo.wellSegmentLocations())
|
||||
{
|
||||
formatter.add(exportInfo.wellPath()->name());
|
||||
formatter.add(location.icdSegmentNumber);
|
||||
formatter.add(location.icdFlowCoefficient);
|
||||
formatter.add(location.icdArea);
|
||||
formatter.add(location.icdSegmentNumber());
|
||||
formatter.add(location.icdFlowCoefficient());
|
||||
formatter.add(location.icdArea());
|
||||
formatter.rowCompleted();
|
||||
}
|
||||
formatter.tableCompleted();
|
||||
@ -976,30 +1011,14 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
|
||||
break;
|
||||
}
|
||||
|
||||
if (RigCompletionData::isDefaultValue(data.saturation()))
|
||||
formatter.add("1*");
|
||||
else
|
||||
formatter.add(data.saturation());
|
||||
formatter.addValueOrDefaultMarker(data.saturation(), RigCompletionData::defaultValue());
|
||||
|
||||
if (data.isNonDarcyFlow() || RigCompletionData::isDefaultValue(data.transmissibility()))
|
||||
{
|
||||
if (RigCompletionData::isDefaultValue(data.transmissibility()))
|
||||
formatter.add("1*");
|
||||
else
|
||||
formatter.add(data.transmissibility());
|
||||
|
||||
if (RigCompletionData::isDefaultValue(data.diameter()))
|
||||
formatter.add("1*");
|
||||
else
|
||||
formatter.add(data.diameter());
|
||||
if (RigCompletionData::isDefaultValue(data.kh()))
|
||||
formatter.add("1*");
|
||||
else
|
||||
formatter.add(data.kh());
|
||||
if (RigCompletionData::isDefaultValue(data.skinFactor()))
|
||||
formatter.add("1*");
|
||||
else
|
||||
formatter.add(data.skinFactor());
|
||||
formatter.addValueOrDefaultMarker(data.transmissibility(), RigCompletionData::defaultValue());
|
||||
formatter.addValueOrDefaultMarker(data.diameter(), RigCompletionData::defaultValue());
|
||||
formatter.addValueOrDefaultMarker(data.kh(), RigCompletionData::defaultValue());
|
||||
formatter.addValueOrDefaultMarker(data.skinFactor(), RigCompletionData::defaultValue());
|
||||
if (RigCompletionData::isDefaultValue(data.dFactor()))
|
||||
formatter.add("1*");
|
||||
else
|
||||
@ -1028,11 +1047,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
|
||||
// Based on feedback from Shunping for COMPDATL, hhgs required COMPDAT
|
||||
// Always include diameter
|
||||
// See https://github.com/OPM/ResInsight/issues/2517
|
||||
// See https://github.com/OPM/ResInsight/issues/2709
|
||||
if (RigCompletionData::isDefaultValue(data.diameter()))
|
||||
formatter.add("1*");
|
||||
else
|
||||
formatter.add(data.diameter());
|
||||
// See https://github.com/OPM/ResInsight/issues/2709
|
||||
formatter.addValueOrDefaultMarker(data.diameter(), RigCompletionData::defaultValue());
|
||||
}
|
||||
|
||||
formatter.rowCompleted();
|
||||
@ -1165,7 +1181,7 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMultiSegmentWellExportInfo
|
||||
RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMSWExportInfo(const RimEclipseCase* caseToApply,
|
||||
RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMswExportInfo(const RimEclipseCase* caseToApply,
|
||||
const RimWellPath* wellPath)
|
||||
{
|
||||
std::vector<RimFishbonesMultipleSubs*> fishbonesSubs;
|
||||
@ -1181,13 +1197,13 @@ RicMultiSegmentWellExportInfo
|
||||
}
|
||||
}
|
||||
|
||||
return generateFishbonesMSWExportInfo(caseToApply, wellPath, fishbonesSubs);
|
||||
return generateFishbonesMswExportInfo(caseToApply, wellPath, fishbonesSubs);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMultiSegmentWellExportInfo RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMSWExportInfo(
|
||||
RicMultiSegmentWellExportInfo RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMswExportInfo(
|
||||
const RimEclipseCase* caseToApply,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs)
|
||||
@ -1201,6 +1217,8 @@ RicMultiSegmentWellExportInfo RicWellPathExportCompletionDataFeatureImpl::genera
|
||||
wellPath->fishbonesCollection()->pressureDrop().text());
|
||||
exportInfo.setLinerDiameter(wellPath->fishbonesCollection()->linerDiameter(unitSystem));
|
||||
exportInfo.setRoughnessFactor(wellPath->fishbonesCollection()->roughnessFactor(unitSystem));
|
||||
|
||||
bool foundSubGridIntersections = false;
|
||||
for (RimFishbonesMultipleSubs* subs : fishbonesSubs)
|
||||
{
|
||||
for (auto& sub : subs->installedLateralIndices())
|
||||
@ -1210,23 +1228,24 @@ RicMultiSegmentWellExportInfo RicWellPathExportCompletionDataFeatureImpl::genera
|
||||
|
||||
RicWellSegmentLocation location =
|
||||
RicWellSegmentLocation(subs->generatedName(), measuredDepth, -position.z(), sub.subIndex);
|
||||
location.effectiveDiameter = subs->effectiveDiameter(unitSystem);
|
||||
location.holeDiameter = subs->holeDiameter(unitSystem);
|
||||
location.openHoleRoughnessFactor = subs->openHoleRoughnessFactor(unitSystem);
|
||||
location.skinFactor = subs->skinFactor();
|
||||
location.icdFlowCoefficient = subs->icdFlowCoefficient();
|
||||
location.setEffectiveDiameter(subs->effectiveDiameter(unitSystem));
|
||||
location.setHoleDiameter(subs->holeDiameter(unitSystem));
|
||||
location.setOpenHoleRoughnessFactor(subs->openHoleRoughnessFactor(unitSystem));
|
||||
location.setSkinFactor(subs->skinFactor());
|
||||
location.setIcdFlowCoefficient(subs->icdFlowCoefficient());
|
||||
double icdOrificeRadius = subs->icdOrificeDiameter(unitSystem) / 2;
|
||||
location.icdArea = icdOrificeRadius * icdOrificeRadius * cvf::PI_D * subs->icdCount();
|
||||
location.setIcdArea(icdOrificeRadius * icdOrificeRadius * cvf::PI_D * subs->icdCount());
|
||||
|
||||
for (size_t lateralIndex : sub.lateralIndices)
|
||||
{
|
||||
location.laterals.push_back(RicWellSegmentLateral(lateralIndex));
|
||||
location.addLateral(RicWellSegmentLateral(lateralIndex));
|
||||
}
|
||||
assignLateralIntersections(caseToApply, subs, &location);
|
||||
assignLateralIntersections(caseToApply, subs, &location, &foundSubGridIntersections);
|
||||
|
||||
exportInfo.addWellSegmentLocation(location);
|
||||
}
|
||||
}
|
||||
exportInfo.setHasSubGridIntersections(foundSubGridIntersections);
|
||||
exportInfo.sortLocations();
|
||||
|
||||
assignBranchAndSegmentNumbers(caseToApply, &exportInfo);
|
||||
@ -1239,14 +1258,17 @@ RicMultiSegmentWellExportInfo RicWellPathExportCompletionDataFeatureImpl::genera
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeatureImpl::assignLateralIntersections(const RimEclipseCase* caseToApply,
|
||||
const RimFishbonesMultipleSubs* fishbonesSubs,
|
||||
RicWellSegmentLocation* location)
|
||||
RicWellSegmentLocation* location,
|
||||
bool* foundSubGridIntersections)
|
||||
{
|
||||
CVF_ASSERT(foundSubGridIntersections != nullptr);
|
||||
|
||||
const RigMainGrid* grid = caseToApply->eclipseCaseData()->mainGrid();
|
||||
|
||||
for (RicWellSegmentLateral& lateral : location->laterals)
|
||||
for (RicWellSegmentLateral& lateral : location->laterals())
|
||||
{
|
||||
std::vector<std::pair<cvf::Vec3d, double>> lateralCoordMDPairs =
|
||||
fishbonesSubs->coordsAndMDForLateral(location->subIndex, lateral.lateralIndex);
|
||||
fishbonesSubs->coordsAndMDForLateral(location->subIndex(), lateral.lateralIndex());
|
||||
|
||||
if (lateralCoordMDPairs.empty())
|
||||
{
|
||||
@ -1273,15 +1295,28 @@ void RicWellPathExportCompletionDataFeatureImpl::assignLateralIntersections(cons
|
||||
|
||||
for (const auto& cellIntInfo : intersections)
|
||||
{
|
||||
size_t localGridIdx = 0u;
|
||||
const RigGridBase* localGrid = grid->gridAndGridLocalIdxFromGlobalCellIdx(cellIntInfo.globCellIndex, &localGridIdx);
|
||||
QString gridName;
|
||||
if (localGrid != grid)
|
||||
{
|
||||
gridName = QString::fromStdString(localGrid->gridName());
|
||||
*foundSubGridIntersections = true;
|
||||
}
|
||||
|
||||
size_t i = 0u, j = 0u, k = 0u;
|
||||
grid->ijkFromCellIndex(cellIntInfo.globCellIndex, &i, &j, &k);
|
||||
RicWellSegmentLateralIntersection lateralIntersection(cellIntInfo.globCellIndex,
|
||||
localGrid->ijkFromCellIndex(localGridIdx, &i, &j, &k);
|
||||
|
||||
RicWellSegmentLateralIntersection lateralIntersection(gridName,
|
||||
localGridIdx,
|
||||
cvf::Vec3st(i, j, k),
|
||||
previousExitMD,
|
||||
cellIntInfo.endMD - previousExitMD,
|
||||
previousExitTVD,
|
||||
cellIntInfo.endPoint.z() - previousExitTVD,
|
||||
cellIntInfo.intersectionLengthsInCellCS);
|
||||
|
||||
lateral.intersections.push_back(lateralIntersection);
|
||||
lateral.addIntersection(lateralIntersection);
|
||||
|
||||
previousExitMD = cellIntInfo.endMD;
|
||||
previousExitTVD = cellIntInfo.endPoint.z();
|
||||
@ -1297,17 +1332,17 @@ void RicWellPathExportCompletionDataFeatureImpl::assignBranchAndSegmentNumbers(c
|
||||
int* branchNum,
|
||||
int* segmentNum)
|
||||
{
|
||||
for (RicWellSegmentLateral& lateral : location->laterals)
|
||||
for (RicWellSegmentLateral& lateral : location->laterals())
|
||||
{
|
||||
++(*branchNum);
|
||||
lateral.branchNumber = (*branchNum);
|
||||
lateral.setBranchNumber(*branchNum);
|
||||
|
||||
int attachedSegmentNumber = location->icdSegmentNumber;
|
||||
for (auto& intersection : lateral.intersections)
|
||||
int attachedSegmentNumber = location->icdSegmentNumber();
|
||||
for (auto& intersection : lateral.intersections())
|
||||
{
|
||||
++(*segmentNum);
|
||||
intersection.segmentNumber = *segmentNum;
|
||||
intersection.attachedSegmentNumber = attachedSegmentNumber;
|
||||
intersection.setSegmentNumber(*segmentNum);
|
||||
intersection.setAttachedSegmentNumber(attachedSegmentNumber);
|
||||
attachedSegmentNumber = *segmentNum;
|
||||
}
|
||||
}
|
||||
@ -1325,9 +1360,9 @@ void RicWellPathExportCompletionDataFeatureImpl::assignBranchAndSegmentNumbers(c
|
||||
// First loop over the locations so that each segment on the main stem is an incremental number
|
||||
for (RicWellSegmentLocation& location : exportInfo->wellSegmentLocations())
|
||||
{
|
||||
location.segmentNumber = ++segmentNumber;
|
||||
location.icdBranchNumber = ++branchNumber;
|
||||
location.icdSegmentNumber = ++segmentNumber;
|
||||
location.setSegmentNumber(++segmentNumber);
|
||||
location.setIcdBranchNumber(++branchNumber);
|
||||
location.setIcdSegmentNumber(++segmentNumber);
|
||||
}
|
||||
|
||||
// Then assign branch and segment numbers to each lateral parts
|
||||
|
@ -46,88 +46,95 @@ class RicWellPathExportCompletionDataFeatureImpl
|
||||
{
|
||||
|
||||
public:
|
||||
static RicMultiSegmentWellExportInfo generateFishbonesMSWExportInfo(const RimEclipseCase* caseToApply,
|
||||
const RimWellPath* wellPath);
|
||||
static RicMultiSegmentWellExportInfo generateFishbonesMswExportInfo(const RimEclipseCase* caseToApply,
|
||||
const RimWellPath* wellPath);
|
||||
|
||||
static RicMultiSegmentWellExportInfo generateFishbonesMSWExportInfo(const RimEclipseCase* caseToApply,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs);
|
||||
static RicMultiSegmentWellExportInfo generateFishbonesMswExportInfo(const RimEclipseCase* caseToApply,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs);
|
||||
|
||||
static CellDirection calculateDirectionInCell(RimEclipseCase* eclipseCase,
|
||||
size_t globalCellIndex,
|
||||
const cvf::Vec3d& lengthsInCell);
|
||||
static CellDirection calculateDirectionInCell(RimEclipseCase* eclipseCase,
|
||||
size_t globalCellIndex,
|
||||
const cvf::Vec3d& lengthsInCell);
|
||||
|
||||
static double calculateTransmissibility(RimEclipseCase* eclipseCase,
|
||||
const RimWellPath* wellPath,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
double skinFactor,
|
||||
double wellRadius,
|
||||
size_t globalCellIndex,
|
||||
bool useLateralNTG,
|
||||
size_t volumeScaleConstant = 1,
|
||||
CellDirection directionForVolumeScaling = CellDirection::DIR_I);
|
||||
static double calculateTransmissibility(RimEclipseCase* eclipseCase,
|
||||
const RimWellPath* wellPath,
|
||||
const cvf::Vec3d& internalCellLengths,
|
||||
double skinFactor,
|
||||
double wellRadius,
|
||||
size_t globalCellIndex,
|
||||
bool useLateralNTG,
|
||||
size_t volumeScaleConstant = 1,
|
||||
CellDirection directionForVolumeScaling = CellDirection::DIR_I);
|
||||
|
||||
|
||||
static void exportCompletions(const std::vector<RimWellPath*>& wellPaths,
|
||||
const std::vector<RimSimWellInView*>& simWells,
|
||||
const RicExportCompletionDataSettingsUi& exportSettings);
|
||||
static void exportCompletions(const std::vector<RimWellPath*>& wellPaths,
|
||||
const std::vector<RimSimWellInView*>& simWells,
|
||||
const RicExportCompletionDataSettingsUi& exportSettings);
|
||||
|
||||
static std::vector<RigCompletionData> computeStaticCompletionsForWellPath(RimWellPath* wellPath,
|
||||
RimEclipseCase* eclipseCase);
|
||||
static std::vector<RigCompletionData> computeStaticCompletionsForWellPath(RimWellPath* wellPath,
|
||||
RimEclipseCase* eclipseCase);
|
||||
|
||||
static std::vector<RigCompletionData> computeDynamicCompletionsForWellPath(RimWellPath* wellPath,
|
||||
RimEclipseCase* eclipseCase,
|
||||
size_t timeStepIndex);
|
||||
static std::vector<RigCompletionData> computeDynamicCompletionsForWellPath(RimWellPath* wellPath,
|
||||
RimEclipseCase* eclipseCase,
|
||||
size_t timeStepIndex);
|
||||
|
||||
static void generateWelsegsTable(RifEclipseDataTableFormatter& formatter, const RicMultiSegmentWellExportInfo& exportInfo);
|
||||
static void generateCompsegsTable(RifEclipseDataTableFormatter& formatter, const RicMultiSegmentWellExportInfo& exportInfo);
|
||||
static void generateWsegvalvTable(RifEclipseDataTableFormatter& formatter, const RicMultiSegmentWellExportInfo& exportInfo);
|
||||
static void generateWelsegsTable(RifEclipseDataTableFormatter& formatter,
|
||||
const RicMultiSegmentWellExportInfo& exportInfo);
|
||||
static void generateCompsegTables(RifEclipseDataTableFormatter& formatter,
|
||||
const RicMultiSegmentWellExportInfo& exportInfo);
|
||||
static void generateCompsegTable(RifEclipseDataTableFormatter& formatter,
|
||||
const RicMultiSegmentWellExportInfo& exportInfo,
|
||||
bool exportSubGridIntersections);
|
||||
static void generateWsegvalvTable(RifEclipseDataTableFormatter& formatter,
|
||||
const RicMultiSegmentWellExportInfo& exportInfo);
|
||||
|
||||
private:
|
||||
static double calculateTransmissibilityAsEclipseDoes(RimEclipseCase* eclipseCase,
|
||||
double skinFactor,
|
||||
double wellRadius,
|
||||
size_t globalCellIndex,
|
||||
CellDirection direction);
|
||||
static double calculateTransmissibilityAsEclipseDoes(RimEclipseCase* eclipseCase,
|
||||
double skinFactor,
|
||||
double wellRadius,
|
||||
size_t globalCellIndex,
|
||||
CellDirection direction);
|
||||
|
||||
static RigCompletionData combineEclipseCellCompletions(const std::vector<RigCompletionData>& completions,
|
||||
const RicExportCompletionDataSettingsUi& settings);
|
||||
static RigCompletionData combineEclipseCellCompletions(const std::vector<RigCompletionData>& completions,
|
||||
const RicExportCompletionDataSettingsUi& settings);
|
||||
|
||||
static void sortAndExportCompletionsToFile(RimEclipseCase* eclipseCase,
|
||||
static void sortAndExportCompletionsToFile(RimEclipseCase* eclipseCase,
|
||||
const QString& exportFolder,
|
||||
const QString& fileName,
|
||||
std::vector<RigCompletionData>& completions,
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems,
|
||||
RicExportCompletionDataSettingsUi::CompdatExportType exportType);
|
||||
|
||||
static void exportCompdatAndWpimultTables(RimEclipseCase* sourceCase,
|
||||
static void exportCompdatAndWpimultTables(RimEclipseCase* sourceCase,
|
||||
const QString& folderName,
|
||||
const QString& fileName,
|
||||
const std::map<QString, std::vector<RigCompletionData>>& completionsPerGrid,
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems,
|
||||
RicExportCompletionDataSettingsUi::CompdatExportType exportType);
|
||||
|
||||
static void exportCompdatTableUsingFormatter(RifEclipseDataTableFormatter& formatter,
|
||||
const QString& gridName,
|
||||
const std::vector<RigCompletionData>& completionData);
|
||||
static void exportCompdatTableUsingFormatter(RifEclipseDataTableFormatter& formatter,
|
||||
const QString& gridName,
|
||||
const std::vector<RigCompletionData>& completionData);
|
||||
|
||||
static void exportWpimultTableUsingFormatter(RifEclipseDataTableFormatter& formatter,
|
||||
const QString& gridName,
|
||||
const std::vector<RigCompletionData>& completionData);
|
||||
static void exportWpimultTableUsingFormatter(RifEclipseDataTableFormatter& formatter,
|
||||
const QString& gridName,
|
||||
const std::vector<RigCompletionData>& completionData);
|
||||
|
||||
static std::vector<RigCompletionData> generatePerforationsCompdatValues(const RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& settings);
|
||||
static std::vector<RigCompletionData> generatePerforationsCompdatValues(const RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& settings);
|
||||
|
||||
static void assignLateralIntersections(const RimEclipseCase* caseToApply,
|
||||
const RimFishbonesMultipleSubs* fishbonesSubs,
|
||||
RicWellSegmentLocation* location);
|
||||
static void assignBranchAndSegmentNumbers(const RimEclipseCase* caseToApply,
|
||||
RicWellSegmentLocation* location,
|
||||
int* branchNum,
|
||||
int* segmentNum);
|
||||
static void assignBranchAndSegmentNumbers(const RimEclipseCase* caseToApply,
|
||||
RicMultiSegmentWellExportInfo* exportInfo);
|
||||
static void assignLateralIntersections(const RimEclipseCase* caseToApply,
|
||||
const RimFishbonesMultipleSubs* fishbonesSubs,
|
||||
RicWellSegmentLocation* location,
|
||||
bool* foundSubGridIntersections);
|
||||
static void assignBranchAndSegmentNumbers(const RimEclipseCase* caseToApply,
|
||||
RicWellSegmentLocation* location,
|
||||
int* branchNum,
|
||||
int* segmentNum);
|
||||
static void assignBranchAndSegmentNumbers(const RimEclipseCase* caseToApply,
|
||||
RicMultiSegmentWellExportInfo* exportInfo);
|
||||
|
||||
static void appendCompletionData(std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>>* completionData,
|
||||
const std::vector<RigCompletionData>& data);
|
||||
static void appendCompletionData(std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>>* completionData,
|
||||
const std::vector<RigCompletionData>& data);
|
||||
};
|
||||
|
@ -279,6 +279,18 @@ RifEclipseDataTableFormatter& RifEclipseDataTableFormatter::addZeroBasedCellInde
|
||||
return *this;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Add default marker if the value equals the defaultValue, otherwise add value.
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseDataTableFormatter& RifEclipseDataTableFormatter::addValueOrDefaultMarker(double value, double defaultValue)
|
||||
{
|
||||
if (value == defaultValue)
|
||||
{
|
||||
return add(QString("1*"));
|
||||
}
|
||||
return add(value);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -343,11 +355,6 @@ int RifEclipseDataTableFormatter::tableWidth() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RifEclipseDataTableFormatter::format(double num, RifEclipseOutputTableDoubleFormatting doubleFormat)
|
||||
{
|
||||
if (num == std::numeric_limits<double>::infinity())
|
||||
{
|
||||
return QString("1*"); // Eclipse default column value
|
||||
}
|
||||
|
||||
switch (doubleFormat.format)
|
||||
{
|
||||
case RifEclipseOutputTableDoubleFormat::RIF_FLOAT:
|
||||
|
@ -113,10 +113,11 @@ public:
|
||||
RifEclipseDataTableFormatter& keyword(const QString& keyword);
|
||||
RifEclipseDataTableFormatter& header(std::vector<RifEclipseOutputTableColumn> tableHeader);
|
||||
RifEclipseDataTableFormatter& add(const QString& str);
|
||||
RifEclipseDataTableFormatter& add(double num);
|
||||
RifEclipseDataTableFormatter& add(double num);
|
||||
RifEclipseDataTableFormatter& add(int num);
|
||||
RifEclipseDataTableFormatter& add(size_t num);
|
||||
RifEclipseDataTableFormatter& addZeroBasedCellIndex(size_t index);
|
||||
RifEclipseDataTableFormatter& addValueOrDefaultMarker(double value, double defaultValue);
|
||||
RifEclipseDataTableFormatter& comment(const QString& str);
|
||||
RifEclipseDataTableFormatter& addHorizontalLine(const QChar& str);
|
||||
void rowCompleted();
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <cmath> // Needed for HUGE_VAL on Linux
|
||||
#include <limits>
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@ -32,20 +32,20 @@
|
||||
RigCompletionData::RigCompletionData(const QString wellName, const RigCompletionDataGridCell& cellIndex, double orderingValue)
|
||||
: m_wellName(wellName)
|
||||
, m_cellIndex(cellIndex)
|
||||
, m_saturation(HUGE_VAL)
|
||||
, m_transmissibility(HUGE_VAL)
|
||||
, m_diameter(HUGE_VAL)
|
||||
, m_kh(HUGE_VAL)
|
||||
, m_skinFactor(HUGE_VAL)
|
||||
, m_dFactor(HUGE_VAL)
|
||||
, m_saturation(std::numeric_limits<double>::infinity())
|
||||
, m_transmissibility(std::numeric_limits<double>::infinity())
|
||||
, m_diameter(std::numeric_limits<double>::infinity())
|
||||
, m_kh(std::numeric_limits<double>::infinity())
|
||||
, m_skinFactor(std::numeric_limits<double>::infinity())
|
||||
, m_dFactor(std::numeric_limits<double>::infinity())
|
||||
, m_direction(DIR_UNDEF)
|
||||
, m_connectionState(OPEN)
|
||||
, m_count(1)
|
||||
, m_wpimult(HUGE_VAL)
|
||||
, m_wpimult(std::numeric_limits<double>::infinity())
|
||||
, m_isMainBore(false)
|
||||
, m_completionType(CT_UNDEFINED)
|
||||
, m_firstOrderingValue(orderingValue)
|
||||
, m_secondOrderingValue(HUGE_VAL)
|
||||
, m_secondOrderingValue(std::numeric_limits<double>::infinity())
|
||||
{
|
||||
}
|
||||
|
||||
@ -240,9 +240,17 @@ void RigCompletionData::addMetadata(const QString& name, const QString& comment)
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
bool RigCompletionData::isDefaultValue(double val)
|
||||
double RigCompletionData::defaultValue()
|
||||
{
|
||||
return val == HUGE_VAL;
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigCompletionData::isDefaultValue(double num)
|
||||
{
|
||||
return num == defaultValue();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -386,9 +394,9 @@ double RigCompletionData::secondOrderingValue() const
|
||||
//==================================================================================================
|
||||
bool RigCompletionData::onlyOneIsDefaulted(double first, double second)
|
||||
{
|
||||
if (first == HUGE_VAL)
|
||||
if (first == std::numeric_limits<double>::infinity())
|
||||
{
|
||||
if (second == HUGE_VAL)
|
||||
if (second == std::numeric_limits<double>::infinity())
|
||||
{
|
||||
// Both have default values
|
||||
return false;
|
||||
@ -399,7 +407,7 @@ bool RigCompletionData::onlyOneIsDefaulted(double first, double second)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (second == HUGE_VAL)
|
||||
if (second == std::numeric_limits<double>::infinity())
|
||||
{
|
||||
// Second has default value, first does not
|
||||
return true;
|
||||
|
@ -107,8 +107,9 @@ public:
|
||||
void setKh(double kh);
|
||||
|
||||
void addMetadata(const QString& name, const QString& comment);
|
||||
static bool isDefaultValue(double val);
|
||||
|
||||
|
||||
static double defaultValue();
|
||||
static bool isDefaultValue(double num);
|
||||
const std::vector<RigCompletionMetaData>& metadata() const;
|
||||
const QString& wellName() const;
|
||||
const RigCompletionDataGridCell& completionDataGridCell() const;
|
||||
|
Loading…
Reference in New Issue
Block a user