WconinjWrapper.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_WCONINJ_WRAPPER_HPP
20 #define OPM_PARSER_WCONINJ_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 
59  std::string wellType(int wellIdx) const
60  { return m_keyword->getRecord(wellIdx)->getItem(1)->getString(0); }
61 
74  std::string wellStatus(int wellIdx) const
75  { return m_keyword->getRecord(wellIdx)->getItem(2)->getString(0); }
76 
86  std::string controlMode(int wellIdx) const
87  { return m_keyword->getRecord(wellIdx)->getItem(3)->getString(0); }
88 
95  double surfaceTargetRate(int wellIdx) const
96  { return m_keyword->getRecord(wellIdx)->getItem(4)->getSIDouble(0); }
97 
104  double reservoirTargetRate(int wellIdx) const
105  { return m_keyword->getRecord(wellIdx)->getItem(5)->getSIDouble(0); }
106 
110  double reinjectionReplacementRatio(int wellIdx) const
111  { return m_keyword->getRecord(wellIdx)->getItem(6)->getSIDouble(0); }
112 
121  std::string reinjectionReplacementType(int wellIdx) const
122  { return m_keyword->getRecord(wellIdx)->getItem(7)->getString(0); }
123 
130  double bottomHoleTargetPressure(int wellIdx) const
131  { return m_keyword->getRecord(wellIdx)->getItem(9)->getSIDouble(0); }
132 
139  double topHoleTargetPressure(int wellIdx) const
140  { return m_keyword->getRecord(wellIdx)->getItem(10)->getSIDouble(0); }
141 
145  int vfpTableIndex(int wellIdx) const
146  { return m_keyword->getRecord(wellIdx)->getItem(11)->getInt(0); }
147 
151  double vaporizedOilConcentration(int wellIdx) const
152  { return m_keyword->getRecord(wellIdx)->getItem(12)->getSIDouble(0); }
153 
154  private:
155  Opm::DeckKeywordConstPtr m_keyword;
156  };
157 }
158 
159 #endif // OPM_PARSER_WCONINJ_WRAPPER_HPP
160 
double reservoirTargetRate(int wellIdx) const
Return the target for the volumetric reservoir rate of a well.
Definition: WconinjWrapper.hpp:104
double reinjectionReplacementRatio(int wellIdx) const
Return the reinjection replacement percentage of well.
Definition: WconinjWrapper.hpp:110
Definition: Deck.hpp:29
double vaporizedOilConcentration(int wellIdx) const
The vaporized oil concentration in the injected gas (if the well injects gas)
Definition: WconinjWrapper.hpp:151
std::string wellStatus(int wellIdx) const
Return whether a well is open or closed.
Definition: WconinjWrapper.hpp:74
std::shared_ptr< const DeckKeyword > DeckKeywordConstPtr
Definition: DeckKeyword.hpp:71
Definition: WconinjWrapper.hpp:28
WconinjWrapper(Opm::DeckKeywordConstPtr keyword)
A wrapper class to provide convenient access to the data of the 'WCONINJ' keyword.
Definition: WconinjWrapper.hpp:34
int vfpTableIndex(int wellIdx) const
The index of the PVT table used for the injected fluid.
Definition: WconinjWrapper.hpp:145
double topHoleTargetPressure(int wellIdx) const
The target of the top hole pressure.
Definition: WconinjWrapper.hpp:139
std::string reinjectionReplacementType(int wellIdx) const
Return how reinjection should be handled.
Definition: WconinjWrapper.hpp:121
int numWells() const
Return the number of injection wells.
Definition: WconinjWrapper.hpp:42
double surfaceTargetRate(int wellIdx) const
Return the target for the volumetric surface rate of a well.
Definition: WconinjWrapper.hpp:95
std::string wellName(int wellIdx) const
Return the human-readable name of the well with a given index.
Definition: WconinjWrapper.hpp:48
double bottomHoleTargetPressure(int wellIdx) const
The target of the bottom hole pressure.
Definition: WconinjWrapper.hpp:130
std::string controlMode(int wellIdx) const
Return the what should be controlled for a given well.
Definition: WconinjWrapper.hpp:86
std::string wellType(int wellIdx) const
Return the injector type of a well.
Definition: WconinjWrapper.hpp:59