mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge remote-tracking branch 'refs/remotes/origin/dev'
Conflicts: ApplicationCode/CMakeLists.txt ApplicationCode/ProjectDataModel/CMakeLists_files.cmake ApplicationCode/ProjectDataModel/RimEclipseWell.h ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake
This commit is contained in:
@@ -82,40 +82,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts()
|
||||
m_pipeBranchesCLCoords.clear();
|
||||
std::vector< std::vector <RigWellResultPoint> > pipeBranchesCellIds;
|
||||
|
||||
RigSimulationWellCenterLineCalculator::calculateWellPipeCenterline(m_rimWell.p(), m_pipeBranchesCLCoords, pipeBranchesCellIds);
|
||||
|
||||
RimEclipseWellCollection* wellColl = nullptr;
|
||||
m_rimWell->firstAncestorOrThisOfType(wellColl);
|
||||
if (wellColl && wellColl->wellPipeCoordType() == RimEclipseWellCollection::WELLPIPE_CELLCENTER)
|
||||
{
|
||||
// Compute coords based on connection centers
|
||||
// Loop over all well cells, and overwrite with cell center instead of interpolated coordinates
|
||||
|
||||
RigMainGrid* mainGrid = m_rimReservoirView->mainGrid();
|
||||
|
||||
for (size_t i = 0; i < pipeBranchesCellIds.size(); i++)
|
||||
{
|
||||
const std::vector<RigWellResultPoint>& resPoints = pipeBranchesCellIds[i];
|
||||
for (size_t j = 0; j < resPoints.size(); j++)
|
||||
{
|
||||
if (resPoints[j].isCell())
|
||||
{
|
||||
size_t gridIndex = resPoints[j].m_gridIndex;
|
||||
size_t gridCellIndex = resPoints[j].m_gridCellIndex;
|
||||
|
||||
if (gridIndex < mainGrid->gridCount())
|
||||
{
|
||||
RigGridBase* rigGrid = mainGrid->gridByIndex(gridIndex);
|
||||
if (gridCellIndex < rigGrid->cellCount())
|
||||
{
|
||||
cvf::Vec3d center = rigGrid->cell(gridCellIndex).center();
|
||||
m_pipeBranchesCLCoords[i][j] = center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
m_rimWell->calculateWellPipeStaticCenterLine(m_pipeBranchesCLCoords, pipeBranchesCellIds);
|
||||
|
||||
double characteristicCellSize = m_rimReservoirView->mainGrid()->characteristicIJCellSize();
|
||||
double pipeRadius = m_rimReservoirView->wellCollection()->pipeRadiusScaleFactor() *m_rimWell->pipeRadiusScaleFactor() * characteristicCellSize;
|
||||
|
||||
Reference in New Issue
Block a user