WconprodWrapper.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_WCONPROD_WRAPPER_HPP
20 #define OPM_PARSER_WCONPROD_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 numWells() const
43  { return m_keyword->size(); }
44 
48  std::string wellName(int wellIdx) const
49  { return m_keyword->getRecord(wellIdx)->getItem(0)->getString(0); }
50 
60  std::string wellStatus(int wellIdx) const
61  { return m_keyword->getRecord(wellIdx)->getItem(1)->getString(0); }
62 
85  std::string controlMode(int wellIdx) const
86  { return m_keyword->getRecord(wellIdx)->getItem(2)->getString(0); }
87 
91  double oilTargetRate(int wellIdx) const
92  { return m_keyword->getRecord(wellIdx)->getItem(3)->getSIDouble(0); }
93 
97  double waterTargetRate(int wellIdx) const
98  { return m_keyword->getRecord(wellIdx)->getItem(4)->getSIDouble(0); }
99 
103  double gasTargetRate(int wellIdx) const
104  { return m_keyword->getRecord(wellIdx)->getItem(5)->getSIDouble(0); }
105 
109  double liquidTargetRate(int wellIdx) const
110  { return m_keyword->getRecord(wellIdx)->getItem(6)->getSIDouble(0); }
111 
115  double reservoirTargetRate(int wellIdx) const
116  { return m_keyword->getRecord(wellIdx)->getItem(7)->getSIDouble(0); }
117 
121  double bottomHoleTargetPressure(int wellIdx) const
122  { return m_keyword->getRecord(wellIdx)->getItem(8)->getSIDouble(0); }
123 
127  double topHoleTargetPressure(int wellIdx) const
128  { return m_keyword->getRecord(wellIdx)->getItem(9)->getSIDouble(0); }
129 
133  int vfpTableIndex(int wellIdx) const
134  { return m_keyword->getRecord(wellIdx)->getItem(10)->getInt(0); }
135 
139  double artificialLiftQuantity(int wellIdx) const
140  { return m_keyword->getRecord(wellIdx)->getItem(11)->getSIDouble(0); }
141 
145  double wetGasTargetRate(int wellIdx) const
146  { return m_keyword->getRecord(wellIdx)->getItem(12)->getSIDouble(0); }
147 
151  double molarTargetRate(int wellIdx) const
152  { return m_keyword->getRecord(wellIdx)->getItem(13)->getSIDouble(0); }
153 
157  double steamTargetRate(int wellIdx) const
158  { return m_keyword->getRecord(wellIdx)->getItem(14)->getSIDouble(0); }
159 
163  double pressureOffset(int wellIdx) const
164  { return m_keyword->getRecord(wellIdx)->getItem(15)->getSIDouble(0); }
165 
169  double temperatureOffset(int wellIdx) const
170  { return m_keyword->getRecord(wellIdx)->getItem(16)->getSIDouble(0); }
171 
175  double caloricTargetRate(int wellIdx) const
176  { return m_keyword->getRecord(wellIdx)->getItem(17)->getSIDouble(0); }
177 
181  int lincomIndex(int wellIdx) const
182  { return m_keyword->getRecord(wellIdx)->getItem(18)->getInt(0); }
183 
187  double nglTargetRate(int wellIdx) const
188  { return m_keyword->getRecord(wellIdx)->getItem(19)->getSIDouble(0); }
189 
190  private:
191  Opm::DeckKeywordConstPtr m_keyword;
192  };
193 }
194 
195 #endif // OPM_PARSER_WCONPROD_WRAPPER_HPP
196 
std::string wellStatus(int wellIdx) const
Return the connection type of a well.
Definition: WconprodWrapper.hpp:60
double reservoirTargetRate(int wellIdx) const
The upper limit of the fluid volumes at the reservoir.
Definition: WconprodWrapper.hpp:115
double waterTargetRate(int wellIdx) const
The upper limit of the surface water rate.
Definition: WconprodWrapper.hpp:97
Definition: Deck.hpp:29
double bottomHoleTargetPressure(int wellIdx) const
The lower limit of the bottom hole pressure.
Definition: WconprodWrapper.hpp:121
std::shared_ptr< const DeckKeyword > DeckKeywordConstPtr
Definition: DeckKeyword.hpp:71
double steamTargetRate(int wellIdx) const
The upper limit for the rate of the produced steam.
Definition: WconprodWrapper.hpp:157
double nglTargetRate(int wellIdx) const
The upper limit of the NGL rate.
Definition: WconprodWrapper.hpp:187
double gasTargetRate(int wellIdx) const
The upper limit of the surface gas rate.
Definition: WconprodWrapper.hpp:103
double wetGasTargetRate(int wellIdx) const
The upper limit of the produced wet gas.
Definition: WconprodWrapper.hpp:145
WconprodWrapper(Opm::DeckKeywordConstPtr keyword)
A wrapper class to provide convenient access to the data of the 'WCONPROD' keyword.
Definition: WconprodWrapper.hpp:34
double caloricTargetRate(int wellIdx) const
The upper limit of the caloric rate.
Definition: WconprodWrapper.hpp:175
int lincomIndex(int wellIdx) const
The index of the linearly combined rate specified by the LINCOM keyword.
Definition: WconprodWrapper.hpp:181
int vfpTableIndex(int wellIdx) const
The index of the well's VFP table.
Definition: WconprodWrapper.hpp:133
Definition: WconprodWrapper.hpp:28
double molarTargetRate(int wellIdx) const
The upper limit of the produced molar rate.
Definition: WconprodWrapper.hpp:151
double artificialLiftQuantity(int wellIdx) const
The artificial lift quantity of the well.
Definition: WconprodWrapper.hpp:139
double liquidTargetRate(int wellIdx) const
The upper rate limit of the liquids at the surface.
Definition: WconprodWrapper.hpp:109
double temperatureOffset(int wellIdx) const
The temperature offset used for saturation temperature control.
Definition: WconprodWrapper.hpp:169
double oilTargetRate(int wellIdx) const
The upper limit of the surface oil rate.
Definition: WconprodWrapper.hpp:91
int numWells() const
Return the number of injection wells.
Definition: WconprodWrapper.hpp:42
std::string wellName(int wellIdx) const
Return the human-readable name of the well with a given index.
Definition: WconprodWrapper.hpp:48
double pressureOffset(int wellIdx) const
The pressure offset used for saturation pressure control.
Definition: WconprodWrapper.hpp:163
std::string controlMode(int wellIdx) const
Return the control mode of a well.
Definition: WconprodWrapper.hpp:85
double topHoleTargetPressure(int wellIdx) const
The lower limit of the top hole pressure.
Definition: WconprodWrapper.hpp:127