opm-common
Compsegs.hpp
1 /*
2  Copyright 2015 SINTEF ICT, Applied Mathematics.
3 
4  This file is part of the Open Porous Media project (OPM).
5 
6  OPM is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef COMPSEGS_HPP_
21 #define COMPSEGS_HPP_
22 
23 #include <array>
24 #include <string_view>
25 #include <unordered_map>
26 #include <utility>
27 #include <vector>
28 
29 namespace Opm {
30 
31  class Connection;
32  class DeckKeyword;
33  class ErrorGuard;
34  class KeywordLocation;
35  class ParseContext;
36  class ScheduleGrid;
37  class Segment;
38  class WellConnections;
39  class WellSegments;
40 
41 } // namespace Opm
42 
43 namespace Opm::RestartIO {
44 
45  struct RstWell;
46 
47 } // namespace Opm::RestartIO
48 
49 namespace Opm::Compsegs {
50 
80  WellConnections
81  processCOMPSEGS(const DeckKeyword& compsegs,
82  const WellConnections& input_connections,
83  const WellSegments& input_segments,
84  const ScheduleGrid& grid,
85  const ParseContext& parseContext,
86  ErrorGuard& errors);
87 
91  {
93  double startMD{};
94 
96  double endMD{};
97 
99  std::array<int, 3> ijk{};
100  };
101 
130  getConnectionsAndSegmentsFromTrajectory(std::string_view well_name,
131  const std::vector<TrajectorySegment>& trajectory_segments,
132  const WellSegments& segments,
133  const WellConnections& input_connections,
134  const ScheduleGrid& grid,
135  const KeywordLocation& location,
136  const ParseContext& parseContext,
137  ErrorGuard& errors);
138 
152  std::pair<WellConnections, WellSegments>
153  rstUpdate(const RestartIO::RstWell& rst_well,
154  std::vector<Connection> input_connections,
155  const std::unordered_map<int, Segment>& input_segments);
156 
157 } // namespace Opm::Compsegs
158 
159 #endif // COMPSEGS_HPP_
double startMD
Measured depth along well bore at the start of the segment.
Definition: Compsegs.hpp:93
Definition: KeywordLocation.hpp:27
double endMD
Measured depth along well bore at the end of the segment.
Definition: Compsegs.hpp:96
Single well segment of a grid-independent well (WELTRAJ/COMPTRAJ keywords).
Definition: Compsegs.hpp:90
Definition: WellSegments.hpp:55
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Collection of intersected cells and associate properties for all simulation grids, i.e., the main grid and all LGRs in the simulation run.
Definition: ScheduleGrid.hpp:49
Definition: well.hpp:42
Control parser behaviour in failure conditions.
Definition: ParseContext.hpp:114
Definition: WellConnections.hpp:48
Definition: Aquancon.hpp:40
std::array< int, 3 > ijk
Cartesian IJK tuple of the cell intersected by this segment.
Definition: Compsegs.hpp:99
Definition: Compsegs.hpp:49
Definition: ErrorGuard.hpp:30