Improve MSW export including multi lateral wells

Based on branch https://github.com/OPM/ResInsight/tree/system-msw-refactor

- Move completion settings to property of well path
- Rename to RimFishbones
- Export implicit COMPSEGS for fishbones main bore
- Add valve for each branch
- Increase version number to be able to handle import of legacy project files
This commit is contained in:
Magne Sjaastad
2021-02-26 14:27:59 +01:00
parent 5415a8c42d
commit 8bab748fa6
104 changed files with 3250 additions and 3203 deletions

View File

@@ -25,8 +25,8 @@
#include "RigWellPath.h"
#include "RimFishbones.h"
#include "RimFishbonesCollection.h"
#include "RimFishbonesMultipleSubs.h"
#include "RimWellPath.h"
#include "cafSelectionManager.h"
@@ -67,38 +67,35 @@ void RicExportFishbonesLateralsFeature::onActionTriggered( bool isChecked )
auto exportFile = EXP::openFileForExport( folder, fileName );
auto stream = EXP::createOutputFileStream( *exportFile );
for ( RimFishbonesMultipleSubs* fishbone : wellPath->fishbonesCollection()->activeFishbonesSubs() )
for ( RimFishbones* fishbone : wellPath->fishbonesCollection()->activeFishbonesSubs() )
{
const QString fishboneName = fishbone->generatedName();
for ( auto& sub : fishbone->installedLateralIndices() )
for ( const auto& [subIndex, lateralIndex] : fishbone->installedLateralIndices() )
{
for ( size_t lateralIndex : sub.lateralIndices )
std::vector<std::pair<cvf::Vec3d, double>> coordsAndMD =
fishbone->coordsAndMDForLateral( subIndex, lateralIndex );
std::vector<cvf::Vec3d> lateralCoords;
std::vector<double> lateralMDs;
lateralCoords.reserve( coordsAndMD.size() );
lateralMDs.reserve( coordsAndMD.size() );
for ( auto& coordMD : coordsAndMD )
{
std::vector<std::pair<cvf::Vec3d, double>> coordsAndMD =
fishbone->coordsAndMDForLateral( sub.subIndex, lateralIndex );
std::vector<cvf::Vec3d> lateralCoords;
std::vector<double> lateralMDs;
lateralCoords.reserve( coordsAndMD.size() );
lateralMDs.reserve( coordsAndMD.size() );
for ( auto& coordMD : coordsAndMD )
{
lateralCoords.push_back( coordMD.first );
lateralMDs.push_back( coordMD.second );
}
RigWellPath geometry( lateralCoords, lateralMDs );
// Pad with "0" to get a total of two characters defining the sub index text
QString subIndexText = QString( "%1" ).arg( sub.subIndex, 2, 10, QChar( '0' ) );
QString lateralName =
QString( "%1_%2_Sub%3_Lat%4" ).arg( wellPath->name() ).arg( fishboneName ).arg( subIndexText ).arg( lateralIndex );
EXP::writeWellPathGeometryToStream( *stream, geometry, lateralName, mdStepSize, false, 0.0, false );
lateralCoords.push_back( coordMD.first );
lateralMDs.push_back( coordMD.second );
}
RigWellPath geometry( lateralCoords, lateralMDs );
// Pad with "0" to get a total of two characters defining the sub index text
QString subIndexText = QString( "%1" ).arg( subIndex, 2, 10, QChar( '0' ) );
QString lateralName =
QString( "%1_%2_Sub%3_Lat%4" ).arg( wellPath->name() ).arg( fishboneName ).arg( subIndexText ).arg( lateralIndex );
EXP::writeWellPathGeometryToStream( *stream, geometry, lateralName, mdStepSize, false, 0.0, false );
}
}