mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1171 WIP: Pseudo length active. Needs more verification
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user