mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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:
@@ -22,8 +22,11 @@
|
||||
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaExtractionTools.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RigEclipseWellLogExtractor.h"
|
||||
#include "RigMswCenterLineCalculator.h"
|
||||
#include "RigSimulationWellCenterLineCalculator.h"
|
||||
#include "RigVirtualPerforationTransmissibilities.h"
|
||||
#include "RigWellLogExtractor.h"
|
||||
#include "RigWellPath.h"
|
||||
@@ -154,9 +157,27 @@ void RivSimWellPipesPartMgr::buildWellPipeParts( const caf::DisplayCoordTransfor
|
||||
m_wellBranches.clear();
|
||||
m_flattenedBranchWellHeadOffsets.clear();
|
||||
m_pipeBranchesCLCoords.clear();
|
||||
std::vector<std::vector<RigWellResultPoint>> pipeBranchesCellIds;
|
||||
|
||||
m_simWellInView->calculateWellPipeStaticCenterLine( m_pipeBranchesCLCoords, pipeBranchesCellIds );
|
||||
auto createSimWells = []( RimSimWellInView* simWellInView ) -> std::vector<SimulationWellCellBranch> {
|
||||
std::vector<SimulationWellCellBranch> simWellBranches;
|
||||
const RigSimWellData* simWellData = simWellInView->simWellData();
|
||||
if ( simWellData && simWellData->isMultiSegmentWell() )
|
||||
{
|
||||
simWellBranches = RigMswCenterLineCalculator::calculateMswWellPipeGeometry( simWellInView );
|
||||
}
|
||||
else
|
||||
{
|
||||
simWellBranches = RigSimulationWellCenterLineCalculator::calculateWellPipeStaticCenterline( simWellInView );
|
||||
}
|
||||
|
||||
return simWellBranches;
|
||||
};
|
||||
|
||||
auto simWells = createSimWells( m_simWellInView );
|
||||
const auto& [coords, wellCells] = RigSimulationWellCenterLineCalculator::extractBranchData( simWells );
|
||||
|
||||
m_pipeBranchesCLCoords = coords;
|
||||
std::vector<std::vector<RigWellResultPoint>> pipeBranchesCellIds = wellCells;
|
||||
|
||||
double pipeRadius = m_simWellInView->pipeRadius();
|
||||
int crossSectionVertexCount = m_simWellInView->pipeCrossSectionVertexCount();
|
||||
@@ -294,7 +315,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts( const caf::DisplayCoordTransfor
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( !virtualPerforationResult->showConnectionFactorsOnClosedConnections() && !wResCell->m_isOpen )
|
||||
if ( !virtualPerforationResult->showConnectionFactorsOnClosedConnections() && !wResCell->isOpen() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -417,14 +438,14 @@ void RivSimWellPipesPartMgr::updatePipeResultColor( size_t frameIndex )
|
||||
|
||||
if ( cellIds[wcIdx].isCell() )
|
||||
{
|
||||
wResCell = wResFrame->findResultCellWellHeadExcluded( cellIds[wcIdx].m_gridIndex, cellIds[wcIdx].m_gridCellIndex );
|
||||
wResCell = wResFrame->findResultCellWellHeadExcluded( cellIds[wcIdx].gridIndex(), cellIds[wcIdx].cellIndex() );
|
||||
}
|
||||
|
||||
if ( wResCell )
|
||||
{
|
||||
double cellState = defaultState;
|
||||
|
||||
if ( wResCell->m_isOpen )
|
||||
if ( wResCell->isOpen() )
|
||||
{
|
||||
switch ( wResFrame->m_productionType )
|
||||
{
|
||||
|
@@ -88,13 +88,13 @@ void RivWellSpheresPartMgr::appendDynamicGeometryPartsToModel( cvf::ModelBasicLi
|
||||
{
|
||||
for ( const RigWellResultPoint& wellResultPoint : wellResultBranch.m_branchResultPoints )
|
||||
{
|
||||
size_t gridIndex = wellResultPoint.m_gridIndex;
|
||||
size_t gridIndex = wellResultPoint.gridIndex();
|
||||
|
||||
if ( gridIndex >= mainGrid->gridCount() ) continue;
|
||||
|
||||
const RigGridBase* rigGrid = mainGrid->gridByIndex( gridIndex );
|
||||
|
||||
size_t gridCellIndex = wellResultPoint.m_gridCellIndex;
|
||||
size_t gridCellIndex = wellResultPoint.cellIndex();
|
||||
if ( gridCellIndex >= rigGrid->cellCount() ) continue;
|
||||
|
||||
const RigCell& rigCell = rigGrid->cell( gridCellIndex );
|
||||
@@ -207,7 +207,7 @@ cvf::Color3f RivWellSpheresPartMgr::wellCellColor( const RigWellResultFrame* wel
|
||||
|
||||
if ( wellColl )
|
||||
{
|
||||
if ( wellResultPoint.m_isOpen )
|
||||
if ( wellResultPoint.isOpen() )
|
||||
{
|
||||
switch ( wellResultFrame->m_productionType )
|
||||
{
|
||||
|
Reference in New Issue
Block a user