mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-02 20:30:46 -06:00
Completion export cleanup
Use MSW as postfix to base name Drop "Unified" for individual well export Remove export option Individually/Combined Remove SPLIT_ON_WELL_AND_COMPLETION_TYPE
This commit is contained in:
1 parent
b723845b0d
commit
a23599cb5d
11 files changed
+131
-185
No files matched your search
@@ -51,10 +51,6 @@ RicfExportWellPathCompletions::RicfExportWellPathCompletions()
|
|||||||
|
|
||||||
CAF_PDM_InitScriptableField( &m_fileSplit, "fileSplit", RicExportCompletionDataSettingsUi::ExportSplitType(), "File Split" );
|
CAF_PDM_InitScriptableField( &m_fileSplit, "fileSplit", RicExportCompletionDataSettingsUi::ExportSplitType(), "File Split" );
|
||||||
CAF_PDM_InitScriptableField( &m_compdatExport, "compdatExport", RicExportCompletionDataSettingsUi::CompdatExportType(), "Compdat Export" );
|
CAF_PDM_InitScriptableField( &m_compdatExport, "compdatExport", RicExportCompletionDataSettingsUi::CompdatExportType(), "Compdat Export" );
|
||||||
CAF_PDM_InitScriptableField( &m_combinationMode,
|
|
||||||
"combinationMode",
|
|
||||||
RicExportCompletionDataSettingsUi::CombinationModeType(),
|
|
||||||
"Combination Mode" );
|
|
||||||
|
|
||||||
CAF_PDM_InitScriptableField( &m_includeMsw, "includeMsw", true, "Export Multi Segment Well Model" );
|
CAF_PDM_InitScriptableField( &m_includeMsw, "includeMsw", true, "Export Multi Segment Well Model" );
|
||||||
CAF_PDM_InitScriptableField( &m_useLateralNTG, "useNtgHorizontally", false, "Use NTG Horizontally" );
|
CAF_PDM_InitScriptableField( &m_useLateralNTG, "useNtgHorizontally", false, "Use NTG Horizontally" );
|
||||||
@@ -115,8 +111,6 @@ caf::PdmScriptResponse RicfExportWellPathCompletions::execute()
|
|||||||
exportSettings.excludeMainBoreForFishbones = m_excludeMainBoreForFishbones;
|
exportSettings.excludeMainBoreForFishbones = m_excludeMainBoreForFishbones;
|
||||||
exportSettings.includeFractures = m_includeFractures;
|
exportSettings.includeFractures = m_includeFractures;
|
||||||
|
|
||||||
exportSettings.setCombinationMode( m_combinationMode() );
|
|
||||||
|
|
||||||
exportSettings.setExportDataSourceAsComment( m_exportDataSourceAsComments );
|
exportSettings.setExportDataSourceAsComment( m_exportDataSourceAsComments );
|
||||||
exportSettings.setExportWelspec( m_exportWelspec );
|
exportSettings.setExportWelspec( m_exportWelspec );
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,8 @@ private:
|
|||||||
caf::PdmField<int> m_timeStep;
|
caf::PdmField<int> m_timeStep;
|
||||||
caf::PdmField<std::vector<QString>> m_wellPathNames;
|
caf::PdmField<std::vector<QString>> m_wellPathNames;
|
||||||
|
|
||||||
caf::PdmField<RicExportCompletionDataSettingsUi::ExportSplitType> m_fileSplit;
|
caf::PdmField<RicExportCompletionDataSettingsUi::ExportSplitType> m_fileSplit;
|
||||||
caf::PdmField<RicExportCompletionDataSettingsUi::CompdatExportType> m_compdatExport;
|
caf::PdmField<RicExportCompletionDataSettingsUi::CompdatExportType> m_compdatExport;
|
||||||
caf::PdmField<RicExportCompletionDataSettingsUi::CombinationModeType> m_combinationMode;
|
|
||||||
|
|
||||||
caf::PdmField<bool> m_performTransScaling;
|
caf::PdmField<bool> m_performTransScaling;
|
||||||
caf::PdmField<int> m_transScalingTimeStep;
|
caf::PdmField<int> m_transScalingTimeStep;
|
||||||
|
|||||||
+11
-32
@@ -33,10 +33,7 @@ void RicExportCompletionDataSettingsUi::ExportSplitType::setUp()
|
|||||||
{
|
{
|
||||||
addItem( RicExportCompletionDataSettingsUi::ExportSplit::UNIFIED_FILE, "UNIFIED_FILE", "Unified File" );
|
addItem( RicExportCompletionDataSettingsUi::ExportSplit::UNIFIED_FILE, "UNIFIED_FILE", "Unified File" );
|
||||||
addItem( RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL, "SPLIT_ON_WELL", "Split on Well" );
|
addItem( RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL, "SPLIT_ON_WELL", "Split on Well" );
|
||||||
addItem( RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL_AND_COMPLETION_TYPE,
|
setDefault( RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL );
|
||||||
"SPLIT_ON_WELL_AND_COMPLETION_TYPE",
|
|
||||||
"Split on Well and Completion Type" );
|
|
||||||
setDefault( RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL_AND_COMPLETION_TYPE );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@@ -49,14 +46,6 @@ void RicExportCompletionDataSettingsUi::CompdatExportType::setUp()
|
|||||||
setDefault( RicExportCompletionDataSettingsUi::CompdatExport::TRANSMISSIBILITIES );
|
setDefault( RicExportCompletionDataSettingsUi::CompdatExport::TRANSMISSIBILITIES );
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
|
||||||
void RicExportCompletionDataSettingsUi::CombinationModeType::setUp()
|
|
||||||
{
|
|
||||||
addItem( RicExportCompletionDataSettingsUi::CombinationMode::INDIVIDUALLY, "INDIVIDUALLY", "Individually" );
|
|
||||||
addItem( RicExportCompletionDataSettingsUi::CombinationMode::COMBINED, "COMBINED", "Combined" );
|
|
||||||
setDefault( RicExportCompletionDataSettingsUi::CombinationMode::INDIVIDUALLY );
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void RicExportCompletionDataSettingsUi::TransScalingWBHPSource::setUp()
|
void RicExportCompletionDataSettingsUi::TransScalingWBHPSource::setUp()
|
||||||
{
|
{
|
||||||
@@ -104,12 +93,19 @@ RicExportCompletionDataSettingsUi::RicExportCompletionDataSettingsUi()
|
|||||||
"definition",
|
"definition",
|
||||||
"" );
|
"" );
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_reportCompletionTypesSeparately, "ReportCompletionTypesSeparately", "Export Completion Types" );
|
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_exportDataSourceAsComment, "ExportDataSourceAsComment", true, "Comments" );
|
CAF_PDM_InitField( &m_exportDataSourceAsComment, "ExportDataSourceAsComment", true, "Comments" );
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_exportWelspec, "ExportWelspec", true, "WELSPEC keyword" );
|
CAF_PDM_InitField( &m_exportWelspec, "ExportWelspec", true, "WELSPEC keyword" );
|
||||||
CAF_PDM_InitField( &m_completionWelspecAfterMainBore, "CompletionWelspecAfterMainBore", true, "WELSEGS per Completion Type" );
|
|
||||||
|
const QString completionWelspecAfterMainBoreDesc = "If checked, export all mainbore well segments first, then completions. "
|
||||||
|
"Otherwise, export completion segments based on measured depth. "
|
||||||
|
"Applies to Fracture and Fishbones completions.";
|
||||||
|
CAF_PDM_InitField( &m_completionWelspecAfterMainBore,
|
||||||
|
"CompletionWelspecAfterMainBore",
|
||||||
|
true,
|
||||||
|
"Export completion well segments after main bore",
|
||||||
|
"",
|
||||||
|
completionWelspecAfterMainBoreDesc );
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_useCustomFileName, "UseCustomFileName", false, "Use Custom Filename" );
|
CAF_PDM_InitField( &m_useCustomFileName, "UseCustomFileName", false, "Use Custom Filename" );
|
||||||
CAF_PDM_InitField( &m_customFileName, "CustomFileName", {}, "Custom Filename" );
|
CAF_PDM_InitField( &m_customFileName, "CustomFileName", {}, "Custom Filename" );
|
||||||
@@ -127,14 +123,6 @@ void RicExportCompletionDataSettingsUi::enableIncludeMsw()
|
|||||||
includeMsw = true;
|
includeMsw = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RicExportCompletionDataSettingsUi::setCombinationMode( CombinationMode combinationMode )
|
|
||||||
{
|
|
||||||
m_reportCompletionTypesSeparately = combinationMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -167,14 +155,6 @@ void RicExportCompletionDataSettingsUi::showFishbonesInUi( bool enable )
|
|||||||
m_fishbonesEnabled = enable;
|
m_fishbonesEnabled = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
bool RicExportCompletionDataSettingsUi::reportCompletionsTypesIndividually() const
|
|
||||||
{
|
|
||||||
return m_reportCompletionTypesSeparately() == CombinationMode::INDIVIDUALLY;
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -351,7 +331,6 @@ void RicExportCompletionDataSettingsUi::defineUiOrdering( QString uiConfigName,
|
|||||||
{
|
{
|
||||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup( "File Settings" );
|
caf::PdmUiGroup* group = uiOrdering.addNewGroup( "File Settings" );
|
||||||
group->add( &fileSplit );
|
group->add( &fileSplit );
|
||||||
group->add( &m_reportCompletionTypesSeparately );
|
|
||||||
group->add( &folder );
|
group->add( &folder );
|
||||||
|
|
||||||
if ( fileSplit() == ExportSplit::UNIFIED_FILE )
|
if ( fileSplit() == ExportSplit::UNIFIED_FILE )
|
||||||
|
|||||||
-15
@@ -38,7 +38,6 @@ public:
|
|||||||
{
|
{
|
||||||
UNIFIED_FILE,
|
UNIFIED_FILE,
|
||||||
SPLIT_ON_WELL,
|
SPLIT_ON_WELL,
|
||||||
SPLIT_ON_WELL_AND_COMPLETION_TYPE,
|
|
||||||
};
|
};
|
||||||
using ExportSplitType = caf::AppEnum<ExportSplit>;
|
using ExportSplitType = caf::AppEnum<ExportSplit>;
|
||||||
|
|
||||||
@@ -50,14 +49,6 @@ public:
|
|||||||
};
|
};
|
||||||
using CompdatExportType = caf::AppEnum<CompdatExport>;
|
using CompdatExportType = caf::AppEnum<CompdatExport>;
|
||||||
|
|
||||||
// Exported in .proto file. Do not change without changing .proto
|
|
||||||
enum class CombinationMode
|
|
||||||
{
|
|
||||||
INDIVIDUALLY,
|
|
||||||
COMBINED,
|
|
||||||
};
|
|
||||||
using CombinationModeType = caf::AppEnum<CombinationMode>;
|
|
||||||
|
|
||||||
using TransScalingWBHPSource = caf::AppEnum<RicExportFractureCompletionsImpl::PressureDepletionWBHPSource>;
|
using TransScalingWBHPSource = caf::AppEnum<RicExportFractureCompletionsImpl::PressureDepletionWBHPSource>;
|
||||||
|
|
||||||
RicExportCompletionDataSettingsUi();
|
RicExportCompletionDataSettingsUi();
|
||||||
@@ -82,14 +73,10 @@ public:
|
|||||||
|
|
||||||
void enableIncludeMsw();
|
void enableIncludeMsw();
|
||||||
|
|
||||||
void setCombinationMode( CombinationMode combinationMode );
|
|
||||||
|
|
||||||
void showFractureInUi( bool enable );
|
void showFractureInUi( bool enable );
|
||||||
void showPerforationsInUi( bool enable );
|
void showPerforationsInUi( bool enable );
|
||||||
void showFishbonesInUi( bool enable );
|
void showFishbonesInUi( bool enable );
|
||||||
|
|
||||||
bool reportCompletionsTypesIndividually() const;
|
|
||||||
|
|
||||||
void setExportDataSourceAsComment( bool enable );
|
void setExportDataSourceAsComment( bool enable );
|
||||||
bool exportDataSourceAsComment() const;
|
bool exportDataSourceAsComment() const;
|
||||||
|
|
||||||
@@ -111,8 +98,6 @@ protected:
|
|||||||
std::map<int, std::vector<std::pair<QString, QString>>> generateWellProductionStartStrings();
|
std::map<int, std::vector<std::pair<QString, QString>>> generateWellProductionStartStrings();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<CombinationModeType> m_reportCompletionTypesSeparately;
|
|
||||||
|
|
||||||
caf::PdmField<bool> m_exportDataSourceAsComment;
|
caf::PdmField<bool> m_exportDataSourceAsComment;
|
||||||
caf::PdmField<bool> m_exportWelspec;
|
caf::PdmField<bool> m_exportWelspec;
|
||||||
caf::PdmField<bool> m_completionWelspecAfterMainBore;
|
caf::PdmField<bool> m_completionWelspecAfterMainBore;
|
||||||
|
|||||||
+3
-85
@@ -199,9 +199,6 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::map<size_t, std::vector<RigCompletionData>> completionsPerEclipseCellAllCompletionTypes;
|
std::map<size_t, std::vector<RigCompletionData>> completionsPerEclipseCellAllCompletionTypes;
|
||||||
std::map<size_t, std::vector<RigCompletionData>> completionsPerEclipseCellFishbones;
|
|
||||||
std::map<size_t, std::vector<RigCompletionData>> completionsPerEclipseCellFracture;
|
|
||||||
std::map<size_t, std::vector<RigCompletionData>> completionsPerEclipseCellPerforations;
|
|
||||||
|
|
||||||
for ( auto wellPathLateral : allWellPathLaterals )
|
for ( auto wellPathLateral : allWellPathLaterals )
|
||||||
{
|
{
|
||||||
@@ -220,7 +217,6 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
|||||||
exportSettings );
|
exportSettings );
|
||||||
|
|
||||||
appendCompletionData( &completionsPerEclipseCellAllCompletionTypes, perforationCompletionData );
|
appendCompletionData( &completionsPerEclipseCellAllCompletionTypes, perforationCompletionData );
|
||||||
appendCompletionData( &completionsPerEclipseCellPerforations, perforationCompletionData );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( exportSettings.includeFishbones )
|
if ( exportSettings.includeFishbones )
|
||||||
@@ -233,7 +229,6 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
|||||||
exportSettings );
|
exportSettings );
|
||||||
|
|
||||||
appendCompletionData( &completionsPerEclipseCellAllCompletionTypes, fishbonesCompletionData );
|
appendCompletionData( &completionsPerEclipseCellAllCompletionTypes, fishbonesCompletionData );
|
||||||
appendCompletionData( &completionsPerEclipseCellFishbones, fishbonesCompletionData );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( exportSettings.includeFractures() )
|
if ( exportSettings.includeFractures() )
|
||||||
@@ -253,33 +248,12 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
|||||||
exportSettings.transScalingWBHP() ) );
|
exportSettings.transScalingWBHP() ) );
|
||||||
|
|
||||||
appendCompletionData( &completionsPerEclipseCellAllCompletionTypes, fractureCompletionData );
|
appendCompletionData( &completionsPerEclipseCellAllCompletionTypes, fractureCompletionData );
|
||||||
appendCompletionData( &completionsPerEclipseCellFracture, fractureCompletionData );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( exportSettings.reportCompletionsTypesIndividually() )
|
for ( auto& data : completionsPerEclipseCellAllCompletionTypes )
|
||||||
{
|
{
|
||||||
for ( auto& data : completionsPerEclipseCellFracture )
|
completions.push_back( combineEclipseCellCompletions( data.second, exportSettings ) );
|
||||||
{
|
|
||||||
completions.push_back( combineEclipseCellCompletions( data.second, exportSettings ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
for ( auto& data : completionsPerEclipseCellFishbones )
|
|
||||||
{
|
|
||||||
completions.push_back( combineEclipseCellCompletions( data.second, exportSettings ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
for ( auto& data : completionsPerEclipseCellPerforations )
|
|
||||||
{
|
|
||||||
completions.push_back( combineEclipseCellCompletions( data.second, exportSettings ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for ( auto& data : completionsPerEclipseCellAllCompletionTypes )
|
|
||||||
{
|
|
||||||
completions.push_back( combineEclipseCellCompletions( data.second, exportSettings ) );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
progress.incrementProgress();
|
progress.incrementProgress();
|
||||||
@@ -329,7 +303,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString fileName = QString( "%1_UnifiedCompletions_%2" ).arg( wellPath->name() ).arg( eclipseCaseName );
|
QString fileName = QString( "%1_Completions_%2" ).arg( wellPath->name() ).arg( eclipseCaseName );
|
||||||
sortAndExportCompletionsToFile( exportSettings.caseToApply,
|
sortAndExportCompletionsToFile( exportSettings.caseToApply,
|
||||||
exportSettings.folder,
|
exportSettings.folder,
|
||||||
fileName,
|
fileName,
|
||||||
@@ -340,62 +314,6 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
|||||||
exportSettings.exportWelspec() );
|
exportSettings.exportWelspec() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( exportSettings.fileSplit == RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL_AND_COMPLETION_TYPE )
|
|
||||||
{
|
|
||||||
std::vector<RigCompletionData::CompletionType> completionTypes;
|
|
||||||
completionTypes.push_back( RigCompletionData::CompletionType::FISHBONES );
|
|
||||||
completionTypes.push_back( RigCompletionData::CompletionType::FRACTURE );
|
|
||||||
completionTypes.push_back( RigCompletionData::CompletionType::PERFORATION );
|
|
||||||
|
|
||||||
for ( const auto& completionType : completionTypes )
|
|
||||||
{
|
|
||||||
for ( auto wellPath : wellPaths )
|
|
||||||
{
|
|
||||||
std::vector<RigCompletionData> completionsForWell;
|
|
||||||
for ( const auto& completion : completions )
|
|
||||||
{
|
|
||||||
if ( completionType == completion.completionType() )
|
|
||||||
{
|
|
||||||
if ( wellPath == topLevelWellPath( completion ) )
|
|
||||||
{
|
|
||||||
completionsForWell.push_back( completion );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( completionsForWell.empty() ) continue;
|
|
||||||
|
|
||||||
std::vector<RicWellPathFractureReportItem> reportItemsForWell;
|
|
||||||
if ( completionType == RigCompletionData::CompletionType::FRACTURE )
|
|
||||||
{
|
|
||||||
for ( const auto& fracItem : fractureDataReportItems )
|
|
||||||
{
|
|
||||||
if ( fracItem.wellPathNameForExport() == wellPath->completionSettings()->wellNameForExport() )
|
|
||||||
{
|
|
||||||
reportItemsForWell.push_back( fracItem );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
QString completionTypeText;
|
|
||||||
if ( completionType == RigCompletionData::CompletionType::FISHBONES ) completionTypeText = "Fishbones";
|
|
||||||
if ( completionType == RigCompletionData::CompletionType::FRACTURE ) completionTypeText = "Fracture";
|
|
||||||
if ( completionType == RigCompletionData::CompletionType::PERFORATION ) completionTypeText = "Perforation";
|
|
||||||
|
|
||||||
QString fileName = QString( "%1_%2_%3" ).arg( wellPath->name() ).arg( completionTypeText ).arg( eclipseCaseName );
|
|
||||||
sortAndExportCompletionsToFile( exportSettings.caseToApply,
|
|
||||||
exportSettings.folder,
|
|
||||||
fileName,
|
|
||||||
completionsForWell,
|
|
||||||
reportItemsForWell,
|
|
||||||
exportSettings.compdatExport,
|
|
||||||
exportSettings.exportDataSourceAsComment(),
|
|
||||||
exportSettings.exportWelspec() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( exportSettings.includeMsw )
|
if ( exportSettings.includeMsw )
|
||||||
|
|||||||
+14
-10
@@ -41,14 +41,19 @@ namespace internal
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigMswUnifiedData extractUnifiedMswData( RimEclipseCase* eclipseCase, int timeStep, const std::vector<RimWellPath*>& wellPaths )
|
RigMswUnifiedData
|
||||||
|
extractUnifiedMswData( RimEclipseCase* eclipseCase,
|
||||||
|
int timeStep,
|
||||||
|
const std::vector<RimWellPath*>& wellPaths,
|
||||||
|
RicWellPathExportMswTableData::CompletionType completionType = RicWellPathExportMswTableData::CompletionType::ALL )
|
||||||
{
|
{
|
||||||
RigMswUnifiedData unifiedData;
|
RigMswUnifiedData unifiedData;
|
||||||
|
|
||||||
for ( RimWellPath* wellPath : wellPaths )
|
for ( RimWellPath* wellPath : wellPaths )
|
||||||
{
|
{
|
||||||
bool exportAfterMainbore = true;
|
bool exportAfterMainbore = true;
|
||||||
auto wellData = RicWellPathExportMswTableData::extractSingleWellMswData( eclipseCase, wellPath, timeStep, exportAfterMainbore );
|
auto wellData =
|
||||||
|
RicWellPathExportMswTableData::extractSingleWellMswData( eclipseCase, wellPath, timeStep, exportAfterMainbore, completionType );
|
||||||
if ( wellData.has_value() )
|
if ( wellData.has_value() )
|
||||||
{
|
{
|
||||||
unifiedData.addWellData( std::move( wellData.value() ) );
|
unifiedData.addWellData( std::move( wellData.value() ) );
|
||||||
@@ -65,8 +70,8 @@ void exportUnifiedMswData( const RicExportCompletionDataSettingsUi& exportSettin
|
|||||||
const QString& exportFolder,
|
const QString& exportFolder,
|
||||||
const std::vector<RimWellPath*>& wellPaths )
|
const std::vector<RimWellPath*>& wellPaths )
|
||||||
{
|
{
|
||||||
// Extract all MSW data using new approach
|
auto completionType = RicWellPathExportMswTableData::convertFromExportSettings( exportSettings );
|
||||||
RigMswUnifiedData unifiedData = extractUnifiedMswData( exportSettings.caseToApply, exportSettings.timeStep, wellPaths );
|
RigMswUnifiedData unifiedData = extractUnifiedMswData( exportSettings.caseToApply, exportSettings.timeStep, wellPaths, completionType );
|
||||||
|
|
||||||
if ( unifiedData.isEmpty() )
|
if ( unifiedData.isEmpty() )
|
||||||
{
|
{
|
||||||
@@ -134,11 +139,12 @@ void exportSplitMswData( const RicExportCompletionDataSettingsUi& exportSettings
|
|||||||
{
|
{
|
||||||
for ( const auto& wellPath : wellPaths )
|
for ( const auto& wellPath : wellPaths )
|
||||||
{
|
{
|
||||||
// Extract data for single well
|
auto completionType = RicWellPathExportMswTableData::convertFromExportSettings( exportSettings );
|
||||||
auto wellDataResult = RicWellPathExportMswTableData::extractSingleWellMswData( exportSettings.caseToApply,
|
auto wellDataResult = RicWellPathExportMswTableData::extractSingleWellMswData( exportSettings.caseToApply,
|
||||||
wellPath,
|
wellPath,
|
||||||
exportSettings.timeStep,
|
exportSettings.timeStep,
|
||||||
exportSettings.exportCompletionWelspecAfterMainBore() );
|
exportSettings.exportCompletionWelspecAfterMainBore(),
|
||||||
|
completionType );
|
||||||
|
|
||||||
if ( !wellDataResult.has_value() )
|
if ( !wellDataResult.has_value() )
|
||||||
{
|
{
|
||||||
@@ -148,7 +154,7 @@ void exportSplitMswData( const RicExportCompletionDataSettingsUi& exportSettings
|
|||||||
auto wellData = wellDataResult.value();
|
auto wellData = wellDataResult.value();
|
||||||
|
|
||||||
// Set up file names
|
// Set up file names
|
||||||
QString wellFileName = QString( "%1_Completions_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
QString wellFileName = QString( "%1_Completions_%2_MSW" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||||
|
|
||||||
// Create main grid file
|
// Create main grid file
|
||||||
auto mainGridFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportFolder,
|
auto mainGridFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportFolder,
|
||||||
@@ -190,9 +196,7 @@ void exportSplitMswData( const RicExportCompletionDataSettingsUi& exportSettings
|
|||||||
void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions( const RicExportCompletionDataSettingsUi& exportSettings,
|
void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions( const RicExportCompletionDataSettingsUi& exportSettings,
|
||||||
const std::vector<RimWellPath*>& wellPaths )
|
const std::vector<RimWellPath*>& wellPaths )
|
||||||
{
|
{
|
||||||
// There are two modes of MSW export, either split on well or unified. The split on completion type is used for export of COMPDAT
|
if ( exportSettings.fileSplit() == RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL )
|
||||||
if ( exportSettings.fileSplit() == RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL ||
|
|
||||||
exportSettings.fileSplit() == RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL_AND_COMPLETION_TYPE )
|
|
||||||
{
|
{
|
||||||
internal::exportSplitMswData( exportSettings, exportSettings.folder(), wellPaths );
|
internal::exportSplitMswData( exportSettings, exportSettings.folder(), wellPaths );
|
||||||
}
|
}
|
||||||
|
|||||||
+76
-23
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "RiaLogging.h"
|
#include "RiaLogging.h"
|
||||||
|
|
||||||
|
#include "RicExportCompletionDataSettingsUi.h"
|
||||||
#include "RicExportFractureCompletionsImpl.h"
|
#include "RicExportFractureCompletionsImpl.h"
|
||||||
#include "RicMswCompletions.h"
|
#include "RicMswCompletions.h"
|
||||||
#include "RicMswExportInfo.h"
|
#include "RicMswExportInfo.h"
|
||||||
@@ -65,7 +66,8 @@ constexpr double VALVE_SEGMENT_LENGTH = 0.1;
|
|||||||
std::expected<RigMswTableData, std::string> RicWellPathExportMswTableData::extractSingleWellMswData( RimEclipseCase* eclipseCase,
|
std::expected<RigMswTableData, std::string> RicWellPathExportMswTableData::extractSingleWellMswData( RimEclipseCase* eclipseCase,
|
||||||
RimWellPath* wellPath,
|
RimWellPath* wellPath,
|
||||||
int timeStep,
|
int timeStep,
|
||||||
bool exportCompletionsAfterMainBoreSegments )
|
bool exportCompletionsAfterMainBoreSegments,
|
||||||
|
CompletionType completionType )
|
||||||
{
|
{
|
||||||
if ( !eclipseCase || !wellPath || eclipseCase->eclipseCaseData() == nullptr )
|
if ( !eclipseCase || !wellPath || eclipseCase->eclipseCaseData() == nullptr )
|
||||||
{
|
{
|
||||||
@@ -84,15 +86,29 @@ std::expected<RigMswTableData, std::string> RicWellPathExportMswTableData::extra
|
|||||||
RiaDefines::EclipseUnitSystem unitSystem = eclipseCase->eclipseCaseData()->unitsType();
|
RiaDefines::EclipseUnitSystem unitSystem = eclipseCase->eclipseCaseData()->unitsType();
|
||||||
RicMswExportInfo exportInfo( wellPath, unitSystem, initialMD, mswParameters->lengthAndDepth().text(), mswParameters->pressureDrop().text() );
|
RicMswExportInfo exportInfo( wellPath, unitSystem, initialMD, mswParameters->lengthAndDepth().text(), mswParameters->pressureDrop().text() );
|
||||||
|
|
||||||
// Generate all completion data using existing functions
|
// Generate completion data based on the completion type parameter
|
||||||
if ( !generatePerforationsMswExportInfo( eclipseCase, wellPath, timeStep, initialMD, cellIntersections, &exportInfo, exportInfo.mainBoreBranch() ) )
|
const bool createSegmentsForPerforations = ( completionType & CompletionType::PERFORATIONS ) == CompletionType::PERFORATIONS;
|
||||||
|
if ( !generateWellSegmentsForMswExportInfo( eclipseCase,
|
||||||
|
wellPath,
|
||||||
|
createSegmentsForPerforations,
|
||||||
|
timeStep,
|
||||||
|
initialMD,
|
||||||
|
cellIntersections,
|
||||||
|
&exportInfo,
|
||||||
|
exportInfo.mainBoreBranch() ) )
|
||||||
{
|
{
|
||||||
return std::unexpected( "Failed to generate perforations MSW export info" );
|
return std::unexpected( "Failed to generate perforations MSW export info" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add other completion types
|
if ( ( completionType & CompletionType::FISHBONES ) == CompletionType::FISHBONES )
|
||||||
appendFishbonesMswExportInfo( eclipseCase, wellPath, initialMD, cellIntersections, &exportInfo, exportInfo.mainBoreBranch() );
|
{
|
||||||
appendFracturesMswExportInfo( eclipseCase, wellPath, initialMD, cellIntersections, &exportInfo, exportInfo.mainBoreBranch() );
|
appendFishbonesMswExportInfo( eclipseCase, wellPath, initialMD, cellIntersections, &exportInfo, exportInfo.mainBoreBranch() );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ( completionType & CompletionType::FRACTURES ) == CompletionType::FRACTURES )
|
||||||
|
{
|
||||||
|
appendFracturesMswExportInfo( eclipseCase, wellPath, initialMD, cellIntersections, &exportInfo, exportInfo.mainBoreBranch() );
|
||||||
|
}
|
||||||
|
|
||||||
updateDataForMultipleItemsInSameGridCell( exportInfo.mainBoreBranch() );
|
updateDataForMultipleItemsInSameGridCell( exportInfo.mainBoreBranch() );
|
||||||
|
|
||||||
@@ -124,6 +140,32 @@ std::expected<RigMswTableData, std::string> RicWellPathExportMswTableData::extra
|
|||||||
return tableData;
|
return tableData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RicWellPathExportMswTableData::CompletionType
|
||||||
|
RicWellPathExportMswTableData::convertFromExportSettings( const RicExportCompletionDataSettingsUi& settings )
|
||||||
|
{
|
||||||
|
CompletionType result = CompletionType::NONE;
|
||||||
|
|
||||||
|
if ( settings.includePerforations() )
|
||||||
|
{
|
||||||
|
result |= CompletionType::PERFORATIONS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( settings.includeFishbones() )
|
||||||
|
{
|
||||||
|
result |= CompletionType::FISHBONES;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( settings.includeFractures() )
|
||||||
|
{
|
||||||
|
result |= CompletionType::FRACTURES;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -146,8 +188,16 @@ void RicWellPathExportMswTableData::generateFishbonesMswExportInfoForWell( const
|
|||||||
auto cellIntersections = generateCellSegments( eclipseCase, wellPath );
|
auto cellIntersections = generateCellSegments( eclipseCase, wellPath );
|
||||||
double initialMD = computeIntitialMeasuredDepth( eclipseCase, wellPath, mswParameters, cellIntersections );
|
double initialMD = computeIntitialMeasuredDepth( eclipseCase, wellPath, mswParameters, cellIntersections );
|
||||||
|
|
||||||
int timeStep = 0;
|
int timeStep = 0;
|
||||||
if ( !generatePerforationsMswExportInfo( eclipseCase, wellPath, timeStep, initialMD, cellIntersections, exportInfo, exportInfo->mainBoreBranch() ) )
|
const bool createSegmentsForPerforations = true;
|
||||||
|
if ( !generateWellSegmentsForMswExportInfo( eclipseCase,
|
||||||
|
wellPath,
|
||||||
|
createSegmentsForPerforations,
|
||||||
|
timeStep,
|
||||||
|
initialMD,
|
||||||
|
cellIntersections,
|
||||||
|
exportInfo,
|
||||||
|
exportInfo->mainBoreBranch() ) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -490,15 +540,17 @@ bool RicWellPathExportMswTableData::appendFracturesMswExportInfo( RimEclipseCase
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RicWellPathExportMswTableData::generatePerforationsMswExportInfo( const RimEclipseCase* eclipseCase,
|
bool RicWellPathExportMswTableData::generateWellSegmentsForMswExportInfo( const RimEclipseCase* eclipseCase,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
int timeStep,
|
bool createSegmentsForPerforations,
|
||||||
double initialMD,
|
int timeStep,
|
||||||
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
|
double initialMD,
|
||||||
gsl::not_null<RicMswExportInfo*> exportInfo,
|
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
|
||||||
gsl::not_null<RicMswBranch*> branch )
|
gsl::not_null<RicMswExportInfo*> exportInfo,
|
||||||
|
gsl::not_null<RicMswBranch*> branch )
|
||||||
{
|
{
|
||||||
auto perforationIntervals = wellPath->perforationIntervalCollection()->activePerforations();
|
auto perforationIntervals = createSegmentsForPerforations ? wellPath->perforationIntervalCollection()->activePerforations()
|
||||||
|
: std::vector<const RimPerforationInterval*>();
|
||||||
|
|
||||||
// Check if there exist overlap between valves in a perforation interval
|
// Check if there exist overlap between valves in a perforation interval
|
||||||
for ( const auto& perfInterval : perforationIntervals )
|
for ( const auto& perfInterval : perforationIntervals )
|
||||||
@@ -556,13 +608,14 @@ bool RicWellPathExportMswTableData::generatePerforationsMswExportInfo( const Rim
|
|||||||
// Start MD of child well path at the tie in location
|
// Start MD of child well path at the tie in location
|
||||||
const double tieInOnParentWellPath = childWellPath->wellPathTieIn() ? childWellPath->wellPathTieIn()->tieInMeasuredDepth() : initialMD;
|
const double tieInOnParentWellPath = childWellPath->wellPathTieIn() ? childWellPath->wellPathTieIn()->tieInMeasuredDepth() : initialMD;
|
||||||
|
|
||||||
if ( generatePerforationsMswExportInfo( eclipseCase,
|
if ( generateWellSegmentsForMswExportInfo( eclipseCase,
|
||||||
childWellPath,
|
childWellPath,
|
||||||
timeStep,
|
createSegmentsForPerforations,
|
||||||
tieInOnParentWellPath,
|
timeStep,
|
||||||
childCellIntersections,
|
tieInOnParentWellPath,
|
||||||
exportInfo,
|
childCellIntersections,
|
||||||
childMswBranch.get() ) )
|
exportInfo,
|
||||||
|
childMswBranch.get() ) )
|
||||||
{
|
{
|
||||||
branch->addChildBranch( std::move( childMswBranch ) );
|
branch->addChildBranch( std::move( childMswBranch ) );
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-8
@@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
#include "RiaDefines.h"
|
#include "RiaDefines.h"
|
||||||
|
|
||||||
|
#include "Tools/enum_bitmask.hpp"
|
||||||
|
|
||||||
#include <gsl/gsl>
|
#include <gsl/gsl>
|
||||||
|
|
||||||
#include <expected>
|
#include <expected>
|
||||||
@@ -49,11 +51,23 @@ struct WellPathCellIntersectionInfo;
|
|||||||
class RicWellPathExportMswTableData
|
class RicWellPathExportMswTableData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
enum class CompletionType
|
||||||
|
{
|
||||||
|
NONE = 0x00,
|
||||||
|
PERFORATIONS = 0x01,
|
||||||
|
FISHBONES = 0x02,
|
||||||
|
FRACTURES = 0x04,
|
||||||
|
ALL = PERFORATIONS | FISHBONES | FRACTURES
|
||||||
|
};
|
||||||
|
|
||||||
// The intention is to extract MSW data from a single well. Any handling of multiple wells is supposed to be managed in a different class
|
// The intention is to extract MSW data from a single well. Any handling of multiple wells is supposed to be managed in a different class
|
||||||
static std::expected<RigMswTableData, std::string> extractSingleWellMswData( RimEclipseCase* eclipseCase,
|
static std::expected<RigMswTableData, std::string> extractSingleWellMswData( RimEclipseCase* eclipseCase,
|
||||||
RimWellPath* wellPath,
|
RimWellPath* wellPath,
|
||||||
int timeStep,
|
int timeStep,
|
||||||
bool exportCompletionsAfterMainBoreSegments = true );
|
bool exportCompletionsAfterMainBoreSegments = true,
|
||||||
|
CompletionType completionType = CompletionType::ALL );
|
||||||
|
|
||||||
|
static CompletionType convertFromExportSettings( const class RicExportCompletionDataSettingsUi& settings );
|
||||||
|
|
||||||
static void generateFishbonesMswExportInfoForWell( const RimEclipseCase* eclipseCase,
|
static void generateFishbonesMswExportInfoForWell( const RimEclipseCase* eclipseCase,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
@@ -63,13 +77,14 @@ public:
|
|||||||
private:
|
private:
|
||||||
static void updateDataForMultipleItemsInSameGridCell( gsl::not_null<RicMswBranch*> branch );
|
static void updateDataForMultipleItemsInSameGridCell( gsl::not_null<RicMswBranch*> branch );
|
||||||
|
|
||||||
static bool generatePerforationsMswExportInfo( const RimEclipseCase* eclipseCase,
|
static bool generateWellSegmentsForMswExportInfo( const RimEclipseCase* eclipseCase,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
int timeStep,
|
bool createSegmentsForPerforations,
|
||||||
double initialMD,
|
int timeStep,
|
||||||
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
|
double initialMD,
|
||||||
gsl::not_null<RicMswExportInfo*> exportInfo,
|
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
|
||||||
gsl::not_null<RicMswBranch*> branch );
|
gsl::not_null<RicMswExportInfo*> exportInfo,
|
||||||
|
gsl::not_null<RicMswBranch*> branch );
|
||||||
|
|
||||||
static void appendFishbonesMswExportInfo( const RimEclipseCase* eclipseCase,
|
static void appendFishbonesMswExportInfo( const RimEclipseCase* eclipseCase,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
@@ -169,3 +184,5 @@ private:
|
|||||||
|
|
||||||
static std::vector<RimWellPath*> wellPathsWithTieIn( const RimWellPath* wellPath );
|
static std::vector<RimWellPath*> wellPathsWithTieIn( const RimWellPath* wellPath );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ENABLE_BITMASK_OPERATORS( RicWellPathExportMswTableData::CompletionType )
|
||||||
@@ -75,7 +75,6 @@ message ExportPropertyInViewsRequest {
|
|||||||
enum CompdatExportSplit {
|
enum CompdatExportSplit {
|
||||||
UNIFIED_FILE = 0;
|
UNIFIED_FILE = 0;
|
||||||
SPLIT_ON_WELL = 1;
|
SPLIT_ON_WELL = 1;
|
||||||
SPLIT_ON_WELL_AND_COMPLETION_TYPE = 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum CompdatExportType {
|
enum CompdatExportType {
|
||||||
|
|||||||
@@ -425,7 +425,6 @@ def export_well_path_completions(
|
|||||||
----------------------------------- | ------------
|
----------------------------------- | ------------
|
||||||
"UNIFIED_FILE" | A single file with all combined transmissibilities
|
"UNIFIED_FILE" | A single file with all combined transmissibilities
|
||||||
"SPLIT_ON_WELL" | One file for each well with combined transmissibilities
|
"SPLIT_ON_WELL" | One file for each well with combined transmissibilities
|
||||||
"SPLIT_ON_WELL_AND_COMPLETION_TYPE" | One file for each completion type for each well
|
|
||||||
|
|
||||||
**Enum compdat_export**::
|
**Enum compdat_export**::
|
||||||
|
|
||||||
|
|||||||
@@ -123,7 +123,6 @@ def export_sim_well_fracture_completions(
|
|||||||
----------------------------------- | ------------
|
----------------------------------- | ------------
|
||||||
"UNIFIED_FILE" <b>Default Option</b>| A single file with all transmissibilities
|
"UNIFIED_FILE" <b>Default Option</b>| A single file with all transmissibilities
|
||||||
"SPLIT_ON_WELL" | One file for each well transmissibilities
|
"SPLIT_ON_WELL" | One file for each well transmissibilities
|
||||||
"SPLIT_ON_WELL_AND_COMPLETION_TYPE" | One file for each completion type for each well
|
|
||||||
|
|
||||||
**Enum compdat_export**::
|
**Enum compdat_export**::
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user