opm-common
well.hpp
1 /*
2  Copyright 2020 Equinor ASA.
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 RST_WELL
21 #define RST_WELL
22 
23 #include <opm/io/eclipse/rst/connection.hpp>
24 #include <opm/io/eclipse/rst/segment.hpp>
25 
26 #include <opm/input/eclipse/Schedule/ScheduleTypes.hpp>
27 
28 #include <array>
29 #include <string>
30 #include <unordered_map>
31 #include <utility>
32 #include <vector>
33 
34 namespace Opm {
35 class UnitSystem;
36 } // namespace Opm
37 
38 namespace Opm { namespace RestartIO {
39 
40 struct RstHeader;
41 
42 struct RstWell
43 {
44  RstWell(const ::Opm::UnitSystem& unit_system,
45  const RstHeader& header,
46  const std::string& group_arg,
47  const std::string* zwel,
48  const int * iwel,
49  const float * swel,
50  const double * xwel,
51  const int * icon,
52  const float * scon,
53  const double * xcon);
54 
55  RstWell(const ::Opm::UnitSystem& unit_system,
56  const RstHeader& header,
57  const std::string& group_arg,
58  const std::string* zwel,
59  const int * iwel,
60  const float * swel,
61  const double * xwel,
62  const int * icon,
63  const float * scon,
64  const double * xcon,
65  const std::vector<int>& iseg,
66  const std::vector<double>& rseg);
67 
68  std::string name;
69  std::string group;
70  std::array<int, 2> ij;
71  std::pair<int,int> k1k2;
72  WellType wtype;
73  int well_status;
74  int active_control;
75  int vfp_table;
76  int econ_workover_procedure;
77  bool allow_xflow;
78  int group_controllable_flag;
79  int econ_limit_end_run;
80  int grupcon_gr_phase;
81  int hist_requested_control;
82  int msw_index;
83  int completion_ordering;
84  int pvt_table;
85  int msw_pressure_drop_model;
86  int wtest_config_reasons;
87  int wtest_close_reason;
88  int wtest_remaining;
89  int econ_limit_quantity;
90  int econ_workover_procedure_2;
91  int thp_lookup_procedure_vfptable;
92  int close_if_thp_stabilised;
93  int prevent_thpctrl_if_unstable;
94  bool glift_active;
95  bool glift_alloc_extra_gas;
96 
97  float orat_target;
98  float wrat_target;
99  float grat_target;
100  float lrat_target;
101  float resv_target;
102  float thp_target;
103  float bhp_target_float;
104  float vfp_bhp_adjustment;
105  float vfp_bhp_scaling_factor;
106  float hist_lrat_target;
107  float hist_grat_target;
108  float hist_bhp_target;
109  float datum_depth;
110  float drainage_radius;
111  float grupcon_gr_value;
112  float efficiency_factor;
113  float alq_value;
114  float econ_limit_min_oil;
115  float econ_limit_min_gas;
116  float econ_limit_max_wct;
117  float econ_limit_max_gor;
118  float econ_limit_max_wgr;
119  float econ_limit_max_wct_2;
120  float econ_limit_min_liq;
121  float wtest_interval;
122  float wtest_startup;
123  float grupcon_gr_scaling;
124  double glift_max_rate;
125  double glift_min_rate;
126  double glift_weight_factor;
127  double glift_inc_weight_factor;
128  float dfac_corr_coeff_a{};
129  float dfac_corr_exponent_b{};
130  float dfac_corr_exponent_c{};
131  float inj_temperature{UNDEFINED_VALUE};
132  std::vector<float> tracer_concentration_injection;
133 
134  double oil_rate;
135  double water_rate;
136  double gas_rate;
137  double liquid_rate;
138  double void_rate;
139  double thp;
140  double flow_bhp;
141  double wct;
142  double gor;
143  double oil_total;
144  double water_total;
145  double gas_total;
146  double void_total;
147  double water_inj_total;
148  double gas_inj_total;
149  double void_inj_total;
150  double gas_fvf;
151  double bhp_target_double;
152  double hist_oil_total;
153  double hist_wat_total;
154  double hist_gas_total;
155  double hist_water_inj_total;
156  double hist_gas_inj_total;
157  double water_void_rate;
158  double gas_void_rate;
159 
160  static constexpr auto UNDEFINED_VALUE = 1.0e20f;
161 
162  const RstSegment& segment(int segment_number) const;
163  std::vector<RstConnection> connections;
164  std::vector<RstSegment> segments;
165 };
166 
167 }} // namespace Opm::RestartIO
168 
169 #endif // RST_WELL
Definition: header.hpp:38
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: well.hpp:42
Definition: segment.hpp:33
Definition: ScheduleTypes.hpp:39