Improved simulation well visualization

* Move members to private in RigWellResultPoint
* Create simulation well path geometry using well topology
* Add separate MSW well pipe centerline computations
* Review comments

---------

Co-authored-by: magnesj <magnesj@users.noreply.github.com>
This commit is contained in:
Magne Sjaastad
2023-02-28 16:06:37 +01:00
committed by GitHub
parent 9b12885c23
commit d2f435c00a
28 changed files with 976 additions and 241 deletions

View File

@@ -711,9 +711,9 @@ std::vector<double> RigAccWellFlowCalculator::calculateWellCellFlowPrTracer( con
if ( m_tracerCellFractionValues )
{
if ( wellCell.isCell() && wellCell.m_isOpen )
if ( wellCell.isCell() && wellCell.isOpen() )
{
size_t resCellIndex = m_cellIndexCalculator.resultCellIndex( wellCell.m_gridIndex, wellCell.m_gridCellIndex );
size_t resCellIndex = m_cellIndexCalculator.resultCellIndex( wellCell.gridIndex(), wellCell.cellIndex() );
size_t tracerIdx = 0;
double totalTracerFractionInCell = 0.0;
for ( const auto& tracerFractionValsPair : ( *m_tracerCellFractionValues ) )
@@ -768,23 +768,23 @@ std::vector<size_t> RigAccWellFlowCalculator::wrpToUniqueWrpIndexFromBottom( con
if ( clSegIdx < 0 ) return resPointToConnectionIndexFromBottom;
size_t prevGridIdx = branchCells[clSegIdx].m_gridIndex;
size_t prevGridCellIdx = branchCells[clSegIdx].m_gridCellIndex;
int prevErtSegId = branchCells[clSegIdx].m_ertSegmentId;
int prevErtBranchId = branchCells[clSegIdx].m_ertBranchId;
size_t prevGridIdx = branchCells[clSegIdx].gridIndex();
size_t prevGridCellIdx = branchCells[clSegIdx].cellIndex();
int prevErtSegId = branchCells[clSegIdx].segmentId();
int prevErtBranchId = branchCells[clSegIdx].branchId();
while ( clSegIdx >= 0 )
{
if ( branchCells[clSegIdx].isValid() &&
( branchCells[clSegIdx].m_gridIndex != prevGridIdx || branchCells[clSegIdx].m_gridCellIndex != prevGridCellIdx ||
branchCells[clSegIdx].m_ertSegmentId != prevErtSegId || branchCells[clSegIdx].m_ertBranchId != prevErtBranchId ) )
( branchCells[clSegIdx].gridIndex() != prevGridIdx || branchCells[clSegIdx].cellIndex() != prevGridCellIdx ||
branchCells[clSegIdx].segmentId() != prevErtSegId || branchCells[clSegIdx].branchId() != prevErtBranchId ) )
{
++connIdxFromBottom;
prevGridIdx = branchCells[clSegIdx].m_gridIndex;
prevGridCellIdx = branchCells[clSegIdx].m_gridCellIndex;
prevErtSegId = branchCells[clSegIdx].m_ertSegmentId;
prevErtBranchId = branchCells[clSegIdx].m_ertBranchId;
prevGridIdx = branchCells[clSegIdx].gridIndex();
prevGridCellIdx = branchCells[clSegIdx].cellIndex();
prevErtSegId = branchCells[clSegIdx].segmentId();
prevErtBranchId = branchCells[clSegIdx].branchId();
}
resPointToConnectionIndexFromBottom[clSegIdx] = connIdxFromBottom;
@@ -812,10 +812,10 @@ std::vector<size_t> RigAccWellFlowCalculator::findDownStreamBranchIdxs( const Ri
for ( size_t bIdx = 0; bIdx < m_pipeBranchesWellResultPoints.size(); ++bIdx )
{
if ( m_pipeBranchesWellResultPoints[bIdx][0].m_gridIndex == connectionPoint.m_gridIndex &&
m_pipeBranchesWellResultPoints[bIdx][0].m_gridCellIndex == connectionPoint.m_gridCellIndex &&
m_pipeBranchesWellResultPoints[bIdx][0].m_ertBranchId == connectionPoint.m_ertBranchId &&
m_pipeBranchesWellResultPoints[bIdx][0].m_ertSegmentId == connectionPoint.m_ertSegmentId )
if ( m_pipeBranchesWellResultPoints[bIdx][0].gridIndex() == connectionPoint.gridIndex() &&
m_pipeBranchesWellResultPoints[bIdx][0].cellIndex() == connectionPoint.cellIndex() &&
m_pipeBranchesWellResultPoints[bIdx][0].branchId() == connectionPoint.branchId() &&
m_pipeBranchesWellResultPoints[bIdx][0].segmentId() == connectionPoint.segmentId() )
{
downStreamBranchIdxs.push_back( bIdx );
}