Merge branch 'dev' into dev-deeper

This commit is contained in:
Gaute Lindkvist
2018-11-26 09:21:33 +01:00
12 changed files with 243 additions and 102 deletions

View File

@@ -325,23 +325,32 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
{
for (auto wellPath : usedWellPaths)
{
std::vector<RigCompletionData> wellCompletions;
std::vector<RigCompletionData> completionsForWell;
for (const auto& completion : completions)
{
if (completion.wellName() == wellPath->completions()->wellNameForExport())
{
wellCompletions.push_back(completion);
completionsForWell.push_back(completion);
}
}
if (wellCompletions.empty()) continue;
if (completionsForWell.empty()) continue;
std::vector<RicWellPathFractureReportItem> reportItemsForWell;
for (const auto& fracItem : fractureDataReportItems)
{
if (fracItem.wellPathNameForExport() == wellPath->completions()->wellNameForExport())
{
reportItemsForWell.push_back(fracItem);
}
}
QString fileName = QString("%1_unifiedCompletions_%2").arg(wellPath->name()).arg(eclipseCaseName);
sortAndExportCompletionsToFile(exportSettings.caseToApply,
exportSettings.folder,
fileName,
wellCompletions,
fractureDataReportItems,
completionsForWell,
reportItemsForWell,
exportSettings.compdatExport);
progress.incrementProgress();
}
@@ -357,17 +366,17 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
{
for (auto wellPath : usedWellPaths)
{
std::vector<RigCompletionData> wellCompletions;
std::vector<RigCompletionData> completionsForWell;
for (const auto& completion : completions)
{
if (completion.wellName() == wellPath->completions()->wellNameForExport() &&
completionType == completion.completionType())
{
wellCompletions.push_back(completion);
completionsForWell.push_back(completion);
}
}
if (wellCompletions.empty()) continue;
if (completionsForWell.empty()) continue;
{
QString completionTypeText;
@@ -378,11 +387,20 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
QString fileName = QString("%1_%2_%3").arg(wellPath->name()).arg(completionTypeText).arg(eclipseCaseName);
if (completionType == RigCompletionData::FRACTURE)
{
std::vector<RicWellPathFractureReportItem> reportItemsForWell;
for (const auto& fracItem : fractureDataReportItems)
{
if (fracItem.wellPathNameForExport() == wellPath->completions()->wellNameForExport())
{
reportItemsForWell.push_back(fracItem);
}
}
sortAndExportCompletionsToFile(exportSettings.caseToApply,
exportSettings.folder,
fileName,
wellCompletions,
fractureDataReportItems,
completionsForWell,
reportItemsForWell,
exportSettings.compdatExport);
}
else
@@ -391,7 +409,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
sortAndExportCompletionsToFile(exportSettings.caseToApply,
exportSettings.folder,
fileName,
wellCompletions,
completionsForWell,
emptyReportItemVector,
exportSettings.compdatExport);
}

View File

@@ -25,11 +25,11 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RicWellPathFractureReportItem::RicWellPathFractureReportItem(const QString& wellPathName,
RicWellPathFractureReportItem::RicWellPathFractureReportItem(const QString& wellPathNameForExport,
const QString& fractureName,
const QString& fractureTemplateName,
double measuredDepth)
: m_wellPathNameForExport(wellPathName)
: m_wellPathNameForExport(wellPathNameForExport)
, m_wellPathFracture(fractureName)
, m_wellPathFractureTemplate(fractureTemplateName)
, m_mesuredDepth(measuredDepth)

View File

@@ -80,24 +80,39 @@ QString RicWellPathFractureTextReportFeatureImpl::wellPathFractureReport(
textStream << lineStart << "\n";
auto proj = RiaApplication::instance()->project();
auto fractureTemplates = proj->activeOilField()->fractureDefinitionCollection()->fractureTemplates();
std::vector<RimStimPlanFractureTemplate*> stimPlanTemplates;
std::vector<RimEllipseFractureTemplate*> ellipseTemplates;
for (const auto fracTemplate : fractureTemplates)
{
auto stimPlanTemplate = dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate);
if (stimPlanTemplate)
auto proj = RiaApplication::instance()->project();
auto fractureTemplates = proj->activeOilField()->fractureDefinitionCollection()->fractureTemplates();
std::set<QString> usedFractureTemplateNames;
for (const auto& item : wellPathFractureReportItems)
{
stimPlanTemplates.push_back(stimPlanTemplate);
usedFractureTemplateNames.insert(item.fractureTemplateName());
}
auto ellipseTemplate = dynamic_cast<RimEllipseFractureTemplate*>(fracTemplate);
if (ellipseTemplate)
for (const auto fracTemplate : fractureTemplates)
{
ellipseTemplates.push_back(ellipseTemplate);
if (usedFractureTemplateNames.find(fracTemplate->name()) == usedFractureTemplateNames.end())
{
continue;
}
auto stimPlanTemplate = dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate);
if (stimPlanTemplate)
{
stimPlanTemplates.push_back(stimPlanTemplate);
}
auto ellipseTemplate = dynamic_cast<RimEllipseFractureTemplate*>(fracTemplate);
if (ellipseTemplate)
{
ellipseTemplates.push_back(ellipseTemplate);
}
}
}
@@ -136,7 +151,11 @@ QString RicWellPathFractureTextReportFeatureImpl::wellPathFractureReport(
}
{
QString tableText = createFractureText(fractureTemplates);
std::vector<RimFractureTemplate*> fracTemplates;
fracTemplates.insert(fracTemplates.end(), ellipseTemplates.begin(), ellipseTemplates.end());
fracTemplates.insert(fracTemplates.end(), stimPlanTemplates.begin(), stimPlanTemplates.end());
QString tableText = createFractureText(fracTemplates);
textStream << tableText;
textStream << lineStart << "\n";
}
@@ -623,7 +642,7 @@ QString RicWellPathFractureTextReportFeatureImpl::createFractureCompletionSummar
RifEclipseOutputTableColumn(meanText, RifEclipseOutputTableDoubleFormatting(RIF_FLOAT, 1), RIGHT), // KfWf
RifEclipseOutputTableColumn(meanText, RifEclipseOutputTableDoubleFormatting(RIF_FLOAT, 1), RIGHT), // Kf
floatNumberColumn(meanText), // wf
RifEclipseOutputTableColumn(meanText, RifEclipseOutputTableDoubleFormatting(RIF_FLOAT, 1), RIGHT), //xf
RifEclipseOutputTableColumn(meanText, RifEclipseOutputTableDoubleFormatting(RIF_FLOAT, 1), RIGHT), // xf
RifEclipseOutputTableColumn(meanText, RifEclipseOutputTableDoubleFormatting(RIF_FLOAT, 1), RIGHT), // H
floatNumberColumn(meanText), // Km
};
@@ -698,7 +717,8 @@ QString RicWellPathFractureTextReportFeatureImpl::createFractureCompletionSummar
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RicWellPathFractureTextReportFeatureImpl::createFracturePressureDepletionSummaryText(const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems) const
QString RicWellPathFractureTextReportFeatureImpl::createFracturePressureDepletionSummaryText(
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems) const
{
QString tableText;
@@ -706,13 +726,11 @@ QString RicWellPathFractureTextReportFeatureImpl::createFracturePressureDepletio
RifEclipseDataTableFormatter formatter(stream);
configureFormatter(&formatter);
std::vector<RifEclipseOutputTableColumn> header = {
RifEclipseOutputTableColumn("Well"),
RifEclipseOutputTableColumn("Fracture"),
RifEclipseOutputTableColumn("Actual WBHP"),
RifEclipseOutputTableColumn("Min Pressure Drop"),
RifEclipseOutputTableColumn("Max Pressure Drop")
};
std::vector<RifEclipseOutputTableColumn> header = {RifEclipseOutputTableColumn("Well"),
RifEclipseOutputTableColumn("Fracture"),
RifEclipseOutputTableColumn("Actual WBHP"),
RifEclipseOutputTableColumn("Min Pressure Drop"),
RifEclipseOutputTableColumn("Max Pressure Drop")};
bool createdTable = false;