From bf61c76e514804390dd96b52a0e2354d283cc72c Mon Sep 17 00:00:00 2001 From: sigurdp Date: Tue, 17 Dec 2019 12:41:11 +0100 Subject: [PATCH] Filter out TOF values greater than 73000 and remove wells with zero aggregated volume --- .../ProjectDataModel/Flow/RimWellDistributionPlot.cpp | 5 +++-- .../RigTofWellDistributionCalculator.cpp | 11 ++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlot.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlot.cpp index 56c6395282..19a10de297 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlot.cpp @@ -334,6 +334,7 @@ void RimWellDistributionPlot::onLoadDataAndUpdate() const RimFlowDiagSolution* flowDiagSolution = m_case->defaultFlowDiagSolution(); + //cvf::Trace::show("Populating plot for phase '%s'", m_phase == RiaDefines::OIL_PHASE ? "oil" : (m_phase == RiaDefines::GAS_PHASE ? "gas" : "water")); populatePlotWidgetWithCurveData(calc, *flowDiagSolution, m_plotWidget); } @@ -400,13 +401,13 @@ void RimWellDistributionPlot::populatePlotWidgetWithCurveData(const RigTofWellDi cvf::Color3f cvfClr = flowDiagSolution.tracerColor(wellName); QColor qtClr = RiaColorTools::toQColor(cvfClr); - //cvf::Trace::show("wellName min, max: %s %f, %f", wellName.toStdString().c_str(), volArr.front(), volArr.back()); - for (size_t j = 0; j < yVals.size(); j++) { yVals[j] += volArr[j]; } + //cvf::Trace::show("wellName min, max: %15s %12.3f, %12.3f maxAggrY: %12.3f", wellName.toStdString().c_str(), volArr.front(), volArr.back(), yVals.back()); + QwtPlotCurve* curve = new QwtPlotCurve; curve->setTitle(wellName); curve->setBrush(qtClr); diff --git a/ApplicationCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp b/ApplicationCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp index 50ff6173ec..77c95efde1 100644 --- a/ApplicationCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp +++ b/ApplicationCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp @@ -128,7 +128,10 @@ RigTofWellDistributionCalculator::RigTofWellDistributionCalculator(RimEclipseRes contribWellEntry.accumulatedVolAlongTof.push_back(accumulatedVolForSpecifiedPhase); } - m_contributingWells.push_back(contribWellEntry); + if (accumulatedVolForSpecifiedPhase > 0) + { + m_contributingWells.push_back(contribWellEntry); + } } for (auto mapElement : tofToCellIndicesMap) @@ -199,6 +202,12 @@ std::map> RigTofWellDistributionCalculator::buildSor continue; } + // Also filter out special TOF values greater than 73000 days (~200 years) + if (tofValue > 73000.0) + { + continue; + } + std::vector vectorOfIndexes{ i }; auto iteratorBoolFromInsertToMap = tofToCellIndicesMap.insert(std::make_pair(tofValue, vectorOfIndexes)); if (!iteratorBoolFromInsertToMap.second)