mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6157 Move splitting of MSW segments to just before WELSEGS output
* this is to avoid it impacting on COMPSEGS and other output
This commit is contained in:
@@ -208,7 +208,7 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = caseData->unitsType();
|
||||
bool isMainBore = false;
|
||||
|
||||
for ( std::shared_ptr<RicMswSegment> location : exportInfo.wellSegmentLocations() )
|
||||
for ( std::shared_ptr<RicMswSegment> location : exportInfo.segments() )
|
||||
{
|
||||
for ( std::shared_ptr<RicMswCompletion> completion : location->completions() )
|
||||
{
|
||||
|
||||
@@ -75,18 +75,18 @@ void RicMswExportInfo::setHasSubGridIntersections( bool subGridIntersections )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswExportInfo::addWellSegment( std::shared_ptr<RicMswSegment> location )
|
||||
void RicMswExportInfo::addSegment( std::shared_ptr<RicMswSegment> location )
|
||||
{
|
||||
m_wellSegmentLocations.push_back( location );
|
||||
m_segments.push_back( location );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswExportInfo::sortLocations()
|
||||
void RicMswExportInfo::sortSegments()
|
||||
{
|
||||
std::sort( m_wellSegmentLocations.begin(),
|
||||
m_wellSegmentLocations.end(),
|
||||
std::sort( m_segments.begin(),
|
||||
m_segments.end(),
|
||||
[]( std::shared_ptr<RicMswSegment> lhs, std::shared_ptr<RicMswSegment> rhs ) { return *lhs < *rhs; } );
|
||||
}
|
||||
|
||||
@@ -181,15 +181,15 @@ double RicMswExportInfo::defaultDoubleValue()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<std::shared_ptr<RicMswSegment>>& RicMswExportInfo::wellSegmentLocations() const
|
||||
const std::vector<std::shared_ptr<RicMswSegment>>& RicMswExportInfo::segments() const
|
||||
{
|
||||
return m_wellSegmentLocations;
|
||||
return m_segments;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::shared_ptr<RicMswSegment>>& RicMswExportInfo::wellSegmentLocations()
|
||||
std::vector<std::shared_ptr<RicMswSegment>>& RicMswExportInfo::segments()
|
||||
{
|
||||
return m_wellSegmentLocations;
|
||||
return m_segments;
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
void setRoughnessFactor( double roughnessFactor );
|
||||
void setHasSubGridIntersections( bool subGridIntersections );
|
||||
|
||||
void addWellSegment( std::shared_ptr<RicMswSegment> location );
|
||||
void sortLocations();
|
||||
void addSegment( std::shared_ptr<RicMswSegment> location );
|
||||
void sortSegments();
|
||||
|
||||
const RimWellPath* wellPath() const;
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem() const;
|
||||
@@ -60,8 +60,8 @@ public:
|
||||
bool hasSubGridIntersections() const;
|
||||
static double defaultDoubleValue();
|
||||
|
||||
const std::vector<std::shared_ptr<RicMswSegment>>& wellSegmentLocations() const;
|
||||
std::vector<std::shared_ptr<RicMswSegment>>& wellSegmentLocations();
|
||||
const std::vector<std::shared_ptr<RicMswSegment>>& segments() const;
|
||||
std::vector<std::shared_ptr<RicMswSegment>>& segments();
|
||||
|
||||
private:
|
||||
const RimWellPath* m_wellPath;
|
||||
@@ -74,5 +74,5 @@ private:
|
||||
QString m_pressureDropText;
|
||||
bool m_hasSubGridIntersections;
|
||||
|
||||
std::vector<std::shared_ptr<RicMswSegment>> m_wellSegmentLocations;
|
||||
std::vector<std::shared_ptr<RicMswSegment>> m_segments;
|
||||
};
|
||||
|
||||
@@ -71,6 +71,14 @@ double RicMswSegment::endMD() const
|
||||
return m_endMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::length() const
|
||||
{
|
||||
return m_endMD - m_startMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -41,6 +41,8 @@ public:
|
||||
|
||||
double startMD() const;
|
||||
double endMD() const;
|
||||
double length() const;
|
||||
|
||||
double deltaMD() const;
|
||||
double startTVD() const;
|
||||
double endTVD() const;
|
||||
|
||||
@@ -73,7 +73,6 @@ RicMswSubSegment::RicMswSubSegment( double startMD, double endMD, double startTV
|
||||
, m_startTVD( startTVD )
|
||||
, m_endTVD( endTVD )
|
||||
, m_segmentNumber( -1 )
|
||||
, m_attachedSegmentNumber( -1 )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -133,14 +132,6 @@ int RicMswSubSegment::segmentNumber() const
|
||||
return m_segmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicMswSubSegment::attachedSegmentNumber() const
|
||||
{
|
||||
return m_attachedSegmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -148,15 +139,6 @@ void RicMswSubSegment::setSegmentNumber( int segmentNumber )
|
||||
{
|
||||
m_segmentNumber = segmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSubSegment::setAttachedSegmentNumber( int attachedSegmentNumber )
|
||||
{
|
||||
m_attachedSegmentNumber = attachedSegmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -60,11 +60,8 @@ public:
|
||||
double endTVD() const;
|
||||
double deltaTVD() const;
|
||||
|
||||
int segmentNumber() const;
|
||||
int attachedSegmentNumber() const;
|
||||
|
||||
int segmentNumber() const;
|
||||
void setSegmentNumber( int segmentNumber );
|
||||
void setAttachedSegmentNumber( int attachedSegmentNumber );
|
||||
void addIntersection( std::shared_ptr<RicMswSubSegmentCellIntersection> intersection );
|
||||
|
||||
const std::vector<std::shared_ptr<RicMswSubSegmentCellIntersection>>& intersections() const;
|
||||
@@ -76,7 +73,6 @@ private:
|
||||
double m_startTVD;
|
||||
double m_endTVD;
|
||||
int m_segmentNumber;
|
||||
int m_attachedSegmentNumber;
|
||||
|
||||
std::vector<std::shared_ptr<RicMswSubSegmentCellIntersection>> m_intersections;
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -41,21 +41,18 @@ public:
|
||||
static void exportWellSegmentsForAllCompletions( const RicExportCompletionDataSettingsUi& exportSettings,
|
||||
const std::vector<RimWellPath*>& wellPaths );
|
||||
|
||||
static void exportWellSegmentsForFractures( RimEclipseCase* eclipseCase,
|
||||
std::shared_ptr<QFile> exportFile,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimWellPathFracture*>& fractures );
|
||||
static void exportWellSegmentsForFractures( RimEclipseCase* eclipseCase,
|
||||
std::shared_ptr<QFile> exportFile,
|
||||
const RimWellPath* wellPath );
|
||||
|
||||
static void exportWellSegmentsForFishbones( RimEclipseCase* eclipseCase,
|
||||
std::shared_ptr<QFile> exportFile,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs );
|
||||
static void exportWellSegmentsForFishbones( RimEclipseCase* eclipseCase,
|
||||
std::shared_ptr<QFile> exportFile,
|
||||
const RimWellPath* wellPath );
|
||||
|
||||
static void exportWellSegmentsForPerforations( RimEclipseCase* eclipseCase,
|
||||
std::shared_ptr<QFile> exportFile,
|
||||
const RimWellPath* wellPath,
|
||||
int timeStep,
|
||||
const std::vector<const RimPerforationInterval*>& perforationIntervals );
|
||||
static void exportWellSegmentsForPerforations( RimEclipseCase* eclipseCase,
|
||||
std::shared_ptr<QFile> exportFile,
|
||||
const RimWellPath* wellPath,
|
||||
int timeStep );
|
||||
|
||||
static RicMswExportInfo generateFishbonesMswExportInfo( const RimEclipseCase* caseToApply,
|
||||
const RimWellPath* wellPath,
|
||||
@@ -79,8 +76,8 @@ private:
|
||||
int timeStep,
|
||||
const std::vector<const RimPerforationInterval*>& perforationIntervals );
|
||||
|
||||
static std::vector<SubSegmentIntersectionInfo>
|
||||
generateSubSegments( const RimEclipseCase* eclipseCase, const RimWellPath* wellPath, double& initialMD );
|
||||
static std::vector<WellPathCellIntersectionInfo>
|
||||
generateCellSegments( const RimEclipseCase* eclipseCase, const RimWellPath* wellPath, double& initialMD );
|
||||
|
||||
static std::vector<WellPathCellIntersectionInfo>
|
||||
filterIntersections( const std::vector<WellPathCellIntersectionInfo>& intersections,
|
||||
@@ -88,11 +85,36 @@ private:
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const RimEclipseCase* eclipseCase );
|
||||
|
||||
static void generateWelsegsTable( RifTextDataTableFormatter& formatter, const RicMswExportInfo& exportInfo );
|
||||
static void generateWelsegsTable( RifTextDataTableFormatter& formatter,
|
||||
const RicMswExportInfo& exportInfo,
|
||||
double maxSegmentLength );
|
||||
|
||||
static void writeMainBoreWelsegsSegment( std::shared_ptr<RicMswSegment> segment,
|
||||
RifTextDataTableFormatter& formatter,
|
||||
const RicMswExportInfo& exportInfo,
|
||||
double maxSegmentLength,
|
||||
int* segmentNumber,
|
||||
double* prevMD,
|
||||
double* prevTVD );
|
||||
static void writeValveWelsegsSegment( std::shared_ptr<RicMswValve> valve,
|
||||
RifTextDataTableFormatter& formatter,
|
||||
const RicMswExportInfo& exportInfo,
|
||||
double maxSegmentLength,
|
||||
int mainSegmentNumber,
|
||||
int* segmentNumber );
|
||||
static void writeCompletionWelsegsSegment( std::shared_ptr<RicMswSegment> segment,
|
||||
std::shared_ptr<RicMswCompletion> completion,
|
||||
RifTextDataTableFormatter& formatter,
|
||||
const RicMswExportInfo& exportInfo,
|
||||
double maxSegmentLength,
|
||||
int mainSegmentNumber,
|
||||
int* segmentNumber );
|
||||
|
||||
static void generateWelsegsSegments( RifTextDataTableFormatter& formatter,
|
||||
const RicMswExportInfo& exportInfo,
|
||||
const std::set<RigCompletionData::CompletionType>& exportCompletionTypes );
|
||||
const std::set<RigCompletionData::CompletionType>& exportCompletionTypes,
|
||||
double maxSegmentLength,
|
||||
int* segmentNumber );
|
||||
static void generateWelsegsCompletionCommentHeader( RifTextDataTableFormatter& formatter,
|
||||
RigCompletionData::CompletionType completionType );
|
||||
static void generateCompsegTables( RifTextDataTableFormatter& formatter, const RicMswExportInfo& exportInfo );
|
||||
@@ -111,8 +133,11 @@ private:
|
||||
typedef std::vector<std::shared_ptr<RicMswSegment>> MainBoreSegments;
|
||||
typedef std::map<std::shared_ptr<RicMswCompletion>, std::set<std::pair<const RimWellPathValve*, size_t>>> ValveContributionMap;
|
||||
|
||||
static std::vector<std::pair<double, double>>
|
||||
createSubSegmentMDPairs( double startMD, double endMD, double maxSegmentLength );
|
||||
|
||||
static MainBoreSegments
|
||||
createMainBoreSegmentsForPerforations( const std::vector<SubSegmentIntersectionInfo>& subSegIntersections,
|
||||
createMainBoreSegmentsForPerforations( const std::vector<WellPathCellIntersectionInfo>& cellSegmentIntersections,
|
||||
const std::vector<const RimPerforationInterval*>& perforationIntervals,
|
||||
const RimWellPath* wellPath,
|
||||
int timeStep,
|
||||
@@ -137,15 +162,15 @@ private:
|
||||
|
||||
static void assignFishbonesLateralIntersections( const RimEclipseCase* caseToApply,
|
||||
const RimFishbonesMultipleSubs* fishbonesSubs,
|
||||
std::shared_ptr<RicMswSegment> location,
|
||||
std::shared_ptr<RicMswSegment> segment,
|
||||
bool* foundSubGridIntersections,
|
||||
double maxSegmentLength );
|
||||
|
||||
static void assignFractureIntersections( const RimEclipseCase* caseToApply,
|
||||
const RimWellPathFracture* fracture,
|
||||
const std::vector<RigCompletionData>& completionData,
|
||||
std::shared_ptr<RicMswSegment> location,
|
||||
bool* foundSubGridIntersections );
|
||||
static void assignFractureCompletionsToCellSegment( const RimEclipseCase* caseToApply,
|
||||
const RimWellPathFracture* fracture,
|
||||
const std::vector<RigCompletionData>& completionData,
|
||||
std::shared_ptr<RicMswSegment> segment,
|
||||
bool* foundSubGridIntersections );
|
||||
|
||||
static std::vector<RigCompletionData> generatePerforationIntersections( const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
@@ -154,16 +179,14 @@ private:
|
||||
|
||||
static void assignPerforationIntersections( const std::vector<RigCompletionData>& completionData,
|
||||
std::shared_ptr<RicMswCompletion> perforationCompletion,
|
||||
const SubSegmentIntersectionInfo& cellIntInfo,
|
||||
const WellPathCellIntersectionInfo& cellIntInfo,
|
||||
double overlapStart,
|
||||
double overlapEnd,
|
||||
bool* foundSubGridIntersections );
|
||||
|
||||
static void assignBranchAndSegmentNumbers( const RimEclipseCase* caseToApply,
|
||||
std::shared_ptr<RicMswSegment> location,
|
||||
int* branchNum,
|
||||
int* segmentNum );
|
||||
static void assignBranchAndSegmentNumbers( const RimEclipseCase* caseToApply, RicMswExportInfo* exportInfo );
|
||||
static void
|
||||
assignBranchNumbers( const RimEclipseCase* caseToApply, std::shared_ptr<RicMswSegment> segment, int* branchNum );
|
||||
static void assignBranchNumbers( const RimEclipseCase* caseToApply, RicMswExportInfo* exportInfo );
|
||||
|
||||
static double tvdFromMeasuredDepth( const RimWellPath* wellPath, double measuredDepth );
|
||||
};
|
||||
|
||||
@@ -45,6 +45,9 @@ struct WellPathCellIntersectionInfo
|
||||
|
||||
cvf::StructGridInterface::FaceType intersectedCellFaceIn;
|
||||
cvf::StructGridInterface::FaceType intersectedCellFaceOut;
|
||||
|
||||
double startTVD() const { return -startPoint.z(); }
|
||||
double endTVD() const { return -endPoint.z(); }
|
||||
};
|
||||
|
||||
class RigWellPath;
|
||||
|
||||
Reference in New Issue
Block a user