GconprodWrapper.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 by Andreas Lauser
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 #ifndef OPM_PARSER_GCONPROD_WRAPPER_HPP
20 #define OPM_PARSER_GCONPROD_WRAPPER_HPP
21 
23 
24 #include <vector>
25 #include <algorithm>
26 
27 namespace Opm {
29  public:
35  : m_keyword(keyword)
36  {
37  }
38 
42  int numGroups() const
43  { return m_keyword->size(); }
44 
48  std::string groupName(int wellGroupIdx) const
49  { return m_keyword->getRecord(wellGroupIdx)->getItem(0)->getString(0); }
50 
69  std::string controlMode(int wellGroupIdx) const
70  { return m_keyword->getRecord(wellGroupIdx)->getItem(1)->getString(0); }
71 
78  double surfaceOilTargetRate(int wellGroupIdx) const
79  { return m_keyword->getRecord(wellGroupIdx)->getItem(2)->getSIDouble(0); }
80 
87  double surfaceWaterTargetRate(int wellGroupIdx) const
88  { return m_keyword->getRecord(wellGroupIdx)->getItem(3)->getSIDouble(0); }
89 
96  double surfaceGasTargetRate(int wellGroupIdx) const
97  { return m_keyword->getRecord(wellGroupIdx)->getItem(4)->getSIDouble(0); }
98 
105  double surfaceLiquidTargetRate(int wellGroupIdx) const
106  { return m_keyword->getRecord(wellGroupIdx)->getItem(5)->getSIDouble(0); }
107 
119  std::string oilExceedanceReaction(int wellGroupIdx) const
120  { return m_keyword->getRecord(wellGroupIdx)->getItem(6)->getString(0); }
121 
126  bool isUnconstraint(int wellGroupIdx) const
127  { return m_keyword->getRecord(wellGroupIdx)->getItem(7)->getString(0) == "YES"; }
128 
133  double productionShareTarget(int wellGroupIdx) const
134  { return m_keyword->getRecord(wellGroupIdx)->getItem(8)->getSIDouble(0); }
135 
153  std::string productionShareType(int wellGroupIdx) const
154  { return m_keyword->getRecord(wellGroupIdx)->getItem(9)->getString(0); }
155 
159  std::string waterExceedanceReaction(int wellGroupIdx) const
160  { return m_keyword->getRecord(wellGroupIdx)->getItem(10)->getString(0); }
161 
165  std::string gasExceedanceReaction(int wellGroupIdx) const
166  { return m_keyword->getRecord(wellGroupIdx)->getItem(11)->getString(0); }
167 
171  std::string liquidExceedanceReaction(int wellGroupIdx) const
172  { return m_keyword->getRecord(wellGroupIdx)->getItem(12)->getString(0); }
173 
177  double reservoirTargetRate(int wellGroupIdx) const
178  { return m_keyword->getRecord(wellGroupIdx)->getItem(13)->getSIDouble(0); }
179 
183  double reservoirBalanceTarget(int wellGroupIdx) const
184  { return m_keyword->getRecord(wellGroupIdx)->getItem(14)->getSIDouble(0); }
185 
189  double wetGasTargetRate(int wellGroupIdx) const
190  { return m_keyword->getRecord(wellGroupIdx)->getItem(15)->getSIDouble(0); }
191 
195  double caloricTargetRate(int wellGroupIdx) const
196  { return m_keyword->getRecord(wellGroupIdx)->getItem(16)->getSIDouble(0); }
197 
201  double surfaceGasBalanceTarget(int wellGroupIdx) const
202  { return m_keyword->getRecord(wellGroupIdx)->getItem(17)->getSIDouble(0); }
203 
207  double surfaceWaterBalanceTarget(int wellGroupIdx) const
208  { return m_keyword->getRecord(wellGroupIdx)->getItem(18)->getSIDouble(0); }
209 
213  int lcomIndex(int wellGroupIdx) const
214  { return m_keyword->getRecord(wellGroupIdx)->getItem(19)->getInt(0); }
215 
219  std::string lcomExceedanceReaction(int wellGroupIdx) const
220  { return m_keyword->getRecord(wellGroupIdx)->getItem(20)->getString(0); }
221 
222  private:
223  Opm::DeckKeywordConstPtr m_keyword;
224  };
225 }
226 
227 #endif // OPM_PARSER_GCONINJE_WRAPPER_HPP
228 
double reservoirTargetRate(int wellGroupIdx) const
Return target rate of all fluids at reservoir conditions.
Definition: GconprodWrapper.hpp:177
double surfaceWaterBalanceTarget(int wellGroupIdx) const
Return balancing fraction of water at surface conditions.
Definition: GconprodWrapper.hpp:207
Definition: Deck.hpp:29
int numGroups() const
Return the number of prodction well groups.
Definition: GconprodWrapper.hpp:42
std::shared_ptr< const DeckKeyword > DeckKeywordConstPtr
Definition: DeckKeyword.hpp:71
double surfaceWaterTargetRate(int wellGroupIdx) const
Return the target for the volumetric surface water rate of a well group.
Definition: GconprodWrapper.hpp:87
double surfaceGasBalanceTarget(int wellGroupIdx) const
Return balancing fraction of gas at surface conditions.
Definition: GconprodWrapper.hpp:201
double reservoirBalanceTarget(int wellGroupIdx) const
Return balancing fraction of fluids produced at reservoir conditions.
Definition: GconprodWrapper.hpp:183
std::string lcomExceedanceReaction(int wellGroupIdx) const
Return the procedure which is taken if the linearly combined rate is exceeded.
Definition: GconprodWrapper.hpp:219
std::string gasExceedanceReaction(int wellGroupIdx) const
Return the procedure which is taken if the gas target rate is exceeded.
Definition: GconprodWrapper.hpp:165
std::string waterExceedanceReaction(int wellGroupIdx) const
Return the procedure which is taken if the water target rate is exceeded.
Definition: GconprodWrapper.hpp:159
std::string liquidExceedanceReaction(int wellGroupIdx) const
Return the procedure which is taken if the liquid target rate is exceeded.
Definition: GconprodWrapper.hpp:171
double caloricTargetRate(int wellGroupIdx) const
Return caloric target rate.
Definition: GconprodWrapper.hpp:195
double surfaceOilTargetRate(int wellGroupIdx) const
Return the target for the volumetric surface oil rate of a well group.
Definition: GconprodWrapper.hpp:78
double surfaceGasTargetRate(int wellGroupIdx) const
Return the target for the volumetric surface gas rate of a well group.
Definition: GconprodWrapper.hpp:96
double wetGasTargetRate(int wellGroupIdx) const
Return target rate for wet-gas.
Definition: GconprodWrapper.hpp:189
Definition: GconprodWrapper.hpp:28
double surfaceLiquidTargetRate(int wellGroupIdx) const
Return the target for the volumetric surface liquid rate of a well group.
Definition: GconprodWrapper.hpp:105
double productionShareTarget(int wellGroupIdx) const
The target for the group's share of the next higher-level group's total production rate...
Definition: GconprodWrapper.hpp:133
bool isUnconstraint(int wellGroupIdx) const
Returns whether a group is unconstraint so that it be used to hit the target of a higher-level group...
Definition: GconprodWrapper.hpp:126
GconprodWrapper(Opm::DeckKeywordConstPtr keyword)
A wrapper class to provide convenient access to the data of the 'GCONPROD' keyword.
Definition: GconprodWrapper.hpp:34
std::string productionShareType(int wellGroupIdx) const
The kind of control which the next higher-level group wants.
Definition: GconprodWrapper.hpp:153
std::string groupName(int wellGroupIdx) const
Return the human-readable name of the well group with a given index.
Definition: GconprodWrapper.hpp:48
int lcomIndex(int wellGroupIdx) const
Return index of the linearly combined rate specified using the LCOM keyword.
Definition: GconprodWrapper.hpp:213
std::string oilExceedanceReaction(int wellGroupIdx) const
Return the procedure which is taken if the target rates are exceeded.
Definition: GconprodWrapper.hpp:119
std::string controlMode(int wellGroupIdx) const
Return the what should be controlled for a given well.
Definition: GconprodWrapper.hpp:69