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  LiftOptAllocExtra = 144
82  };
83 
84  namespace Value {
85 
86  enum WellCtrlMode : int {
87  WMCtlUnk = -10, // Unknown well control mode (OPM only)
88  Group = - 1, // Well under group control
89  OilRate = 1, // Well controlled by oil rate
90  WatRate = 2, // Well controlled by water rate
91  GasRate = 3, // Well controlled by gas rate
92  LiqRate = 4, // Well controlled by liquid rate
93 
94  ResVRate = 5, // Well controlled by
95  // reservoir voidage rate
96 
97  THP = 6, // Well controlled by
98  // tubing head pressure target
99 
100  BHP = 7, // Well controlled by
101  // bottom-hole pressure target
102 
103  CombRate = 9, // Well controlled by linearly
104  // combined rate target
105  };
106 
107  enum CompOrder : int {
108  Track = 0, // Connections ordered along
109  // well track (increasing MD)
110 
111  Depth = 1, // Connections ordered by inceasing
112  // true vertical depth. Not really
113  // supported in OPM Flow.
114 
115  Input = 2, // Connections listed in order of
116  // appearance in simulation model's
117  // COMPDAT keyword.
118  };
119 
120  enum Preferred_Phase : int {
121  Oil = 1,
122  Water = 2,
123  Gas = 3,
124  Liquid = 4,
125  };
126 
127  enum PLossMod : int {
128  HFA = 0, // Components of pressure loss in MSW model for well (WELSEGS item 6)
129  // Hydrostatic, Friction, Acceleration
130 
131  HF_ = 1, // Hydrostatic, Friction,
132 
133  H__ = 2, // Hydrostatic
134  };
135 
136  /*enum MPMod : int {
137  HO = 1, // Multiphase flow model for MSW well
138  // Homogeneous flow
139 
140  DF = 2, // Drift flux model
141  };*/
142 
143  enum Status : int {
144  Shut = -1000,
145  Stop = 0,
146  Open = 1,
147  Auto = 3,
148  };
149 
150  } // Value
151  } // IWell
152 
153  namespace SWell {
154  enum index : std::vector<float>::size_type {
155  OilRateTarget = 0, // Well's current oil rate production target
156  WatRateTarget = 1, // Well's current water rate production target
157  GasRateTarget = 2, // Well's current gas rate production target
158  LiqRateTarget = 3, // Well's current liquid rate production target
159  ResVRateTarget = 4, // Well's current reservoir voidate rate
160  // production target
161 
162  THPTarget = 5, // Well's tubing head pressure target
163  BHPTarget = 6, // Well's bottom hole pressure target
164 
165  DatumDepth = 9, // Well's reference depth for BHP
166  Alq_value = 10, // Well's artificial lift quantity
167 
168  DrainageRadius = 17, // Well's drainage radius - item 7 from WELSPECS
169  EfficiencyFactor1 = 24, // Item2 from WEFAC; this value is repeated at two locations.
170  EfficiencyFactor2 = 31, // Item2 from WEFAC
171  WTestInterval = 32,
172  HistLiqRateTarget = 33, // Well's historical/observed liquid
173  // rate target/limit
174  WTestStartupTime = 39,
175 
176  HistGasRateTarget = 54, // Well's historical/observed gas rate
177  // target/limit
178 
179  HistBHPTarget = 55, // Well's historical/observed bottom
180  // hole pressure target/limit
181 
182  LOmaxRate = 56, // Well's maximum lift gas rate
183  LOweightFac = 57, // Well's wighting factor for preferential allocation of lift gas
184  LOminRate = 67, // Well's mimimum lift gas rate
185  LOincFac =115,
186 
187  TracerOffset = 122, // Tracer data start at this index
188  };
189  } // SWell
190 
191  namespace XWell {
192  enum index : std::vector<double>::size_type {
193  OilPrRate = 0, // Well's oil production rate
194  WatPrRate = 1, // Well's water production rate
195  GasPrRate = 2, // Well's gas production rate
196  LiqPrRate = 3, // Well's liquid production rate
197  VoidPrRate = 4, // Well's reservoir voidage production rate
198  TubHeadPr = 5, // Well's tubing head pressure
199  FlowBHP = 6, // Well's flowing/producing bottom hole pressure
200  WatCut = 7, // Well's producing water cut
201  GORatio = 8, // Well's producing gas/oil ratio
202 
203  OilPrTotal = 18, // Well's total cumulative oil production
204  WatPrTotal = 19, // Well's total cumulative water production
205  GasPrTotal = 20, // Well's total cumulative gas production
206  VoidPrTotal = 21, // Well's total cumulative reservoir
207  // voidage production
208 
209  OilInjTotal = 22, // Well's total cumulative oil injection
210  WatInjTotal = 23, // Well's total cumulative water injection
211  GasInjTotal = 24, // Well's total cumulative gas injection
212  VoidInjTotal = 25, // Well's total cumulative reservoir volume injection
213 
214  GasFVF = 34, // Well's producing gas formation volume factor.
215 
216  item36 = 35, // Unknown
217  item37 = 36, // Unknown
218  item38 = 37, // Unknown
219 
220  BHPTarget = 41, // Well's current BHP Target/Limit
221 
222  PrimGuideRate = 48, // Well's "primary" guide rate (oil for producers,
223  // preferred phase for injectors)
224  WatPrGuideRate = 49, // Well's producer guide rate for water
225  GasPrGuideRate = 50, // Well's producer guide rate for gas
226  VoidPrGuideRate = 68, // Well's producer guide rate for reservoir voidag volume
227 
228  OilPrTotalSolution = 73, // Well's total cumulative oil production in solution
229  GasPrTotalSolution = 74, // Well's total cumulative gas production in solution
230 
231  HistOilPrTotal = 75, // Well's total cumulative oil production
232  // (observed/historical rates)
233  HistWatPrTotal = 76, // Well's total cumulative water
234  // production (observed/historical rates)
235  HistGasPrTotal = 77, // Well's total cumulative gas production
236  // (observed(historical rates)
237 
238  HistWatInjTotal = 81, // Well's total cumulative water injection
239  // (observed/historical rates)
240  HistGasInjTotal = 82, // Well's total cumulative gas injection
241  // (observed/historical rates)
242 
243  PrimGuideRate_2 = 91, // Second copy of well's primary guide rate.
244  // Not fully characterised.
245  WatPrGuideRate_2 = 92, // Second copy of well's producer guide rate for water.
246  // Not fully characterised.
247  GasPrGuideRate_2 = 93, // Second copy of well's producer guide rate for gas
248  // Not fully characterised.
249  VoidPrGuideRate_2 = 94, // Second copy of well's producer guide rate for reservoir voidage
250  // Not fully characterised.
251 
252  WatVoidPrRate = 122, // Well's voidage production rate
253  GasVoidPrRate = 123, // Well's voidage production rate
254 
255  TracerOffset = 130, // Tracer data start at this index
256  };
257  } // XWell
258 
259  namespace ZWell {
260  enum index : std::vector<const char*>::size_type {
261  WellName = 0, // Well name
262  ActionX = 2, // ActionX name
263  };
264  } // ZWell
265 }}}} // Opm::RestartIO::Helpers::VectorItems
266 
267 #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