GconinjeWrapper.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_GCONINJE_WRAPPER_HPP
20 #define OPM_PARSER_GCONINJE_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 
59  std::string groupType(int wellGroupIdx) const
60  { return m_keyword->getRecord(wellGroupIdx)->getItem(1)->getString(0); }
61 
74  std::string controlMode(int wellGroupIdx) const
75  { return m_keyword->getRecord(wellGroupIdx)->getItem(2)->getString(0); }
76 
83  double rawSurfaceTargetRate(int wellGroupIdx) const
84  { return m_keyword->getRecord(wellGroupIdx)->getItem(3)->getRawDouble(0); }
85 
92  double rawReservoirTargetRate(int wellGroupIdx) const
93  { return m_keyword->getRecord(wellGroupIdx)->getItem(4)->getRawDouble(0); }
94 
98  double reinjectTargetRatio(int wellGroupIdx) const
99  { return m_keyword->getRecord(wellGroupIdx)->getItem(5)->getSIDouble(0); }
100 
104  double voidageReplacementFractionTarget(int wellGroupIdx) const
105  { return m_keyword->getRecord(wellGroupIdx)->getItem(6)->getSIDouble(0); }
106 
111  bool isUnconstraint(int wellGroupIdx) const
112  { return m_keyword->getRecord(wellGroupIdx)->getItem(7)->getString(0) == "YES"; }
113 
118  double injectionShareTarget(int wellGroupIdx) const
119  { return m_keyword->getRecord(wellGroupIdx)->getItem(8)->getSIDouble(0); }
120 
131  std::string injectionShareType(int wellGroupIdx) const
132  { return m_keyword->getRecord(wellGroupIdx)->getItem(9)->getString(0); }
133 
137  std::string reinjectGroupName(int wellGroupIdx) const
138  { return m_keyword->getRecord(wellGroupIdx)->getItem(10)->getString(0); }
139 
145  std::string voidageGroupName(int wellGroupIdx) const
146  { return m_keyword->getRecord(wellGroupIdx)->getItem(11)->getString(0); }
147 
151  double wetGasTargetRate(int wellGroupIdx) const
152  { return m_keyword->getRecord(wellGroupIdx)->getItem(12)->getSIDouble(0); }
153 
154  private:
155  Opm::DeckKeywordConstPtr m_keyword;
156  };
157 }
158 
159 #endif // OPM_PARSER_GCONINJE_WRAPPER_HPP
160 
double voidageReplacementFractionTarget(int wellGroupIdx) const
The target fraction of the voidage replacement fraction.
Definition: GconinjeWrapper.hpp:104
double rawSurfaceTargetRate(int wellGroupIdx) const
Return the target for the volumetric surface rate of a well group.
Definition: GconinjeWrapper.hpp:83
int numGroups() const
Return the number of injection well groups.
Definition: GconinjeWrapper.hpp:42
std::string reinjectGroupName(int wellGroupIdx) const
The name of the production group which should be partially reinjected.
Definition: GconinjeWrapper.hpp:137
std::string groupName(int wellGroupIdx) const
Return the human-readable name of the well group with a given index.
Definition: GconinjeWrapper.hpp:48
std::string groupType(int wellGroupIdx) const
Return the injector type of a well group.
Definition: GconinjeWrapper.hpp:59
Definition: Deck.hpp:29
std::shared_ptr< const DeckKeyword > DeckKeywordConstPtr
Definition: DeckKeyword.hpp:71
Definition: GconinjeWrapper.hpp:28
GconinjeWrapper(Opm::DeckKeywordConstPtr keyword)
A wrapper class to provide convenient access to the data of the 'GCONINJE' keyword.
Definition: GconinjeWrapper.hpp:34
double wetGasTargetRate(int wellGroupIdx) const
The target rate for wet gas injection.
Definition: GconinjeWrapper.hpp:151
double rawReservoirTargetRate(int wellGroupIdx) const
Return the target for the volumetric reservoir rate of a well group.
Definition: GconinjeWrapper.hpp:92
std::string injectionShareType(int wellGroupIdx) const
The kind of control which the next higher-level group wants.
Definition: GconinjeWrapper.hpp:131
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: GconinjeWrapper.hpp:111
double injectionShareTarget(int wellGroupIdx) const
The target for the group's share of the next higher-level group's total injection rate...
Definition: GconinjeWrapper.hpp:118
std::string voidageGroupName(int wellGroupIdx) const
The name of the group to which the voidage replacement volume fraction applies and which's production...
Definition: GconinjeWrapper.hpp:145
double reinjectTargetRatio(int wellGroupIdx) const
The target fraction for reinjection.
Definition: GconinjeWrapper.hpp:98
std::string controlMode(int wellGroupIdx) const
Return the what should be controlled for a given well.
Definition: GconinjeWrapper.hpp:74