#1171 WIP: Pseudo length active. Needs more verification

This commit is contained in:
Jacob Støren
2017-02-19 20:57:40 +01:00
parent 601a920337
commit b336d49fb6
4 changed files with 61 additions and 13 deletions

View File

@@ -232,6 +232,11 @@ void RimWellAllocationPlot::updateFromWell()
m_contributingTracerNames = wfCalculator->tracerNames();
}
auto depthType = accumulatedWellFlowPlot()->depthType();
if ( depthType == RimWellLogPlot::MEASURED_DEPTH
|| depthType == RimWellLogPlot::TRUE_VERTICAL_DEPTH) return;
// Create tracks and curves from the calculated data
size_t branchCount = pipeBranchesCLCoords.size();
@@ -246,27 +251,49 @@ void RimWellAllocationPlot::updateFromWell()
accumulatedWellFlowPlot()->addTrack(plotTrack);
std::vector<double> connNumbers = wfCalculator->connectionNumbersFromTop(brIdx);
const std::vector<double>& connNumbers = depthType == RimWellLogPlot::CONNECTION_NUMBER ? wfCalculator->connectionNumbersFromTop(brIdx) :
depthType == RimWellLogPlot::PSEUDO_LENGTH ? wfCalculator->pseudoLengthFromTop(brIdx) :
std::vector<double>();
if ( m_flowDiagSolution )
{
std::vector<QString> tracerNames = wfCalculator->tracerNames();
for (const QString& tracerName: tracerNames)
{
const std::vector<double>& accFlow = m_flowType == ACCUMULATED ?
wfCalculator->accumulatedTracerFlowPrConnection(tracerName, brIdx):
wfCalculator->tracerFlowPrConnection(tracerName, brIdx);
const std::vector<double>* accFlow = nullptr;
if (depthType == RimWellLogPlot::CONNECTION_NUMBER)
{
accFlow = &(m_flowType == ACCUMULATED ?
wfCalculator->accumulatedTracerFlowPrConnection(tracerName, brIdx):
wfCalculator->tracerFlowPrConnection(tracerName, brIdx));
}
else if ( depthType == RimWellLogPlot::PSEUDO_LENGTH)
{
accFlow = &(m_flowType == ACCUMULATED ?
wfCalculator->accumulatedTracerFlowPrPseudoLength(tracerName, brIdx):
wfCalculator->tracerFlowPrPseudoLength(tracerName, brIdx));
}
addStackedCurve(tracerName, connNumbers, accFlow, plotTrack);
addStackedCurve(tracerName, connNumbers, *accFlow, plotTrack);
}
}
else
{
const std::vector<double>& accFlow = m_flowType == ACCUMULATED ?
wfCalculator->accumulatedFlowPrConnection(brIdx):
wfCalculator->flowPrConnection(brIdx);
const std::vector<double>* accFlow = nullptr;
if (depthType == RimWellLogPlot::CONNECTION_NUMBER)
{
accFlow = &(m_flowType == ACCUMULATED ?
wfCalculator->accumulatedFlowPrConnection(brIdx):
wfCalculator->flowPrConnection( brIdx));
}
else if ( depthType == RimWellLogPlot::PSEUDO_LENGTH)
{
accFlow = &(m_flowType == ACCUMULATED ?
wfCalculator->accumulatedFlowPrPseudoLength(brIdx):
wfCalculator->flowPrPseudoLength( brIdx));
}
addStackedCurve("Total", connNumbers, accFlow, plotTrack);
addStackedCurve("Total", connNumbers, *accFlow, plotTrack);
}
updateWellFlowPlotXAxisTitle(plotTrack);