WconinjeWrapper.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_WCONINJE_WRAPPER_HPP
20 #define OPM_PARSER_WCONINJE_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 
61  std::string wellType(int wellIdx) const
62  { return m_keyword->getRecord(wellIdx)->getItem(1)->getString(0); }
63 
76  std::string wellStatus(int wellIdx) const
77  { return m_keyword->getRecord(wellIdx)->getItem(2)->getString(0); }
78 
89  std::string controlMode(int wellIdx) const
90  { return m_keyword->getRecord(wellIdx)->getItem(3)->getString(0); }
91 
98  double rawSurfaceTargetRate(int wellIdx) const
99  { return m_keyword->getRecord(wellIdx)->getItem(4)->getRawDouble(0); }
100 
107  double rawReservoirTargetRate(int wellIdx) const
108  { return m_keyword->getRecord(wellIdx)->getItem(5)->getRawDouble(0); }
109 
116  double bottomHoleTargetPressure(int wellIdx) const
117  { return m_keyword->getRecord(wellIdx)->getItem(6)->getSIDouble(0); }
118 
125  double topHoleTargetPressure(int wellIdx) const
126  { return m_keyword->getRecord(wellIdx)->getItem(7)->getSIDouble(0); }
127 
131  int vfpTableIndex(int wellIdx) const
132  { return m_keyword->getRecord(wellIdx)->getItem(8)->getInt(0); }
133 
137  double vaporizedOilConcentration(int wellIdx) const
138  { return m_keyword->getRecord(wellIdx)->getItem(9)->getSIDouble(0); }
139 
143  double gasSteamRatio(int wellIdx) const
144  { return m_keyword->getRecord(wellIdx)->getItem(10)->getSIDouble(0); }
145 
149  double surfaceOilRatio(int wellIdx) const
150  { return m_keyword->getRecord(wellIdx)->getItem(11)->getSIDouble(0); }
151 
155  double surfaceWaterRatio(int wellIdx) const
156  { return m_keyword->getRecord(wellIdx)->getItem(12)->getSIDouble(0); }
157 
161  double surfaceGasRatio(int wellIdx) const
162  { return m_keyword->getRecord(wellIdx)->getItem(13)->getSIDouble(0); }
163 
164  private:
165  Opm::DeckKeywordConstPtr m_keyword;
166  };
167 }
168 
169 #endif // OPM_PARSER_WCONINJE_WRAPPER_HPP
170 
int numWells() const
Return the number of injection wells.
Definition: WconinjeWrapper.hpp:42
int vfpTableIndex(int wellIdx) const
The index of the PVT table used for the injected fluid.
Definition: WconinjeWrapper.hpp:131
double topHoleTargetPressure(int wellIdx) const
The target of the top hole pressure.
Definition: WconinjeWrapper.hpp:125
double surfaceGasRatio(int wellIdx) const
The proportion water oil at the surface for multi-phase injector wells.
Definition: WconinjeWrapper.hpp:161
Definition: Deck.hpp:29
double surfaceOilRatio(int wellIdx) const
The proportion of oil at the surface for multi-phase injector wells.
Definition: WconinjeWrapper.hpp:149
Definition: WconinjeWrapper.hpp:28
std::shared_ptr< const DeckKeyword > DeckKeywordConstPtr
Definition: DeckKeyword.hpp:71
double gasSteamRatio(int wellIdx) const
The gas to steam ratio (at reservoir conditions?) for GAS-STEAM injectors.
Definition: WconinjeWrapper.hpp:143
std::string controlMode(int wellIdx) const
Return the what should be controlled for a given well.
Definition: WconinjeWrapper.hpp:89
std::string wellType(int wellIdx) const
Return the injector type of a well.
Definition: WconinjeWrapper.hpp:61
double bottomHoleTargetPressure(int wellIdx) const
The target of the bottom hole pressure.
Definition: WconinjeWrapper.hpp:116
double rawSurfaceTargetRate(int wellIdx) const
Return the target for the volumetric surface rate of a well.
Definition: WconinjeWrapper.hpp:98
double surfaceWaterRatio(int wellIdx) const
The proportion water oil at the surface for multi-phase injector wells.
Definition: WconinjeWrapper.hpp:155
double rawReservoirTargetRate(int wellIdx) const
Return the target for the volumetric reservoir rate of a well.
Definition: WconinjeWrapper.hpp:107
std::string wellStatus(int wellIdx) const
Return whether a well is open or closed.
Definition: WconinjeWrapper.hpp:76
double vaporizedOilConcentration(int wellIdx) const
The vaporized oil concentration in the injected gas (if the well injects gas)
Definition: WconinjeWrapper.hpp:137
WconinjeWrapper(Opm::DeckKeywordConstPtr keyword)
A wrapper class to provide convenient access to the data of the 'WCONINJE' keyword.
Definition: WconinjeWrapper.hpp:34
std::string wellName(int wellIdx) const
Return the human-readable name of the well with a given index.
Definition: WconinjeWrapper.hpp:48