2015-11-26 10:14:43 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) Statoil ASA
|
|
|
|
|
// Copyright (C) Ceetron Solutions AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2015-11-26 10:14:43 +01:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2015-11-26 10:14:43 +01:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2015-11-26 10:14:43 +01:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
2020-01-14 09:34:27 +01:00
|
|
|
|
2015-11-26 10:14:43 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
2023-04-14 11:00:45 +02:00
|
|
|
#include "RigWellResultBranch.h"
|
2023-02-28 16:06:37 +01:00
|
|
|
|
2015-11-26 10:14:43 +01:00
|
|
|
#include "cvfVector3.h"
|
2018-03-02 14:09:46 +01:00
|
|
|
|
2023-02-28 16:06:37 +01:00
|
|
|
#include <map>
|
2015-11-26 10:14:43 +01:00
|
|
|
#include <vector>
|
|
|
|
|
|
2017-01-20 15:00:19 +01:00
|
|
|
class RigEclipseCaseData;
|
2017-10-13 09:29:42 +02:00
|
|
|
class RimSimWellInView;
|
2021-05-26 11:31:47 +02:00
|
|
|
class RigSimWellData;
|
|
|
|
|
class RigWellResultFrame;
|
2015-11-26 10:14:43 +01:00
|
|
|
|
2018-03-02 14:09:46 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2018-03-02 14:09:46 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2015-11-26 10:14:43 +01:00
|
|
|
class RigSimulationWellCenterLineCalculator
|
|
|
|
|
{
|
|
|
|
|
public:
|
2024-01-25 18:17:10 +01:00
|
|
|
static std::vector<SimulationWellCellBranch> calculateWellPipeStaticCenterline( const RimSimWellInView* rimWell );
|
2023-02-28 16:06:37 +01:00
|
|
|
|
|
|
|
|
static std::vector<SimulationWellCellBranch> calculateWellPipeCenterlineForTimeStep( const RigEclipseCaseData* eclipseCaseData,
|
|
|
|
|
const RigSimWellData* simWellData,
|
|
|
|
|
int timeStepIndex,
|
|
|
|
|
bool isAutoDetectBranches,
|
|
|
|
|
bool useAllCellCenters );
|
|
|
|
|
|
|
|
|
|
static std::pair<std::vector<std::vector<cvf::Vec3d>>, std::vector<std::vector<RigWellResultPoint>>>
|
|
|
|
|
extractBranchData( const std::vector<SimulationWellCellBranch> simulationBranch );
|
|
|
|
|
|
|
|
|
|
private:
|
2024-01-25 18:17:10 +01:00
|
|
|
static void calculateWellPipeStaticCenterline( const RimSimWellInView* rimWell,
|
2019-09-06 10:40:57 +02:00
|
|
|
std::vector<std::vector<cvf::Vec3d>>& pipeBranchesCLCoords,
|
|
|
|
|
std::vector<std::vector<RigWellResultPoint>>& pipeBranchesCellIds );
|
|
|
|
|
|
2023-02-28 16:06:37 +01:00
|
|
|
static void calculateWellPipeCenterlineForTimeStep( const RigEclipseCaseData* eclipseCaseData,
|
|
|
|
|
const RigSimWellData* simWellData,
|
|
|
|
|
int timeStepIndex,
|
|
|
|
|
bool isAutoDetectBranches,
|
|
|
|
|
bool useAllCellCenters,
|
|
|
|
|
std::vector<std::vector<cvf::Vec3d>>& pipeBranchesCLCoords,
|
|
|
|
|
std::vector<std::vector<RigWellResultPoint>>& pipeBranchesCellIds );
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
static bool hasAnyValidDataCells( const RigWellResultBranch& branch );
|
2023-02-26 10:48:40 +01:00
|
|
|
static void finishPipeCenterLine( std::vector<std::vector<cvf::Vec3d>>& pipeBranchesCLCoords, const cvf::Vec3d& lastCellCenter );
|
2019-09-06 10:40:57 +02:00
|
|
|
|
2023-04-14 11:00:45 +02:00
|
|
|
static void addCellCenterPoints( const RigEclipseCaseData* eclipseCaseData,
|
|
|
|
|
std::vector<std::vector<cvf::Vec3d>>& pipeBranchesCLCoords,
|
|
|
|
|
std::vector<std::vector<RigWellResultPoint>>& pipeBranchesCellIds );
|
2015-11-26 10:14:43 +01:00
|
|
|
};
|