My Project
well.hpp
1 /*
2  Copyright (c) 2018 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 OPM_OUTPUT_ECLIPSE_VECTOR_WELL_HPP
21 #define OPM_OUTPUT_ECLIPSE_VECTOR_WELL_HPP
22 
23 #include <vector>
24 
25 namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems {
26 
27  namespace IWell {
28  enum index : std::vector<int>::size_type {
29  IHead = 0, // I-location (one-based) of well head
30  JHead = 1, // J-location (one-based) of well head
31  FirstK = 2, // Layer ID (one-based) of top/first connection
32  LastK = 3, // Layer ID (one-based) of bottom/last connection
33  NConn = 4, // Number of active cells connected to well
34  Group = 5, // Index (one-based) of well's current group
35  WType = 6, // Well type (producer vs. injector)
36  ActWCtrl = 7, // Well's active target control mode (constraint).
37 
38  item9 = 8, // Unknown
39  Status = 10, // Well status
40  VFPTab = 11, // ID (one-based) of well's current VFP table.
41 
42  PreferredPhase = 15, // Well's preferred phase (from WELSPECS)
43 
44  item18 = 17, // Unknown
45  XFlow = 22,
46  item25 = 24, // Unknown
47  item32 = 31, // Unknown
48  WTestCloseReason = 39,
49  WTestConfigReason = 42,
50  WTestRemaining = 45,
51  item48 = 47, // Unknown
52 
53  HistReqWCtrl = 49, // Well's requested control mode from
54  // simulation deck (WCONHIST, WCONINJH)
55 
56  LiftOpt = 53, // Well's lift gas injection to be calculated by optimisation or not
57 
58  MsWID = 70, // Multisegment well ID
59  // Value 0 for regular wells
60  // Value 1..#MS wells for MS wells
61  NWseg = 71, // Number of well segments
62  // Value 0 for regular wells
63  // Value #segments for MS wells
64 
65  MSW_PlossMod = 81, // index for Pressure loss model for well segments
66  // ih value for this index is:
67  // = 0 for regular wells
68  // = 0 for MSW wells and HFA (WELSEGS item 6)
69  // = 1 for MSW wells and HF- (WELSEGS item 6)
70  // = 2 for MSW wells and H-- (WELSEGS item 6)
71 
72  MSW_MulPhaseMod = 85, // index for Multiphase flow model for well segments - NOTE DF - model is not implemented yet!!
73  // ih value for this index is:
74  // = 0 for regular wells
75  // = 1 for MSW wells and HO (WELSEGS item 7)
76  // = 2 for MSW wells and DF (WELSEGS item 7)
77 
78 
79  CompOrd = 98, // Well's completion ordering scheme.
80  };
81 
82  namespace Value {
83 
84  enum WellCtrlMode : int {
85  WMCtlUnk = -10, // Unknown well control mode (OPM only)
86  Group = - 1, // Well under group control
87  OilRate = 1, // Well controlled by oil rate
88  WatRate = 2, // Well controlled by water rate
89  GasRate = 3, // Well controlled by gas rate
90  LiqRate = 4, // Well controlled by liquid rate
91 
92  ResVRate = 5, // Well controlled by
93  // reservoir voidage rate
94 
95  THP = 6, // Well controlled by
96  // tubing head pressure target
97 
98  BHP = 7, // Well controlled by
99  // bottom-hole pressure target
100 
101  CombRate = 9, // Well controlled by linearly
102  // combined rate target
103  };
104 
105  enum CompOrder : int {
106  Track = 0, // Connections ordered along
107  // well track (increasing MD)
108 
109  Depth = 1, // Connections ordered by inceasing
110  // true vertical depth. Not really
111  // supported in OPM Flow.
112 
113  Input = 2, // Connections listed in order of
114  // appearance in simulation model's
115  // COMPDAT keyword.
116  };
117 
118  enum Preferred_Phase : int {
119  Oil = 1,
120  Water = 2,
121  Gas = 3,
122  Liquid = 4,
123  };
124 
125  enum PLossMod : int {
126  HFA = 0, // Components of pressure loss in MSW model for well (WELSEGS item 6)
127  // Hydrostatic, Friction, Acceleration
128 
129  HF_ = 1, // Hydrostatic, Friction,
130 
131  H__ = 2, // Hydrostatic
132  };
133 
134  /*enum MPMod : int {
135  HO = 1, // Multiphase flow model for MSW well
136  // Homogeneous flow
137 
138  DF = 2, // Drift flux model
139  };*/
140 
141  enum Status : int {
142  Shut = -1000,
143  Stop = 0,
144  Open = 1,
145  Auto = 3,
146  };
147 
148  } // Value
149  } // IWell
150 
151  namespace SWell {
152  enum index : std::vector<float>::size_type {
153  OilRateTarget = 0, // Well's current oil rate production target
154  WatRateTarget = 1, // Well's current water rate production target
155  GasRateTarget = 2, // Well's current gas rate production target
156  LiqRateTarget = 3, // Well's current liquid rate production target
157  ResVRateTarget = 4, // Well's current reservoir voidate rate
158  // production target
159 
160  THPTarget = 5, // Well's tubing head pressure target
161  BHPTarget = 6, // Well's bottom hole pressure target
162 
163  DatumDepth = 9, // Well's reference depth for BHP
164  Alq_value = 10, // Well's artificial lift quantity
165 
166  DrainageRadius = 17, // Well's drainage radius - item 7 from WELSPECS
167  EfficiencyFactor1 = 24, // Item2 from WEFAC; this value is repeated at two locations.
168  EfficiencyFactor2 = 31, // Item2 from WEFAC
169  WTestInterval = 32,
170  HistLiqRateTarget = 33, // Well's historical/observed liquid
171  // rate target/limit
172  WTestStartupTime = 39,
173 
174  HistGasRateTarget = 54, // Well's historical/observed gas rate
175  // target/limit
176 
177  HistBHPTarget = 55, // Well's historical/observed bottom
178  // hole pressure target/limit
179 
180  LOmaxRate = 56, // Well's maximum lift gas rate
181  LOweightFac = 57, // Well's wighting factor for preferential allocation of lift gas
182  LOminRate = 67, // Well's mimimum lift gas rate
183 
184  };
185  } // SWell
186 
187  namespace XWell {
188  enum index : std::vector<double>::size_type {
189  OilPrRate = 0, // Well's oil production rate
190  WatPrRate = 1, // Well's water production rate
191  GasPrRate = 2, // Well's gas production rate
192  LiqPrRate = 3, // Well's liquid production rate
193  VoidPrRate = 4, // Well's reservoir voidage production rate
194  TubHeadPr = 5, // Well's tubing head pressure
195  FlowBHP = 6, // Well's flowing/producing bottom hole pressure
196  WatCut = 7, // Well's producing water cut
197  GORatio = 8, // Well's producing gas/oil ratio
198 
199  OilPrTotal = 18, // Well's total cumulative oil production
200  WatPrTotal = 19, // Well's total cumulative water production
201  GasPrTotal = 20, // Well's total cumulative gas production
202  VoidPrTotal = 21, // Well's total cumulative reservoir
203  // voidage production
204 
205  WatInjTotal = 23, // Well's total cumulative water injection
206  GasInjTotal = 24, // Well's total cumulative gas injection
207  VoidInjTotal = 25, // Well's total cumulative reservoir volume injection
208 
209  GasFVF = 34, // Well's producing gas formation volume factor.
210 
211  item37 = 36, // Unknown
212  item38 = 37, // Unknown
213 
214  BHPTarget = 41, // Well's current BHP Target/Limit
215 
216  PrimGuideRate = 48, // Well's "primary" guide rate (oil for producers,
217  // preferred phase for injectors)
218  WatPrGuideRate = 49, // Well's producer guide rate for water
219  GasPrGuideRate = 50, // Well's producer guide rate for gas
220  VoidPrGuideRate = 68, // Well's producer guide rate for reservoir voidag volume
221 
222  HistOilPrTotal = 75, // Well's total cumulative oil production
223  // (observed/historical rates)
224  HistWatPrTotal = 76, // Well's total cumulative water
225  // production (observed/historical rates)
226  HistGasPrTotal = 77, // Well's total cumulative gas production
227  // (observed(historical rates)
228 
229  HistWatInjTotal = 81, // Well's total cumulative water injection
230  // (observed/historical rates)
231  HistGasInjTotal = 82, // Well's total cumulative gas injection
232  // (observed/historical rates)
233 
234  PrimGuideRate_2 = 91, // Second copy of well's primary guide rate.
235  // Not fully characterised.
236  WatPrGuideRate_2 = 92, // Second copy of well's producer guide rate for water.
237  // Not fully characterised.
238  GasPrGuideRate_2 = 93, // Second copy of well's producer guide rate for gas
239  // Not fully characterised.
240  VoidPrGuideRate_2 = 94, // Second copy of well's producer guide rate for reservoir voidage
241  // Not fully characterised.
242 
243  WatVoidPrRate = 122, // Well's voidage production rate
244  GasVoidPrRate = 123, // Well's voidage production rate
245  };
246  } // XWell
247 
248  namespace ZWell {
249  enum index : std::vector<const char*>::size_type {
250  WellName = 0, // Well name
251  ActionX = 2, // ActionX name
252  };
253  } // ZWell
254 }}}} // Opm::RestartIO::Helpers::VectorItems
255 
256 #endif // OPM_OUTPUT_ECLIPSE_VECTOR_WELL_HPP
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29