#1171 Made the branch contribution a bit cleaner by splitting the cells own contribution as one point, and the branch inflow as another at the same depth, creating a step at the upper cell depth.

This commit is contained in:
Jacob Støren 2017-02-28 11:46:45 +01:00
parent 6149a87347
commit 528b064569

View File

@ -410,10 +410,14 @@ void RigAccWellFlowCalculator::calculateFlowPrPseudoLength(size_t branchIdx, dou
accFlowPrTracer[tIdx] += flowPrTracer[tIdx];
}
// Add the total accumulated (fraction) flows from any branches connected to this cell
double pseudoLengthFromTop_upper = mdCalculator.measuredDepths()[cellUpperPointIndex] + startPseudoLengthFromTop;
// Push back the accumulated result into the storage
storeFlowOnDepth(branchFlow, pseudoLengthFromTop_upper, accFlowPrTracer, flowPrTracer);
// Add the total accumulated (fraction) flows from any branches connected to this cell
std::vector<size_t> downStreamBranchIndices = findDownStreamBranchIdxs(branchCells[cellUpperPointIndex]);
for ( size_t dsBidx : downStreamBranchIndices )
{
@ -425,9 +429,9 @@ void RigAccWellFlowCalculator::calculateFlowPrPseudoLength(size_t branchIdx, dou
}
}
// Push back the accumulated result into the storage
// Push back the accumulated result after adding the branch result into the storage
storeFlowOnDepth(branchFlow, pseudoLengthFromTop_upper, accFlowPrTracer, flowPrTracer);
if (downStreamBranchIndices.size()) storeFlowOnDepth(branchFlow, pseudoLengthFromTop_upper, accFlowPrTracer, flowPrTracer);
}
}