#6074 MSW: Add helper function to compute TVD

This commit is contained in:
Magne Sjaastad 2020-06-22 10:14:31 +02:00
parent 501f6e8611
commit a8d25c13e0
2 changed files with 17 additions and 3 deletions

View File

@ -849,17 +849,17 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFishbonesMswExport
for ( auto& sub : subs->installedLateralIndices() )
{
double subEndMD = subs->measuredDepth( sub.subIndex );
double subEndTVD = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( subEndMD ).z();
double subEndTVD = RicWellPathExportMswCompletionsImpl::tvdFromMeasuredDepth( wellPath, subEndMD );
int subSegCount =
SubSegmentIntersectionInfo::numberOfSplittedSegments( subStartMD, subEndMD, maxSegmentLength );
double subSegLen = ( subEndMD - subStartMD ) / subSegCount;
double startMd = subStartMD;
double startTvd = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( startMd ).z();
double startTvd = RicWellPathExportMswCompletionsImpl::tvdFromMeasuredDepth( wellPath, startMd );
for ( int ssi = 0; ssi < subSegCount; ssi++ )
{
double endMd = startMd + subSegLen;
double endTvd = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( endMd ).z();
double endTvd = RicWellPathExportMswCompletionsImpl::tvdFromMeasuredDepth( wellPath, endMd );
std::shared_ptr<RicMswSegment> location(
new RicMswSegment( subs->generatedName(), startMd, endMd, startTvd, endTvd, sub.subIndex ) );
@ -1910,6 +1910,18 @@ void RicWellPathExportMswCompletionsImpl::assignBranchAndSegmentNumbers( const R
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RicWellPathExportMswCompletionsImpl::tvdFromMeasuredDepth( const RimWellPath* wellPath, double measuredDepth )
{
CVF_ASSERT( wellPath && wellPath->wellPathGeometry() );
double tvdValue = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( measuredDepth ).z();
return tvdValue;
}
SubSegmentIntersectionInfo::SubSegmentIntersectionInfo( size_t globCellIndex,
double startTVD,
double endTVD,

View File

@ -163,4 +163,6 @@ private:
int* branchNum,
int* segmentNum );
static void assignBranchAndSegmentNumbers( const RimEclipseCase* caseToApply, RicMswExportInfo* exportInfo );
static double tvdFromMeasuredDepth( const RimWellPath* wellPath, double measuredDepth );
};