opm-common
Loading...
Searching...
No Matches
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
25namespace 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 // IHead and JHead < 0 for completed LGR with
32 // heads on other LGRs.
33 FirstK = 2, // Layer ID (one-based) of top/first connection
34 LastK = 3, // Layer ID (one-based) of bottom/last connection
35 NConn = 4, // Number of active cells connected to well
36 // If Well is in amalgamated LGR cells, this is the
37 // number in all LGR cells.
38
39 Group = 5, // Index (one-based) of well's current group
40 WType = 6, // Well type (producer vs. injector)
41 ActWCtrl = 7, // Well's active target control mode (constraint).
42
43 item9 = 8, // Unknown
44 Status = 10, // Well status
45 VFPTab = 11, // ID (one-based) of well's current VFP table.
46
47 EconWorkoverProcedure = 14, // Economic limit workover procedure (WECON(7)).
48 // 0 => No action taken ("NONE"),
49 // 1 => Close worst-offending connection ("CON"),
50 // 2 => Close worst-offending connection and
51 // all other connections below this ("+CON"),
52 // 3 => Shut/stop well ("WELL"),
53 // 6 => Plug well ("PLUG").
54
55 PreferredPhase = 15, // Well's preferred phase (from WELSPECS)
56
57 item18 = 17, // Unknown
58
59 XFlow = 22, // Whether or not well supports cross flow.
60 // 0 => Cross flow NOT supported
61 // 1 => Cross flow IS supported.
62
63 WGrupConControllable = 24, // Well controllable by group (WGRUPCON(2))
64 // -1 => YES, 0 => NO (E100: 1 ==> YES and is active)
65
66 EconLimitEndRun = 29, // Whether or not to end simulation run at next report time
67 // if well is shut or stopped for any reason (WECON(8)).
68 // 0 => No, 1 => Yes.
69
70 item32 = 31, // Unkown
71
72 WGrupConGRPhase = 32, // Phase to which well's guiderate applies (WGRUPCON(4))
73 // 0 => None/defaulted,
74 // 1 => Oil,
75 // 2 => Water,
76 // 3 => Gas,
77 // 4 => Liquid,
78 // 5 => Surface flow rate of injecting phase (injectors only),
79 // 6 => Reservoir fluid volume rate.
80
81 WTestCloseReason = 39, // Dynamic reason for closing a well
82 // 0 => Flowing or manually SHUT/STOPped
83 // 3 => Well closed for Physical reasons (P)
84 // 5 => Well closed for Economic reasons (E)
85 // 6 => Well closed for Group/Field reasons (G)
86 // 9 => Well closed for THP design limit (D)
87
88 WTestConfigReason = 40, // Which checks to perform when deciding to
89 // close a well in WTEST (WTEST(3)).
90 //
91 // Product of prime factors representing individual reasons.
92 // 2 => Physical (P),
93 // 3 => Economic (E),
94 // 5 => Group or Field (G),
95 // 7 => THP design limit (D),
96 // 11 => Test connections individually (C).
97 //
98 // Example: PEG = 2 * 3 * 5 = 30
99 // PEGDC = 2 * 3 * 5 * 7 * 11 = 2310
100
101
102 LGRIndex = 42, // Index of LGR cell where well is completed
103 // for Globl IWELLS. (0 => global''ยง wells),
104 // for LGR IWELLS it refers to the LGWEL TAG.
105
106 WTestRemaining = 45, // Remaining number of times well can be tested (WTEST(4)).
107 // 0 => Unlimited number of tests
108 // >0 => Well can be tested at most this many more times
109
110 item48 = 47, // Unknown
111
112 HistReqWCtrl = 49, // Well's requested control mode from
113 // simulation deck (WCONHIST, WCONINJH)
114
115 LiftOpt = 53, // Well's lift gas injection to be calculated by optimisation or not
116
117 THPLookupVFPTable = 54, // How to look up VFP table values for THP controlled wells
118 // (WVFPEXP(2)). 0 => Implicit, 1 => Explicit.
119
120 EconLimitQuantity = 55, // Quantity to which well's economic limits apply (WECON(10))
121 // 0 => Well's flow rate ("RATE")
122 // 1 => Well's potential flow rates ("POTN")
123
124 EconWorkoverProcedure_2 = 66, // Secondary economic limit workover procedure (WECON(12)).
125 // Usually just a copy of EconWorkoverProcedure.
126
127 MsWID = 70, // Multisegment well ID
128 // Value 0 for regular wells
129 // Value 1..#MS wells for MS wells
130 NWseg = 71, // Number of well segments
131 // Value 0 for regular wells
132 // Value #segments for MS wells
133
134 MSW_PlossMod = 81, // index for Pressure loss model for well segments
135 // ih value for this index is:
136 // = 0 for regular wells
137 // = 0 for MSW wells and HFA (WELSEGS item 6)
138 // = 1 for MSW wells and HF- (WELSEGS item 6)
139 // = 2 for MSW wells and H-- (WELSEGS item 6)
140
141 MSW_MulPhaseMod = 85, // index for Multiphase flow model for well segments - NOTE DF - model is not implemented yet!!
142 // ih value for this index is:
143 // = 0 for regular wells
144 // = 1 for MSW wells and HO (WELSEGS item 7)
145 // = 2 for MSW wells and DF (WELSEGS item 7)
146
147
148 CloseWellIfTHPStabilised = 86, // Whether or not to close well
149 // if operating in "stabilised"
150 // part of VFP curve (WVFPEXP(3))
151 // 0 => No, 1 => Yes
152
153 PreventTHPIfUnstable = 93, // Whether or not to prevent well
154 // changing from rate control to THP
155 // control if constrained to operate
156 // on unstable side of VFP curve.
157 // WVFPEXP(4).
158 // 0 => No,
159 // 2 => YES1,
160 // 3 => YES2.
161
162 CompOrd = 98, // Well's completion ordering scheme.
163
164 LiftOptAllocExtra = 144,
165 };
166
167 namespace Value {
168
169 enum WellCtrlMode : int {
170 WMCtlUnk = -10, // Unknown well control mode (OPM only)
171 Group = - 1, // Well under group control
172 OilRate = 1, // Well controlled by oil rate
173 WatRate = 2, // Well controlled by water rate
174 GasRate = 3, // Well controlled by gas rate
175 LiqRate = 4, // Well controlled by liquid rate
176
177 ResVRate = 5, // Well controlled by
178 // reservoir voidage rate
179
180 THP = 6, // Well controlled by
181 // tubing head pressure target
182
183 BHP = 7, // Well controlled by
184 // bottom-hole pressure target
185
186 CombRate = 9, // Well controlled by linearly
187 // combined rate target
188 };
189
190 enum CompOrder : int {
191 Track = 0, // Connections ordered along
192 // well track (increasing MD)
193
194 Depth = 1, // Connections ordered by inceasing
195 // true vertical depth. Not really
196 // supported in OPM Flow.
197
198 Input = 2, // Connections listed in order of
199 // appearance in simulation model's
200 // COMPDAT keyword.
201 };
202
203 enum Preferred_Phase : int {
204 Oil = 1,
205 Water = 2,
206 Gas = 3,
207 Liquid = 4,
208 };
209
210 enum PLossMod : int {
211 HFA = 0, // Components of pressure loss in MSW model for well (WELSEGS item 6)
212 // Hydrostatic, Friction, Acceleration
213
214 HF_ = 1, // Hydrostatic, Friction,
215
216 H__ = 2, // Hydrostatic
217 };
218
219 /*enum MPMod : int {
220 HO = 1, // Multiphase flow model for MSW well
221 // Homogeneous flow
222
223 DF = 2, // Drift flux model
224 };*/
225
226 enum Status : int {
227 Shut = -1000,
228 Stop = 0,
229 Open = 1,
230 Auto = 3,
231 };
232
233 namespace WGrupCon {
234 enum Controllable : int {
235 Yes = -1,
236 No = 0,
237 };
238
239 enum GRPhase : int {
240 Defaulted = 0,
241 Oil = 1,
242 Water = 2,
243 Gas = 3,
244 Liquid = 4,
245 SurfaceInjectionRate = 5,
246 ReservoirVolumeRate = 6,
247 };
248 } // namespace WGrupCon
249
250 namespace WVfpExp {
251 enum Lookup : int {
252 Implicit = 0,
253 Explicit = 1,
254 };
255
256 enum class CloseStabilised : int {
257 No = 0,
258 Yes = 1,
259 };
260
261 enum class PreventTHP : int {
262 No = 0,
263 Yes1 = 2,
264 Yes2 = 3,
265 };
266 } // namespace WVfpExp
267
268 namespace EconLimit {
269 enum WOProcedure : int {
270 None = 0, // NONE
271 Con = 1, // CON
272 ConAndBelow = 2, // +CON
273 StopOrShut = 3, // WELL
274 Plug = 6, // PLUG
275 };
276
277 enum EndRun : int {
278 No = 0, // Run continues if well shut/stopped
279 Yes = 1, // Run terminates if well shut/stopped
280 };
281
282 enum Quantity : int {
283 Rate = 0, // Apply limits to actual flow rates ("RATE")
284 Potential = 1, // Apply limits to potential flow rates ("POTN")
285 };
286 } // namespace EconLimit
287
288 } // Value
289 } // IWell
290
291 namespace SWell {
292 enum index : std::vector<float>::size_type {
293 OilRateTarget = 0, // Well's current oil rate production target
294 WatRateTarget = 1, // Well's current water rate production target
295 GasRateTarget = 2, // Well's current gas rate production target
296 LiqRateTarget = 3, // Well's current liquid rate production target
297 ResVRateTarget = 4, // Well's current reservoir voidate rate
298 // production target
299
300 THPTarget = 5, // Well's tubing head pressure target
301 BHPTarget = 6, // Well's bottom hole pressure target
302
303 DatumDepth = 9, // Well's reference depth for BHP
304 Alq_value = 10, // Well's artificial lift quantity
305
306 EconLimitMinOil = 12, // Well's minimum oil production rate economic limit (WECON(2))
307 EconLimitMinGas = 13, // Well's minimum gas production rate economic limit (WECON(3))
308 EconLimitMaxWct = 14, // Well's maximum water cut economic limit (WECON(4))
309 EconLimitMaxGor = 15, // Well's maximum gas/oil ratio economic limit (WECON(5))
310
311 DrainageRadius = 16, // Well's drainage radius (WELSPECS(7))
312
313 WGrupConGuideRate = 17, // Well's guide rate (WGRUPCON(3))
314
315 EconLimitMaxWgr = 18, // Well's maximum water/gas ratio economic limit (WECON(6))
316
317 EfficiencyFactor1 = 24, // Well's efficiency factor (WEFAC(2))
318
319 EfficiencyFactor2 = 31, // Well's efficiency factor (WEFAC(2), copy of EfficiencyFactor1)
320 WTestInterval = 32, // Well's WTEST interval (WTEST(2))
321 HistLiqRateTarget = 33, // Well's historical/observed liquid
322 // rate target/limit
323
324 WTestStartupTime = 39, // Well's WTEST startup time (WTEST(5))
325
326 HistGasRateTarget = 54, // Well's historical/observed gas rate
327 // target/limit
328
329 HistBHPTarget = 55, // Well's historical/observed bottom
330 // hole pressure target/limit
331
332 LOmaxRate = 56, // Well's maximum lift gas rate
333 LOweightFac = 57, // Well's wighting factor for preferential allocation of lift gas
334 LOminRate = 67, // Well's mimimum lift gas rate
335
336 EconLimitMaxWct_2 = 71, // Well's secondary maximum water cut economic limit (WECON(11)).
337
338 VfpBhpAdjustment = 78, // Adjust well's BHP from VFP (WVFPDP(2))
339
340 EconLimitMinLiq = 82, // Well's minimum liquid production rate economic limit (WECON(14)).
341 VfpBhpScalingFact = 83, // Tubing pressure loss scaling factor (WVFPDP(3))
342 WGrupConGRScaling = 84, // Guide rate scaling factor (WGRUPCON(5))
343
344 DFacCorrCoeffA = 104, // Coefficient 'A' of D-factor correlation (WDFACCOR(2))
345 DFacCorrExpB = 105, // Exponent 'B' of D-factor correlation (WDFACCOR(3))
346 DFacCorrExpC = 106, // Exponent 'C' of D-factor correlation (WDFACCOR(4))
347
348 LOincFac = 115,
349
350 TracerOffset = 122, // Tracer data start at this index
351 };
352 } // SWell
353
354 namespace XWell {
355 enum index : std::vector<double>::size_type {
356 OilPrRate = 0, // Well's oil production rate
357 WatPrRate = 1, // Well's water production rate
358 GasPrRate = 2, // Well's gas production rate
359 LiqPrRate = 3, // Well's liquid production rate
360 VoidPrRate = 4, // Well's reservoir voidage production rate
361 TubHeadPr = 5, // Well's tubing head pressure
362 FlowBHP = 6, // Well's flowing/producing bottom hole pressure
363 WatCut = 7, // Well's producing water cut
364 GORatio = 8, // Well's producing gas/oil ratio
365
366 OilPrTotal = 18, // Well's total cumulative oil production
367 WatPrTotal = 19, // Well's total cumulative water production
368 GasPrTotal = 20, // Well's total cumulative gas production
369 VoidPrTotal = 21, // Well's total cumulative reservoir
370 // voidage production
371
372 OilInjTotal = 22, // Well's total cumulative oil injection
373 WatInjTotal = 23, // Well's total cumulative water injection
374 GasInjTotal = 24, // Well's total cumulative gas injection
375 VoidInjTotal = 25, // Well's total cumulative reservoir volume injection
376
377 GasFVF = 34, // Well's producing gas formation volume factor.
378
379 item36 = 35, // Unknown
380 item37 = 36, // Unknown
381 item38 = 37, // Unknown
382
383 BHPTarget = 41, // Well's current BHP Target/Limit
384
385 PrimGuideRate = 48, // Well's "primary" guide rate (oil for producers,
386 // preferred phase for injectors)
387 WatPrGuideRate = 49, // Well's producer guide rate for water
388 GasPrGuideRate = 50, // Well's producer guide rate for gas
389 VoidPrGuideRate = 68, // Well's producer guide rate for reservoir voidag volume
390
391 OilPrTotalSolution = 73, // Well's total cumulative oil production in solution
392 GasPrTotalSolution = 74, // Well's total cumulative gas production in solution
393
394 HistOilPrTotal = 75, // Well's total cumulative oil production
395 // (observed/historical rates)
396 HistWatPrTotal = 76, // Well's total cumulative water
397 // production (observed/historical rates)
398 HistGasPrTotal = 77, // Well's total cumulative gas production
399 // (observed(historical rates)
400
401 HistWatInjTotal = 81, // Well's total cumulative water injection
402 // (observed/historical rates)
403 HistGasInjTotal = 82, // Well's total cumulative gas injection
404 // (observed/historical rates)
405
406 PrimGuideRate_2 = 91, // Second copy of well's primary guide rate.
407 // Not fully characterised.
408 WatPrGuideRate_2 = 92, // Second copy of well's producer guide rate for water.
409 // Not fully characterised.
410 GasPrGuideRate_2 = 93, // Second copy of well's producer guide rate for gas
411 // Not fully characterised.
412 VoidPrGuideRate_2 = 94, // Second copy of well's producer guide rate for reservoir voidage
413 // Not fully characterised.
414
415 WatVoidPrRate = 122, // Well's voidage production rate
416 GasVoidPrRate = 123, // Well's voidage production rate
417
418 TracerOffset = 131, // Tracer data start at this index (+1 since late 2022)
419 };
420 } // XWell
421
422 namespace ZWell {
423 enum index : std::vector<const char*>::size_type {
424 WellName = 0, // Well name
425 ActionX = 2, // ActionX name
426 };
427 } // ZWell
428
429 namespace LGWell {
430 enum index : std::vector<int>::size_type {
431 WellRef = 0, // Well Ref
432 };
433 } // LGWell
434
435}}}} // Opm::RestartIO::Helpers::VectorItems
436
437#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:30