#6074 MSW: Add export of both ABS and INC for valves

This commit is contained in:
Magne Sjaastad 2020-06-22 11:13:36 +02:00
parent 054528eb25
commit c531c94ad6
2 changed files with 55 additions and 13 deletions

View File

@ -382,12 +382,29 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsSegments(
{
formatter.comment( completion->label() );
formatter.add( completion->subSegments().front()->segmentNumber() );
formatter.add( completion->subSegments().front()->segmentNumber() );
auto firstSubSegment = completion->subSegments().front();
formatter.add( firstSubSegment->segmentNumber() );
formatter.add( firstSubSegment->segmentNumber() );
formatter.add( completion->branchNumber() );
formatter.add( segment->segmentNumber() );
formatter.add( 0.1 ); // ICDs have 0.1 length
formatter.add( 0 ); // Depth change
double length = 0.0;
double depth = 0.0;
if ( exportInfo.lengthAndDepthText() == QString( "INC" ) )
{
length = firstSubSegment->deltaMD();
depth = firstSubSegment->deltaTVD();
}
else
{
length = firstSubSegment->endMD();
depth = firstSubSegment->endTVD();
}
formatter.add( length );
formatter.add( depth );
formatter.add( exportInfo.linerDiameter() );
formatter.add( exportInfo.roughnessFactor() );
formatter.rowCompleted();
@ -1078,7 +1095,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generatePerforationsMswExp
eclipseCase,
&foundSubGridIntersections );
createValveCompletions( mainBoreSegments, perforationIntervals, unitSystem );
createValveCompletions( mainBoreSegments, perforationIntervals, wellPath, unitSystem );
assignValveContributionsToSuperICDsOrAICDs( mainBoreSegments, perforationIntervals, unitSystem );
moveIntersectionsToICVs( mainBoreSegments, perforationIntervals, unitSystem );
moveIntersectionsToSuperICDsOrAICDs( mainBoreSegments );
@ -1311,6 +1328,7 @@ RicWellPathExportMswCompletionsImpl::MainBoreSegments
void RicWellPathExportMswCompletionsImpl::createValveCompletions(
std::vector<std::shared_ptr<RicMswSegment>>& mainBoreSegments,
const std::vector<const RimPerforationInterval*>& perforationIntervals,
const RimWellPath* wellPath,
RiaEclipseUnitTools::UnitSystem unitSystem )
{
for ( size_t nMainSegment = 0u; nMainSegment < mainBoreSegments.size(); ++nMainSegment )
@ -1337,7 +1355,12 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
for ( size_t nSubValve = 0u; nSubValve < valve->valveLocations().size(); ++nSubValve )
{
double valveMD = valve->valveLocations()[nSubValve];
double valveMD = valve->valveLocations()[nSubValve];
double valveStartTVD = RicWellPathExportMswCompletionsImpl::tvdFromMeasuredDepth( wellPath, valveMD );
double valveLengthMD = 0.1;
double valveEndTVD =
RicWellPathExportMswCompletionsImpl::tvdFromMeasuredDepth( wellPath, valveMD + valveLengthMD );
std::pair<double, double> valveSegment = valve->valveSegments()[nSubValve];
double overlapStart = std::max( valveSegment.first, segment->startMD() );
@ -1351,7 +1374,7 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
QString valveLabel =
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
std::shared_ptr<RicMswSubSegment> subSegment(
new RicMswSubSegment( valveMD, valveMD + 0.1, 0.0, 0.0 ) );
new RicMswSubSegment( valveMD, valveMD + valveLengthMD, valveStartTVD, valveEndTVD ) );
superAICD = std::make_shared<RicMswPerforationAICD>( valveLabel, valve );
superAICD->addSubSegment( subSegment );
@ -1361,7 +1384,7 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
QString valveLabel =
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
std::shared_ptr<RicMswSubSegment> subSegment(
new RicMswSubSegment( valveMD, valveMD + 0.1, 0.0, 0.0 ) );
new RicMswSubSegment( valveMD, valveMD + valveLengthMD, valveStartTVD, valveEndTVD ) );
superICD = std::make_shared<RicMswPerforationICD>( valveLabel, valve );
superICD->addSubSegment( subSegment );
@ -1371,7 +1394,7 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
QString valveLabel =
QString( "ICV %1 at segment #%2" ).arg( valve->name() ).arg( nMainSegment + 2 );
std::shared_ptr<RicMswSubSegment> subSegment(
new RicMswSubSegment( valveMD, valveMD + 0.1, 0.0, 0.0 ) );
new RicMswSubSegment( valveMD, valveMD + valveLengthMD, valveStartTVD, valveEndTVD ) );
ICV = std::make_shared<RicMswPerforationICV>( valveLabel, valve );
ICV->addSubSegment( subSegment );
@ -1385,8 +1408,17 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
{
QString valveLabel =
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
std::shared_ptr<RicMswSubSegment> subSegment(
new RicMswSubSegment( overlapStart, overlapStart + 0.1, 0.0, 0.0 ) );
double overlapValveStartTVD =
RicWellPathExportMswCompletionsImpl::tvdFromMeasuredDepth( wellPath, overlapStart );
double overlapEndTVD =
RicWellPathExportMswCompletionsImpl::tvdFromMeasuredDepth( wellPath,
overlapStart + valveLengthMD );
std::shared_ptr<RicMswSubSegment> subSegment( new RicMswSubSegment( overlapStart,
overlapStart + valveLengthMD,
overlapValveStartTVD,
overlapEndTVD ) );
superICD = std::make_shared<RicMswPerforationICD>( valveLabel, valve );
superICD->addSubSegment( subSegment );
}
@ -1395,8 +1427,17 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
{
QString valveLabel =
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
std::shared_ptr<RicMswSubSegment> subSegment(
new RicMswSubSegment( overlapStart, overlapStart + 0.1, 0.0, 0.0 ) );
double overlapValveStartTVD =
RicWellPathExportMswCompletionsImpl::tvdFromMeasuredDepth( wellPath, overlapStart );
double overlapEndTVD =
RicWellPathExportMswCompletionsImpl::tvdFromMeasuredDepth( wellPath,
overlapStart + valveLengthMD );
std::shared_ptr<RicMswSubSegment> subSegment( new RicMswSubSegment( overlapStart,
overlapStart + valveLengthMD,
overlapValveStartTVD,
overlapEndTVD ) );
superAICD = std::make_shared<RicMswPerforationAICD>( valveLabel, valve );
superAICD->addSubSegment( subSegment );
}

View File

@ -121,6 +121,7 @@ private:
static void createValveCompletions( std::vector<std::shared_ptr<RicMswSegment>>& mainBoreSegments,
const std::vector<const RimPerforationInterval*>& perforationIntervals,
const RimWellPath* wellPath,
RiaEclipseUnitTools::UnitSystem unitSystem );
static void