mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1112 Guard against none-connection segments in accumulation calculation
This commit is contained in:
parent
d3f1c9d6fa
commit
3f091aa884
@ -113,13 +113,16 @@ void RigAccWellFlowCalculator::calculateAccumulatedFlowPrConnection(size_t branc
|
||||
|
||||
if ( m_tracerCellFractionValues )
|
||||
{
|
||||
size_t resCellIndex = m_cellIndexCalculator.resultCellIndex(branchCells[clSegIdx].m_gridIndex,
|
||||
branchCells[clSegIdx].m_gridCellIndex);
|
||||
size_t tracerIdx = 0;
|
||||
for ( const auto & tracerFractionIt: (*m_tracerCellFractionValues) )
|
||||
if ( branchCells[clSegIdx].isCell() && branchCells[clSegIdx].m_isOpen )
|
||||
{
|
||||
accFlow[tracerIdx] += (*tracerFractionIt.second)[resCellIndex] * branchCells[clSegIdx].flowRate();
|
||||
tracerIdx++;
|
||||
size_t resCellIndex = m_cellIndexCalculator.resultCellIndex(branchCells[clSegIdx].m_gridIndex,
|
||||
branchCells[clSegIdx].m_gridCellIndex);
|
||||
size_t tracerIdx = 0;
|
||||
for ( const auto & tracerFractionIt: (*m_tracerCellFractionValues) )
|
||||
{
|
||||
accFlow[tracerIdx] += (*tracerFractionIt.second)[resCellIndex] * branchCells[clSegIdx].flowRate();
|
||||
tracerIdx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user