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