#7655 Well Allocation Plot: Avoid duplicated flow in tie-in cells

Make sure the tie-in cell is not duplicated
This commit is contained in:
Magne Sjaastad 2021-05-26 10:33:41 +02:00
parent 832bd6c58f
commit 19d650f619
3 changed files with 24 additions and 6 deletions

View File

@ -1882,12 +1882,17 @@ void RifReaderEclipseOutput::readWellCells( const ecl_grid_type* mainEclGrid, bo
// Select the deepest connection
well_conn_type* ert_connection =
well_conn_collection_iget( connections, connectionCount - 1 );
wellResultBranch.m_branchResultPoints.push_back(
createWellResultPoint( grids[gridNr],
ert_connection,
well_segment_get_branch_id( outletSegment ),
well_segment_get_id( outletSegment ),
wellName ) );
auto resultPoint = createWellResultPoint( grids[gridNr],
ert_connection,
well_segment_get_branch_id( outletSegment ),
well_segment_get_id( outletSegment ),
wellName );
// This result point is only supposed to be used to indicate connection to a parent well
// Clear all flow in this result point
resultPoint.clearAllFlow();
wellResultBranch.m_branchResultPoints.push_back( resultPoint );
outletSegmentHasConnections = true;
break; // Stop looping over grids

View File

@ -138,3 +138,15 @@ double RigWellResultPoint::connectionFactor() const
{
return m_connectionFactor;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigWellResultPoint::clearAllFlow()
{
m_connectionFactor = 0.0;
m_flowRate = 0.0;
m_oilRate = 0.0;
m_gasRate = 0.0;
m_waterRate = 0.0;
}

View File

@ -42,6 +42,7 @@ struct RigWellResultPoint
double gasRate() const;
double waterRate() const;
double connectionFactor() const;
void clearAllFlow();
size_t m_gridIndex;
size_t m_gridCellIndex; //< Index to cell which is included in the well