ScheduleEnums.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2013 Statoil 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 SCHEDULE_ENUMS_H
21 #define SCHEDULE_ENUMS_H
22 
23 #include <string>
24 #include <stdexcept>
25 
26 namespace Opm {
27  namespace WellCommon {
28 
29  enum StatusEnum {
30  OPEN = 1,
31  STOP = 2,
32  SHUT = 3,
33  AUTO = 4
34  };
35 
36  const std::string Status2String(StatusEnum enumValue);
37  StatusEnum StatusFromString(const std::string& stringValue);
38  }
39 
40  namespace WellCompletion {
41 
42  enum StateEnum {
43  OPEN = 1,
44  SHUT = 2,
45  AUTO = 3
46  };
47 
48 
50  X = 1,
51  Y = 2,
52  Z = 3
53  };
54 
55 
60  };
61 
62  std::string DirectionEnum2String(const DirectionEnum enumValue);
63  DirectionEnum DirectionEnumFromString(const std::string& stringValue);
64 
65  const std::string StateEnum2String( StateEnum enumValue );
66  StateEnum StateEnumFromString( const std::string& stringValue );
67 
68  const std::string CompletionOrderEnum2String( CompletionOrderEnum enumValue );
69  CompletionOrderEnum CompletionOrderEnumFromString(const std::string& comporderStringValue);
70 
71  }
72 
73 
74  namespace Phase {
75  enum PhaseEnum {
76  OIL = 1,
77  GAS = 2,
78  WATER = 4
79  };
80 
81  const std::string PhaseEnum2String( PhaseEnum enumValue );
82  PhaseEnum PhaseEnumFromString( const std::string& stringValue );
83  }
84 
85 
86 
87  namespace WellInjector {
88  enum TypeEnum {
89  WATER = 1,
90  GAS = 2,
91  OIL = 3,
92  MULTI = 4
93  };
94 
95 
97  RATE = 1 ,
98  RESV = 2 ,
99  BHP = 4 ,
100  THP = 8 ,
101  GRUP = 16 ,
103  };
104  /*
105  The elements in this enum are used as bitmasks to keep track
106  of which controls are present, i.e. the 2^n structure must
107  be intact.
108  */
109 
110 
111 
112  const std::string ControlMode2String( ControlModeEnum enumValue );
113  ControlModeEnum ControlModeFromString( const std::string& stringValue );
114 
115  const std::string Type2String( TypeEnum enumValue );
116  TypeEnum TypeFromString( const std::string& stringValue );
117  }
118 
119 
120  namespace WellProducer {
121 
123  ORAT = 1,
124  WRAT = 2,
125  GRAT = 4,
126  LRAT = 8,
127  CRAT = 16,
128  RESV = 32,
129  BHP = 64,
130  THP = 128,
131  GRUP = 256,
133  };
134 
135  /*
136  The items BHP, THP and GRUP only apply in prediction mode:
137  WCONPROD. The elements in this enum are used as bitmasks to
138  keep track of which controls are present, i.e. the 2^n
139  structure must be intact.
140 
141  The properties are initialized with the CMODE_UNDEFINED
142  value, but the undefined value is never assigned apart from
143  that; and it is not part of the string conversion routines.
144  */
145 
146 
147  const std::string ControlMode2String( ControlModeEnum enumValue );
148  ControlModeEnum ControlModeFromString( const std::string& stringValue );
149  }
150 
151 
152  namespace GroupInjection {
153 
154  enum ControlEnum {
155  NONE = 0,
156  RATE = 1,
157  RESV = 2,
158  REIN = 3,
159  VREP = 4,
160  FLD = 5
161  };
162 
163  const std::string ControlEnum2String( ControlEnum enumValue );
164  ControlEnum ControlEnumFromString( const std::string& stringValue );
165  }
166 
167 
168  namespace GroupProductionExceedLimit {
169  enum ActionEnum {
170  NONE = 0,
171  CON = 1,
172  CON_PLUS = 2, // String: "+CON"
173  WELL = 3,
174  PLUG = 4,
175  RATE = 5
176  };
177 
178  const std::string ActionEnum2String( ActionEnum enumValue );
179  ActionEnum ActionEnumFromString( const std::string& stringValue );
180  }
181 
182 
183 
184  namespace GroupProduction {
185 
186  enum ControlEnum {
187  NONE = 0,
188  ORAT = 1,
189  WRAT = 2,
190  GRAT = 3,
191  LRAT = 4,
192  CRAT = 5,
193  RESV = 6,
194  PRBL = 7
195  };
196 
197  const std::string ControlEnum2String( GroupProduction::ControlEnum enumValue );
198  GroupProduction::ControlEnum ControlEnumFromString( const std::string& stringValue );
199  }
200 
201  namespace GuideRate {
203  OIL = 0,
204  WAT = 1,
205  GAS = 2,
206  LIQ = 3,
207  COMB = 4,
208  WGA = 5,
209  CVAL = 6,
210  RAT = 7,
211  RES = 8,
213  };
214  const std::string GuideRatePhaseEnum2String( GuideRatePhaseEnum enumValue );
215  GuideRatePhaseEnum GuideRatePhaseEnumFromString( const std::string& stringValue );
216  }
217 
218  namespace RFTConnections {
219  enum RFTEnum {
220  YES = 1,
221  REPT = 2,
222  TIMESTEP = 3,
223  FOPN = 4,
224  NO = 5
225  };
226 
227  const std::string RFTEnum2String(RFTEnum enumValue);
228 
229  RFTEnum RFTEnumFromString(const std::string &stringValue);
230  }
231  namespace PLTConnections{
232  enum PLTEnum{
233  YES = 1,
234  REPT = 2,
235  TIMESTEP = 3,
236  NO = 4
237  };
238  const std::string PLTEnum2String( PLTEnum enumValue);
239  PLTEnum PLTEnumFromString( const std::string& stringValue);
240  }
241 
243  VAPPARS = 1,
244  DRSDT = 2,
245  DRVDT = 3
246  };
247 
248 
249 }
250 
251 #endif
Definition: ScheduleEnums.hpp:101
Definition: ScheduleEnums.hpp:221
Definition: ScheduleEnums.hpp:123
Definition: ScheduleEnums.hpp:243
Definition: ScheduleEnums.hpp:30
Definition: ScheduleEnums.hpp:222
Definition: ScheduleEnums.hpp:175
Definition: ScheduleEnums.hpp:77
Definition: ScheduleEnums.hpp:126
Definition: ScheduleEnums.hpp:124
Definition: ScheduleEnums.hpp:234
const std::string ControlMode2String(ControlModeEnum enumValue)
Definition: ScheduleEnums.hpp:188
ControlModeEnum ControlModeFromString(const std::string &stringValue)
Definition: ScheduleEnums.hpp:223
StatusEnum
Definition: ScheduleEnums.hpp:29
Definition: ScheduleEnums.hpp:89
Definition: Deck.hpp:29
GuideRatePhaseEnum GuideRatePhaseEnumFromString(const std::string &stringValue)
Definition: ScheduleEnums.hpp:129
const std::string GuideRatePhaseEnum2String(GuideRatePhaseEnum enumValue)
TypeEnum
Definition: ScheduleEnums.hpp:88
Definition: ScheduleEnums.hpp:187
Definition: ScheduleEnums.hpp:206
const std::string PhaseEnum2String(PhaseEnum enumValue)
Definition: ScheduleEnums.hpp:204
GroupProduction::ControlEnum ControlEnumFromString(const std::string &stringValue)
Definition: ScheduleEnums.hpp:211
Definition: ScheduleEnums.hpp:132
PLTEnum PLTEnumFromString(const std::string &stringValue)
Definition: ScheduleEnums.hpp:52
Definition: ScheduleEnums.hpp:98
Definition: ScheduleEnums.hpp:224
Definition: ScheduleEnums.hpp:220
Definition: ScheduleEnums.hpp:173
const std::string ControlMode2String(ControlModeEnum enumValue)
Definition: ScheduleEnums.hpp:32
const std::string RFTEnum2String(RFTEnum enumValue)
const std::string PLTEnum2String(PLTEnum enumValue)
Definition: ScheduleEnums.hpp:192
Definition: ScheduleEnums.hpp:44
const std::string StateEnum2String(StateEnum enumValue)
std::string DirectionEnum2String(const DirectionEnum enumValue)
ControlModeEnum
Definition: ScheduleEnums.hpp:96
Definition: ScheduleEnums.hpp:212
ActionEnum
Definition: ScheduleEnums.hpp:169
Definition: ScheduleEnums.hpp:100
Definition: ScheduleEnums.hpp:97
Definition: ScheduleEnums.hpp:210
const std::string ActionEnum2String(ActionEnum enumValue)
PhaseEnum
Definition: ScheduleEnums.hpp:75
Definition: ScheduleEnums.hpp:57
ControlModeEnum ControlModeFromString(const std::string &stringValue)
Definition: ScheduleEnums.hpp:170
StateEnum StateEnumFromString(const std::string &stringValue)
Definition: ScheduleEnums.hpp:31
Definition: ScheduleEnums.hpp:90
ControlEnum
Definition: ScheduleEnums.hpp:186
Definition: ScheduleEnums.hpp:102
Definition: ScheduleEnums.hpp:92
Definition: ScheduleEnums.hpp:155
DirectionEnum
Definition: ScheduleEnums.hpp:49
const std::string Status2String(StatusEnum enumValue)
Definition: ScheduleEnums.hpp:236
Definition: ScheduleEnums.hpp:174
const std::string CompletionOrderEnum2String(CompletionOrderEnum enumValue)
ControlEnum ControlEnumFromString(const std::string &stringValue)
Definition: ScheduleEnums.hpp:33
Definition: ScheduleEnums.hpp:99
Definition: ScheduleEnums.hpp:194
RFTEnum RFTEnumFromString(const std::string &stringValue)
CompletionOrderEnum
Definition: ScheduleEnums.hpp:56
Definition: ScheduleEnums.hpp:130
Definition: ScheduleEnums.hpp:128
StateEnum
Definition: ScheduleEnums.hpp:42
Definition: ScheduleEnums.hpp:193
Definition: ScheduleEnums.hpp:157
Definition: ScheduleEnums.hpp:208
Definition: ScheduleEnums.hpp:78
Definition: ScheduleEnums.hpp:58
ControlEnum
Definition: ScheduleEnums.hpp:154
Definition: ScheduleEnums.hpp:158
OilVaporizationEnum
Definition: ScheduleEnums.hpp:242
Definition: ScheduleEnums.hpp:172
ActionEnum ActionEnumFromString(const std::string &stringValue)
GuideRatePhaseEnum
Definition: ScheduleEnums.hpp:202
Definition: ScheduleEnums.hpp:191
Definition: ScheduleEnums.hpp:171
PhaseEnum PhaseEnumFromString(const std::string &stringValue)
Definition: ScheduleEnums.hpp:59
Definition: ScheduleEnums.hpp:189
Definition: ScheduleEnums.hpp:207
RFTEnum
Definition: ScheduleEnums.hpp:219
Definition: ScheduleEnums.hpp:125
DirectionEnum DirectionEnumFromString(const std::string &stringValue)
TypeEnum TypeFromString(const std::string &stringValue)
Definition: ScheduleEnums.hpp:209
Definition: ScheduleEnums.hpp:205
Definition: ScheduleEnums.hpp:244
Definition: ScheduleEnums.hpp:51
Definition: ScheduleEnums.hpp:76
Definition: ScheduleEnums.hpp:203
Definition: ScheduleEnums.hpp:127
Definition: ScheduleEnums.hpp:50
const std::string ControlEnum2String(GroupProduction::ControlEnum enumValue)
Definition: ScheduleEnums.hpp:190
StatusEnum StatusFromString(const std::string &stringValue)
CompletionOrderEnum CompletionOrderEnumFromString(const std::string &comporderStringValue)
Definition: ScheduleEnums.hpp:235
Definition: ScheduleEnums.hpp:45
Definition: ScheduleEnums.hpp:233
Definition: ScheduleEnums.hpp:131
ControlModeEnum
Definition: ScheduleEnums.hpp:122
Definition: ScheduleEnums.hpp:91
PLTEnum
Definition: ScheduleEnums.hpp:232
const std::string ControlEnum2String(ControlEnum enumValue)
Definition: ScheduleEnums.hpp:159
const std::string Type2String(TypeEnum enumValue)
Definition: ScheduleEnums.hpp:160
Definition: ScheduleEnums.hpp:156
Definition: ScheduleEnums.hpp:43
Definition: ScheduleEnums.hpp:245