mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 07:03:25 -06:00
Rename to RicfExportSimWellFractureCompletions Add missing parameters to RicfExportWellPathCompletions Add support for individual export multiple completion types into separate sections of same file
This commit is contained in:
parent
dfa87b218f
commit
12fcb124c7
@ -6,7 +6,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicfComputeCaseGroupStatistics.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfExportMsw.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfExportMultiCaseSnapshots.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfExportProperty.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfExportSimWellCompletions.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfExportSimWellFractureCompletions.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfExportSnapshots.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfExportWellPathCompletions.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfLoadCase.h
|
||||
@ -29,7 +29,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicfComputeCaseGroupStatistics.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfExportMsw.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfExportMultiCaseSnapshots.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfExportProperty.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfExportSimWellCompletions.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfExportSimWellFractureCompletions.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfExportSnapshots.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfExportWellPathCompletions.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicfLoadCase.cpp
|
||||
|
@ -16,7 +16,7 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RicfExportSimWellCompletions.h"
|
||||
#include "RicfExportSimWellFractureCompletions.h"
|
||||
|
||||
#include "RicfCommandFileExecutor.h"
|
||||
|
||||
@ -37,28 +37,28 @@
|
||||
|
||||
#include "CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RicfExportSimWellCompletions, "exportSimWellCompletions");
|
||||
CAF_PDM_SOURCE_INIT(RicfExportSimWellFractureCompletions, "exportSimWellFractureCompletions");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicfExportSimWellCompletions::RicfExportSimWellCompletions()
|
||||
RicfExportSimWellFractureCompletions::RicfExportSimWellFractureCompletions()
|
||||
{
|
||||
RICF_InitField(&m_caseId, "case", -1, "Case ID", "", "", "");
|
||||
RICF_InitField(&m_timeStep, "timeStep", -1, "Time Step Index", "", "", "");
|
||||
RICF_InitField(&m_wellPathNames, "wellPathNames", std::vector<QString>(), "Well Path Names", "", "", "");
|
||||
RICF_InitField(&m_wellSelection, "wellSelection", RicExportCompletionDataSettingsUi::WellSelectionType(), "Well Selection", "", "", "");
|
||||
RICF_InitField(&m_fileSplit, "fileSplit", RicExportCompletionDataSettingsUi::ExportSplitType(), "File Split", "", "", "");
|
||||
RICF_InitField(&m_compdatExport, "compdatExport", RicExportCompletionDataSettingsUi::CompdatExportType(), "Compdat Export", "", "", "");
|
||||
RICF_InitField(&m_caseId, "case", -1, "Case ID", "", "", "");
|
||||
RICF_InitField(&m_timeStep, "timeStep", -1, "Time Step Index", "", "", "");
|
||||
RICF_InitField(&m_simWellNames, "simulationWellNames", std::vector<QString>(), "Simulation Well Names", "", "", "");
|
||||
RICF_InitField(&m_fileSplit, "fileSplit", RicExportCompletionDataSettingsUi::ExportSplitType(), "File Split", "", "", "");
|
||||
RICF_InitField(&m_compdatExport, "compdatExport", RicExportCompletionDataSettingsUi::CompdatExportType(), "Compdat Export", "", "", "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicfExportSimWellCompletions::execute()
|
||||
void RicfExportSimWellFractureCompletions::execute()
|
||||
{
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData();
|
||||
|
||||
exportSettings->timeStep = m_timeStep;
|
||||
exportSettings->fileSplit = m_fileSplit;
|
||||
exportSettings->compdatExport = m_compdatExport;
|
||||
@ -102,7 +102,7 @@ void RicfExportSimWellCompletions::execute()
|
||||
}
|
||||
|
||||
std::vector<RimSimWellInView*> simWells;
|
||||
if (m_wellPathNames().empty())
|
||||
if (m_simWellNames().empty())
|
||||
{
|
||||
std::copy(view->wellCollection()->wells.begin(),
|
||||
view->wellCollection()->wells.end(),
|
||||
@ -110,7 +110,7 @@ void RicfExportSimWellCompletions::execute()
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const QString& wellPathName : m_wellPathNames())
|
||||
for (const QString& wellPathName : m_simWellNames())
|
||||
{
|
||||
RimSimWellInView* simWell = view->wellCollection()->findWell(wellPathName);
|
||||
if (simWell)
|
@ -30,21 +30,21 @@
|
||||
//
|
||||
//
|
||||
//==================================================================================================
|
||||
class RicfExportSimWellCompletions : public RicfCommandObject
|
||||
class RicfExportSimWellFractureCompletions : public RicfCommandObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RicfExportSimWellCompletions();
|
||||
RicfExportSimWellFractureCompletions();
|
||||
|
||||
virtual void execute() override;
|
||||
|
||||
private:
|
||||
|
||||
caf::PdmField<int> m_caseId;
|
||||
caf::PdmField<int> m_timeStep;
|
||||
caf::PdmField< std::vector<QString> > m_wellPathNames;
|
||||
caf::PdmField<RicExportCompletionDataSettingsUi::WellSelectionType> m_wellSelection;
|
||||
|
||||
caf::PdmField< std::vector<QString> > m_simWellNames;
|
||||
|
||||
caf::PdmField<RicExportCompletionDataSettingsUi::ExportSplitType> m_fileSplit;
|
||||
caf::PdmField<RicExportCompletionDataSettingsUi::CompdatExportType> m_compdatExport;
|
||||
};
|
@ -43,12 +43,17 @@ RicfExportWellPathCompletions::RicfExportWellPathCompletions()
|
||||
RICF_InitField(&m_caseId, "caseId", -1, "Case ID", "", "", "");
|
||||
RICF_InitField(&m_timeStep, "timeStep", -1, "Time Step Index", "", "", "");
|
||||
RICF_InitField(&m_wellPathNames, "wellPathNames", std::vector<QString>(), "Well Path Names", "", "", "");
|
||||
RICF_InitField(&m_wellSelection, "wellSelection", RicExportCompletionDataSettingsUi::WellSelectionType(), "Well Selection", "", "", "");
|
||||
|
||||
RICF_InitField(&m_fileSplit, "fileSplit", RicExportCompletionDataSettingsUi::ExportSplitType(), "File Split", "", "", "");
|
||||
RICF_InitField(&m_compdatExport, "compdatExport", RicExportCompletionDataSettingsUi::CompdatExportType(), "Compdat Export", "", "", "");
|
||||
RICF_InitField(&m_includePerforations, "includePerforations", true, "Include Perforations", "", "", "");
|
||||
RICF_InitField(&m_includeFishbones, "includeFishbones", true, "Include Fishbones", "", "", "");
|
||||
RICF_InitField(&m_excludeMainBoreForFishbones, "excludeMainBoreForFishbones", false, "Exclude Main Bore for Fishbones", "", "", "");
|
||||
RICF_InitField(&m_combinationMode, "combinationMode", RicExportCompletionDataSettingsUi::CombinationModeType(), "Combination Mode", "", "", "");
|
||||
|
||||
RICF_InitField(&m_useLateralNTG, "useNtgHorizontally", false, "Use NTG Horizontally", "", "", "");
|
||||
RICF_InitField(&m_includePerforations, "includePerforations", true, "Include Perforations", "", "", "");
|
||||
RICF_InitField(&m_includeFishbones, "includeFishbones", true, "Include Fishbones", "", "", "");
|
||||
RICF_InitField(&m_includeFractures, "includeFractures", true, "Include Fractures", "", "", "");
|
||||
|
||||
RICF_InitField(&m_excludeMainBoreForFishbones, "excludeMainBoreForFishbones", false, "Exclude Main Bore for Fishbones", "", "", "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -58,12 +63,26 @@ void RicfExportWellPathCompletions::execute()
|
||||
{
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData();
|
||||
exportSettings->timeStep = m_timeStep;
|
||||
|
||||
if (m_timeStep < 0)
|
||||
{
|
||||
exportSettings->timeStep = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
exportSettings->timeStep = m_timeStep;
|
||||
}
|
||||
|
||||
exportSettings->fileSplit = m_fileSplit;
|
||||
exportSettings->compdatExport = m_compdatExport;
|
||||
|
||||
exportSettings->useLateralNTG = m_useLateralNTG;
|
||||
exportSettings->includePerforations = m_includePerforations;
|
||||
exportSettings->includeFishbones = m_includeFishbones;
|
||||
exportSettings->excludeMainBoreForFishbones = m_excludeMainBoreForFishbones;
|
||||
exportSettings->includeFractures = m_includeFractures;
|
||||
|
||||
exportSettings->setCombinationMode(m_combinationMode());
|
||||
|
||||
{
|
||||
bool foundCase = false;
|
||||
|
@ -44,10 +44,14 @@ private:
|
||||
caf::PdmField<int> m_caseId;
|
||||
caf::PdmField<int> m_timeStep;
|
||||
caf::PdmField< std::vector<QString> > m_wellPathNames;
|
||||
caf::PdmField<RicExportCompletionDataSettingsUi::WellSelectionType> m_wellSelection;
|
||||
|
||||
caf::PdmField<RicExportCompletionDataSettingsUi::ExportSplitType> m_fileSplit;
|
||||
caf::PdmField<RicExportCompletionDataSettingsUi::CompdatExportType> m_compdatExport;
|
||||
caf::PdmField<RicExportCompletionDataSettingsUi::CombinationModeType> m_combinationMode;
|
||||
|
||||
caf::PdmField<bool> m_useLateralNTG;
|
||||
caf::PdmField<bool> m_includePerforations;
|
||||
caf::PdmField<bool> m_includeFishbones;
|
||||
caf::PdmField<bool> m_includeFractures;
|
||||
caf::PdmField<bool> m_excludeMainBoreForFishbones;
|
||||
};
|
||||
|
@ -29,15 +29,6 @@ namespace caf
|
||||
setDefault(RicExportCompletionDataSettingsUi::UNIFIED_FILE);
|
||||
}
|
||||
|
||||
template<>
|
||||
void RicExportCompletionDataSettingsUi::WellSelectionType::setUp()
|
||||
{
|
||||
addItem(RicExportCompletionDataSettingsUi::ALL_WELLS, "ALL_WELLS", "All Wells");
|
||||
addItem(RicExportCompletionDataSettingsUi::CHECKED_WELLS, "CHECKED_WELLS", "Checked Wells");
|
||||
addItem(RicExportCompletionDataSettingsUi::SELECTED_WELLS, "SELECTED_WELLS", "Selected Wells");
|
||||
setDefault(RicExportCompletionDataSettingsUi::ALL_WELLS);
|
||||
}
|
||||
|
||||
template<>
|
||||
void RicExportCompletionDataSettingsUi::CompdatExportType::setUp()
|
||||
{
|
||||
@ -45,6 +36,14 @@ namespace caf
|
||||
addItem(RicExportCompletionDataSettingsUi::WPIMULT_AND_DEFAULT_CONNECTION_FACTORS, "WPIMULT_AND_DEFAULT_CONNECTION_FACTORS", "Default Connection Factors and WPIMULT (Fractures Not Supported)");
|
||||
setDefault(RicExportCompletionDataSettingsUi::TRANSMISSIBILITIES);
|
||||
}
|
||||
|
||||
template<>
|
||||
void RicExportCompletionDataSettingsUi::CombinationModeType::setUp()
|
||||
{
|
||||
addItem(RicExportCompletionDataSettingsUi::INDIVIDUALLY, "INDIVIDUALLY", "Individually");
|
||||
addItem(RicExportCompletionDataSettingsUi::COMBINED, "COMBINED", "Combined");
|
||||
setDefault(RicExportCompletionDataSettingsUi::INDIVIDUALLY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -70,6 +69,9 @@ RicExportCompletionDataSettingsUi::RicExportCompletionDataSettingsUi()
|
||||
CAF_PDM_InitField(&includeFractures, "IncludeFractures", true, "Fractures", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&excludeMainBoreForFishbones, "ExcludeMainBoreForFishbones", false, " Exclude Main Bore Transmissibility", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_reportCompletionTypesSeparately, "ReportCompletionTypesSeparately", "Export Completion Types", "", "", "");
|
||||
|
||||
m_displayForSimWell = true;
|
||||
|
||||
m_fracturesEnabled = true;
|
||||
@ -96,7 +98,15 @@ void RicExportCompletionDataSettingsUi::showForWellPath()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportCompletionDataSettingsUi::enableFractures(bool enable)
|
||||
void RicExportCompletionDataSettingsUi::setCombinationMode(CombinationMode combinationMode)
|
||||
{
|
||||
m_reportCompletionTypesSeparately = combinationMode;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportCompletionDataSettingsUi::showFractureInUi(bool enable)
|
||||
{
|
||||
m_fracturesEnabled = enable;
|
||||
}
|
||||
@ -104,7 +114,7 @@ void RicExportCompletionDataSettingsUi::enableFractures(bool enable)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportCompletionDataSettingsUi::enablePerforations(bool enable)
|
||||
void RicExportCompletionDataSettingsUi::showPerforationsInUi(bool enable)
|
||||
{
|
||||
m_perforationsEnabled = enable;
|
||||
}
|
||||
@ -112,11 +122,19 @@ void RicExportCompletionDataSettingsUi::enablePerforations(bool enable)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportCompletionDataSettingsUi::enableFishbone(bool enable)
|
||||
void RicExportCompletionDataSettingsUi::showFishbonesInUi(bool enable)
|
||||
{
|
||||
m_fishbonesEnabled = enable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicExportCompletionDataSettingsUi::reportCompletionsTypesIndividually() const
|
||||
{
|
||||
return m_reportCompletionTypesSeparately() == INDIVIDUALLY;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -174,6 +192,7 @@ void RicExportCompletionDataSettingsUi::defineUiOrdering(QString uiConfigName, c
|
||||
|
||||
group->add(&folder);
|
||||
group->add(&fileSplit);
|
||||
group->add(&m_reportCompletionTypesSeparately);
|
||||
}
|
||||
|
||||
{
|
||||
@ -188,16 +207,6 @@ void RicExportCompletionDataSettingsUi::defineUiOrdering(QString uiConfigName, c
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup("Visible Completions");
|
||||
if (!m_displayForSimWell)
|
||||
{
|
||||
if (m_fishbonesEnabled)
|
||||
{
|
||||
group->add(&includeFishbones);
|
||||
group->add(&excludeMainBoreForFishbones);
|
||||
if (!includeFishbones)
|
||||
excludeMainBoreForFishbones.uiCapability()->setUiReadOnly(true);
|
||||
else
|
||||
excludeMainBoreForFishbones.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
|
||||
if (m_perforationsEnabled)
|
||||
{
|
||||
group->add(&includePerforations);
|
||||
@ -222,6 +231,19 @@ void RicExportCompletionDataSettingsUi::defineUiOrdering(QString uiConfigName, c
|
||||
includeFractures.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_displayForSimWell)
|
||||
{
|
||||
if (m_fishbonesEnabled)
|
||||
{
|
||||
group->add(&includeFishbones);
|
||||
group->add(&excludeMainBoreForFishbones);
|
||||
if (!includeFishbones)
|
||||
excludeMainBoreForFishbones.uiCapability()->setUiReadOnly(true);
|
||||
else
|
||||
excludeMainBoreForFishbones.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uiOrdering.skipRemainingFields();
|
||||
|
@ -38,41 +38,43 @@ public:
|
||||
};
|
||||
typedef caf::AppEnum<ExportSplit> ExportSplitType;
|
||||
|
||||
enum WellSelection {
|
||||
ALL_WELLS,
|
||||
CHECKED_WELLS,
|
||||
SELECTED_WELLS,
|
||||
};
|
||||
typedef caf::AppEnum<WellSelection> WellSelectionType;
|
||||
|
||||
enum CompdatExport {
|
||||
TRANSMISSIBILITIES,
|
||||
WPIMULT_AND_DEFAULT_CONNECTION_FACTORS,
|
||||
};
|
||||
typedef caf::AppEnum<CompdatExport> CompdatExportType;
|
||||
|
||||
enum CombinationMode
|
||||
{
|
||||
INDIVIDUALLY,
|
||||
COMBINED,
|
||||
};
|
||||
typedef caf::AppEnum<CombinationMode> CombinationModeType;
|
||||
|
||||
|
||||
RicExportCompletionDataSettingsUi();
|
||||
|
||||
caf::PdmField<int> timeStep;
|
||||
|
||||
caf::PdmField<ExportSplitType> fileSplit;
|
||||
caf::PdmField<CompdatExportType> compdatExport;
|
||||
|
||||
caf::PdmField<bool> useLateralNTG;
|
||||
caf::PdmField<bool> includePerforations;
|
||||
caf::PdmField<bool> includeFishbones;
|
||||
|
||||
caf::PdmField<bool> includeFractures;
|
||||
|
||||
caf::PdmField<bool> excludeMainBoreForFishbones;
|
||||
|
||||
caf::PdmField<int> timeStep;
|
||||
|
||||
caf::PdmField<bool> includeFractures;
|
||||
|
||||
void showForSimWells();
|
||||
void showForWellPath();
|
||||
|
||||
void enableFractures(bool enable);
|
||||
void enablePerforations(bool enable);
|
||||
void enableFishbone(bool enable);
|
||||
void setCombinationMode(CombinationMode combinationMode);
|
||||
|
||||
void showFractureInUi(bool enable);
|
||||
void showPerforationsInUi(bool enable);
|
||||
void showFishbonesInUi(bool enable);
|
||||
|
||||
bool reportCompletionsTypesIndividually() const;
|
||||
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
@ -81,9 +83,10 @@ protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
private:
|
||||
bool m_displayForSimWell;
|
||||
caf::PdmField<CombinationModeType> m_reportCompletionTypesSeparately;
|
||||
|
||||
bool m_fracturesEnabled;
|
||||
bool m_perforationsEnabled;
|
||||
bool m_fishbonesEnabled;
|
||||
bool m_displayForSimWell;
|
||||
bool m_fracturesEnabled;
|
||||
bool m_perforationsEnabled;
|
||||
bool m_fishbonesEnabled;
|
||||
};
|
||||
|
@ -104,29 +104,29 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl
|
||||
|
||||
if ((!simWellFractures.empty()) || (!wellPathFractures.empty()))
|
||||
{
|
||||
exportSettings->enableFractures(true);
|
||||
exportSettings->showFractureInUi(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
exportSettings->enableFractures(false);
|
||||
exportSettings->showFractureInUi(false);
|
||||
}
|
||||
|
||||
if (!wellPathFishbones.empty())
|
||||
{
|
||||
exportSettings->enableFishbone(true);
|
||||
exportSettings->showFishbonesInUi(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
exportSettings->enableFishbone(false);
|
||||
exportSettings->showFishbonesInUi(false);
|
||||
}
|
||||
|
||||
if (!wellPathPerforations.empty())
|
||||
{
|
||||
exportSettings->enablePerforations(true);
|
||||
exportSettings->showPerforationsInUi(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
exportSettings->enablePerforations(false);
|
||||
exportSettings->showPerforationsInUi(false);
|
||||
}
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), exportSettings, dialogTitle, "");
|
||||
|
@ -110,7 +110,6 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
||||
}
|
||||
}
|
||||
|
||||
std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>> completionsPerEclipseCell;
|
||||
|
||||
// FractureTransmissibilityExportInformation
|
||||
std::unique_ptr<QTextStream> fractureTransmissibilityExportInformationStream = nullptr;
|
||||
@ -149,15 +148,25 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
||||
caf::ProgressInfo progress(maxProgress, "Export Completions");
|
||||
|
||||
progress.setProgressDescription("Read Completion Data");
|
||||
|
||||
std::vector<RigCompletionData> completions;
|
||||
|
||||
for (auto wellPath : usedWellPaths)
|
||||
{
|
||||
std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>> completionsPerEclipseCellAllCompletionTypes;
|
||||
std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>> completionsPerEclipseCellFishbones;
|
||||
std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>> completionsPerEclipseCellFracture;
|
||||
std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>> completionsPerEclipseCellPerforations;
|
||||
|
||||
// Generate completion data
|
||||
|
||||
if (exportSettings.includePerforations)
|
||||
{
|
||||
std::vector<RigCompletionData> perforationCompletionData =
|
||||
generatePerforationsCompdatValues(wellPath, exportSettings);
|
||||
appendCompletionData(&completionsPerEclipseCell, perforationCompletionData);
|
||||
|
||||
appendCompletionData(&completionsPerEclipseCellAllCompletionTypes, perforationCompletionData);
|
||||
appendCompletionData(&completionsPerEclipseCellPerforations, perforationCompletionData);
|
||||
}
|
||||
progress.incrementProgress();
|
||||
|
||||
@ -166,7 +175,9 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
||||
std::vector<RigCompletionData> fishbonesCompletionData =
|
||||
RicFishbonesTransmissibilityCalculationFeatureImp::generateFishboneCompdatValuesUsingAdjustedCellVolume(
|
||||
wellPath, exportSettings);
|
||||
appendCompletionData(&completionsPerEclipseCell, fishbonesCompletionData);
|
||||
|
||||
appendCompletionData(&completionsPerEclipseCellAllCompletionTypes, fishbonesCompletionData);
|
||||
appendCompletionData(&completionsPerEclipseCellFishbones, fishbonesCompletionData);
|
||||
}
|
||||
progress.incrementProgress();
|
||||
|
||||
@ -175,16 +186,52 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
||||
std::vector<RigCompletionData> fractureCompletionData =
|
||||
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath(
|
||||
wellPath, exportSettings, fractureTransmissibilityExportInformationStream.get());
|
||||
appendCompletionData(&completionsPerEclipseCell, fractureCompletionData);
|
||||
|
||||
appendCompletionData(&completionsPerEclipseCellAllCompletionTypes, fractureCompletionData);
|
||||
appendCompletionData(&completionsPerEclipseCellFracture, fractureCompletionData);
|
||||
}
|
||||
|
||||
if (exportSettings.reportCompletionsTypesIndividually())
|
||||
{
|
||||
for (auto& data : completionsPerEclipseCellFracture)
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
for (auto simWell : simWells)
|
||||
{
|
||||
std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>> completionsPerEclipseCell;
|
||||
|
||||
std::vector<RigCompletionData> fractureCompletionData = RicExportFractureCompletionsImpl::generateCompdatValuesForSimWell(
|
||||
exportSettings.caseToApply(), simWell, fractureTransmissibilityExportInformationStream.get());
|
||||
appendCompletionData(&completionsPerEclipseCell, fractureCompletionData);
|
||||
|
||||
for (auto& data : completionsPerEclipseCell)
|
||||
{
|
||||
completions.push_back(combineEclipseCellCompletions(data.second, exportSettings));
|
||||
}
|
||||
|
||||
progress.incrementProgress();
|
||||
}
|
||||
|
||||
@ -193,27 +240,14 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
||||
progress.setProgressDescription("Write Export Files");
|
||||
if (exportSettings.fileSplit == RicExportCompletionDataSettingsUi::UNIFIED_FILE)
|
||||
{
|
||||
std::vector<RigCompletionData> completions;
|
||||
for (auto& data : completionsPerEclipseCell)
|
||||
{
|
||||
completions.push_back(combineEclipseCellCompletions(data.second, exportSettings));
|
||||
}
|
||||
|
||||
const QString fileName = QString("UnifiedCompletions_%1").arg(eclipseCaseName);
|
||||
printCompletionsToFiles(exportSettings.folder, fileName, completions, exportSettings.compdatExport);
|
||||
sortAndExportCompletionsToFile(exportSettings.folder, fileName, completions, exportSettings.compdatExport);
|
||||
progress.incrementProgress();
|
||||
}
|
||||
else if (exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL)
|
||||
{
|
||||
for (auto wellPath : usedWellPaths)
|
||||
{
|
||||
std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>> filteredWellCompletions =
|
||||
getCompletionsForWell(completionsPerEclipseCell, wellPath->completions()->wellNameForExport());
|
||||
std::vector<RigCompletionData> completions;
|
||||
for (auto& data : filteredWellCompletions)
|
||||
{
|
||||
completions.push_back(combineEclipseCellCompletions(data.second, exportSettings));
|
||||
}
|
||||
std::vector<RigCompletionData> wellCompletions;
|
||||
for (const auto& completion : completions)
|
||||
{
|
||||
@ -226,50 +260,44 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
||||
if (wellCompletions.empty()) continue;
|
||||
|
||||
QString fileName = QString("%1_unifiedCompletions_%2").arg(wellPath->name()).arg(eclipseCaseName);
|
||||
printCompletionsToFiles(exportSettings.folder, fileName, wellCompletions, exportSettings.compdatExport);
|
||||
sortAndExportCompletionsToFile(exportSettings.folder, fileName, wellCompletions, exportSettings.compdatExport);
|
||||
progress.incrementProgress();
|
||||
}
|
||||
}
|
||||
else if (exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE)
|
||||
{
|
||||
for (auto wellPath : usedWellPaths)
|
||||
std::vector<RigCompletionData::CompletionType> completionTypes;
|
||||
completionTypes.push_back(RigCompletionData::FISHBONES);
|
||||
completionTypes.push_back(RigCompletionData::FRACTURE);
|
||||
completionTypes.push_back(RigCompletionData::PERFORATION);
|
||||
|
||||
for (const auto& completionType : completionTypes)
|
||||
{
|
||||
std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>> filteredWellCompletions =
|
||||
getCompletionsForWell(completionsPerEclipseCell, wellPath->completions()->wellNameForExport());
|
||||
std::vector<RigCompletionData> completions;
|
||||
for (auto& data : filteredWellCompletions)
|
||||
for (auto wellPath : usedWellPaths)
|
||||
{
|
||||
completions.push_back(combineEclipseCellCompletions(data.second, exportSettings));
|
||||
}
|
||||
{
|
||||
std::vector<RigCompletionData> fishbonesCompletions = getCompletionsForWellAndCompletionType(
|
||||
completions, wellPath->completions()->wellNameForExport(), RigCompletionData::FISHBONES);
|
||||
if (!fishbonesCompletions.empty())
|
||||
std::vector<RigCompletionData> wellCompletions;
|
||||
for (const auto& completion : completions)
|
||||
{
|
||||
QString fileName = QString("%1_Fishbones_%2").arg(wellPath->name()).arg(eclipseCaseName);
|
||||
printCompletionsToFiles(exportSettings.folder, fileName, fishbonesCompletions, exportSettings.compdatExport);
|
||||
if (completion.wellName() == wellPath->completions()->wellNameForExport() &&
|
||||
completionType == completion.completionType())
|
||||
{
|
||||
wellCompletions.push_back(completion);
|
||||
}
|
||||
}
|
||||
progress.incrementProgress();
|
||||
}
|
||||
{
|
||||
std::vector<RigCompletionData> perforationCompletions = getCompletionsForWellAndCompletionType(
|
||||
completions, wellPath->completions()->wellNameForExport(), RigCompletionData::PERFORATION);
|
||||
if (!perforationCompletions.empty())
|
||||
|
||||
if (wellCompletions.empty()) continue;
|
||||
|
||||
{
|
||||
QString fileName = QString("%1_Perforations_%2").arg(wellPath->name()).arg(eclipseCaseName);
|
||||
printCompletionsToFiles(
|
||||
exportSettings.folder, fileName, perforationCompletions, exportSettings.compdatExport);
|
||||
}
|
||||
progress.incrementProgress();
|
||||
}
|
||||
{
|
||||
std::vector<RigCompletionData> fractureCompletions = getCompletionsForWellAndCompletionType(
|
||||
completions, wellPath->completions()->wellNameForExport(), RigCompletionData::FRACTURE);
|
||||
if (!fractureCompletions.empty())
|
||||
{
|
||||
QString fileName = QString("%1_Fractures_%2").arg(wellPath->name()).arg(eclipseCaseName);
|
||||
printCompletionsToFiles(exportSettings.folder, fileName, fractureCompletions, exportSettings.compdatExport);
|
||||
QString completionTypeText;
|
||||
if (completionType == RigCompletionData::FISHBONES) completionTypeText = "Fishbones";
|
||||
if (completionType == RigCompletionData::FRACTURE) completionTypeText = "Fracture";
|
||||
if (completionType == RigCompletionData::PERFORATION) completionTypeText = "Perforation";
|
||||
|
||||
QString fileName = QString("%1_%2_%3").arg(wellPath->name()).arg(completionTypeText).arg(eclipseCaseName);
|
||||
sortAndExportCompletionsToFile(
|
||||
exportSettings.folder, fileName, wellCompletions, exportSettings.compdatExport);
|
||||
}
|
||||
|
||||
progress.incrementProgress();
|
||||
}
|
||||
}
|
||||
@ -281,13 +309,6 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
||||
{
|
||||
for (auto simWell : simWells)
|
||||
{
|
||||
std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>> filteredWellCompletions =
|
||||
getCompletionsForWell(completionsPerEclipseCell, simWell->name());
|
||||
std::vector<RigCompletionData> completions;
|
||||
for (auto& data : filteredWellCompletions)
|
||||
{
|
||||
completions.push_back(combineEclipseCellCompletions(data.second, exportSettings));
|
||||
}
|
||||
std::vector<RigCompletionData> wellCompletions;
|
||||
for (const auto& completion : completions)
|
||||
{
|
||||
@ -299,10 +320,9 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
||||
|
||||
if (wellCompletions.empty()) continue;
|
||||
|
||||
QString fileName = exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL
|
||||
? QString("%1_unifiedCompletions_%2").arg(simWell->name()).arg(eclipseCaseName)
|
||||
: QString("%1_Fractures_%2").arg(simWell->name()).arg(eclipseCaseName);
|
||||
printCompletionsToFiles(exportSettings.folder, fileName, wellCompletions, exportSettings.compdatExport);
|
||||
QString fileName = QString("%1_Fractures_%2").arg(simWell->name()).arg(eclipseCaseName);
|
||||
sortAndExportCompletionsToFile(exportSettings.folder, fileName, wellCompletions, exportSettings.compdatExport);
|
||||
|
||||
progress.incrementProgress();
|
||||
}
|
||||
}
|
||||
@ -487,7 +507,7 @@ RigCompletionData
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeatureImpl::printCompletionsToFiles(
|
||||
void RicWellPathExportCompletionDataFeatureImpl::sortAndExportCompletionsToFile(
|
||||
const QString& folderName,
|
||||
const QString& fileName,
|
||||
std::vector<RigCompletionData>& completions,
|
||||
@ -525,20 +545,20 @@ void RicWellPathExportCompletionDataFeatureImpl::printCompletionsToFiles(
|
||||
std::map<QString, std::vector<RigCompletionData>> completionsForGrid;
|
||||
completionsForGrid.insert(std::pair<QString, std::vector<RigCompletionData>>("", completionsForMainGrid));
|
||||
|
||||
printCompletionsToFile(folderName, fileName, completionsForGrid, exportType);
|
||||
exportCompdatAndWpimultTables(folderName, fileName, completionsForGrid, exportType);
|
||||
}
|
||||
|
||||
if (!completionsForSubGrids.empty())
|
||||
{
|
||||
QString lgrFileName = fileName + "_LGR";
|
||||
printCompletionsToFile(folderName, lgrFileName, completionsForSubGrids, exportType);
|
||||
exportCompdatAndWpimultTables(folderName, lgrFileName, completionsForSubGrids, exportType);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeatureImpl::printCompletionsToFile(
|
||||
void RicWellPathExportCompletionDataFeatureImpl::exportCompdatAndWpimultTables(
|
||||
const QString& folderName,
|
||||
const QString& fileName,
|
||||
const std::map<QString, std::vector<RigCompletionData>>& completionsPerGrid,
|
||||
@ -577,11 +597,11 @@ void RicWellPathExportCompletionDataFeatureImpl::printCompletionsToFile(
|
||||
|
||||
// Print completion data
|
||||
QString gridName = gridCompletions.first;
|
||||
generateCompdatTable(formatter, gridName, completions);
|
||||
exportCompdatTableUsingFormatter(formatter, gridName, completions);
|
||||
|
||||
if (exportType == RicExportCompletionDataSettingsUi::WPIMULT_AND_DEFAULT_CONNECTION_FACTORS)
|
||||
{
|
||||
generateWpimultTable(formatter, gridName, completions);
|
||||
exportWpimultTableUsingFormatter(formatter, gridName, completions);
|
||||
}
|
||||
}
|
||||
|
||||
@ -634,9 +654,10 @@ std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeatureImpl::generateCompdatTable(RifEclipseDataTableFormatter& formatter,
|
||||
const QString& gridName,
|
||||
const std::vector<RigCompletionData>& completionData)
|
||||
void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatter(
|
||||
RifEclipseDataTableFormatter& formatter,
|
||||
const QString& gridName,
|
||||
const std::vector<RigCompletionData>& completionData)
|
||||
{
|
||||
std::vector<RifEclipseOutputTableColumn> header;
|
||||
|
||||
@ -687,6 +708,8 @@ void RicWellPathExportCompletionDataFeatureImpl::generateCompdatTable(RifEclipse
|
||||
}
|
||||
formatter.header(header);
|
||||
|
||||
RigCompletionData::CompletionType currentCompletionType = RigCompletionData::CT_UNDEFINED;
|
||||
|
||||
for (const RigCompletionData& data : completionData)
|
||||
{
|
||||
if (data.transmissibility() == 0.0 || data.wpimult() == 0.0)
|
||||
@ -695,6 +718,20 @@ void RicWellPathExportCompletionDataFeatureImpl::generateCompdatTable(RifEclipse
|
||||
continue;
|
||||
}
|
||||
|
||||
if (currentCompletionType != data.completionType())
|
||||
{
|
||||
// The completions are sorted by completion type, write out a heading when completion type changes
|
||||
|
||||
QString txt;
|
||||
if (data.completionType() == RigCompletionData::FISHBONES) txt = "Fishbones";
|
||||
if (data.completionType() == RigCompletionData::FRACTURE) txt = "Fracture";
|
||||
if (data.completionType() == RigCompletionData::PERFORATION) txt = "Perforation";
|
||||
|
||||
formatter.comment("---- Completions for completion type " + txt + " ----");
|
||||
|
||||
currentCompletionType = data.completionType();
|
||||
}
|
||||
|
||||
for (const RigCompletionMetaData& metadata : data.metadata())
|
||||
{
|
||||
formatter.comment(QString("%1 : %2").arg(metadata.name).arg(metadata.comment));
|
||||
@ -790,9 +827,10 @@ void RicWellPathExportCompletionDataFeatureImpl::generateCompdatTable(RifEclipse
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeatureImpl::generateWpimultTable(RifEclipseDataTableFormatter& formatter,
|
||||
const QString& gridName,
|
||||
const std::vector<RigCompletionData>& completionData)
|
||||
void RicWellPathExportCompletionDataFeatureImpl::exportWpimultTableUsingFormatter(
|
||||
RifEclipseDataTableFormatter& formatter,
|
||||
const QString& gridName,
|
||||
const std::vector<RigCompletionData>& completionData)
|
||||
{
|
||||
std::vector<RifEclipseOutputTableColumn> header;
|
||||
|
||||
|
@ -163,12 +163,12 @@ private:
|
||||
static RigCompletionData combineEclipseCellCompletions(const std::vector<RigCompletionData>& completions,
|
||||
const RicExportCompletionDataSettingsUi& settings);
|
||||
|
||||
static void printCompletionsToFiles(const QString& exportFolder,
|
||||
static void sortAndExportCompletionsToFile(const QString& exportFolder,
|
||||
const QString& fileName,
|
||||
std::vector<RigCompletionData>& completions,
|
||||
RicExportCompletionDataSettingsUi::CompdatExportType exportType);
|
||||
|
||||
static void printCompletionsToFile(const QString& folderName,
|
||||
static void exportCompdatAndWpimultTables(const QString& folderName,
|
||||
const QString& fileName,
|
||||
const std::map<QString, std::vector<RigCompletionData>>& completionsPerGrid,
|
||||
RicExportCompletionDataSettingsUi::CompdatExportType exportType);
|
||||
@ -181,11 +181,11 @@ private:
|
||||
getCompletionsForWell(const std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>>& cellToCompletionMap,
|
||||
const QString& wellName);
|
||||
|
||||
static void generateCompdatTable(RifEclipseDataTableFormatter& formatter,
|
||||
static void exportCompdatTableUsingFormatter(RifEclipseDataTableFormatter& formatter,
|
||||
const QString& gridName,
|
||||
const std::vector<RigCompletionData>& completionData);
|
||||
|
||||
static void generateWpimultTable(RifEclipseDataTableFormatter& formatter,
|
||||
static void exportWpimultTableUsingFormatter(RifEclipseDataTableFormatter& formatter,
|
||||
const QString& gridName,
|
||||
const std::vector<RigCompletionData>& completionData);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user