CompdatWrapper.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_COMPDAT_WRAPPER_HPP
20 #define OPM_PARSER_COMPDAT_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 
54  int coordinateI(int wellIdx) const
55  { return m_keyword->getRecord(wellIdx)->getItem(1)->getInt(0); }
56 
60  int coordinateJ(int wellIdx) const
61  { return m_keyword->getRecord(wellIdx)->getItem(2)->getInt(0); }
62 
66  int coordinateKUpper(int wellIdx) const
67  { return m_keyword->getRecord(wellIdx)->getItem(3)->getInt(0); }
68 
72  int coordinateKLower(int wellIdx) const
73  { return m_keyword->getRecord(wellIdx)->getItem(4)->getInt(0); }
74 
84  std::string wellStatus(int wellIdx) const
85  { return m_keyword->getRecord(wellIdx)->getItem(5)->getString(0); }
86 
91  int saturationTableIndex(int wellIdx) const
92  { return m_keyword->getRecord(wellIdx)->getItem(6)->getInt(0); }
93 
97  double transmissibilityFactor(int wellIdx) const
98  { return m_keyword->getRecord(wellIdx)->getItem(7)->getSIDouble(0); }
99 
103  double wellDiameter(int wellIdx) const
104  { return m_keyword->getRecord(wellIdx)->getItem(8)->getSIDouble(0); }
105 
109  double intrinsicPermeability(int wellIdx) const
110  { return m_keyword->getRecord(wellIdx)->getItem(9)->getSIDouble(0); }
111 
115  double skinFactor(int wellIdx) const
116  { return m_keyword->getRecord(wellIdx)->getItem(10)->getSIDouble(0); }
117 
121  double dFactor(int wellIdx) const
122  { return m_keyword->getRecord(wellIdx)->getItem(11)->getSIDouble(0); }
123 
134  std::string penetrationDirection(int wellIdx) const
135  { return m_keyword->getRecord(wellIdx)->getItem(12)->getString(0); }
136 
137  private:
138  Opm::DeckKeywordConstPtr m_keyword;
139  };
140 }
141 
142 #endif // OPM_PARSER_COMPDAT_WRAPPER_HPP
143 
double wellDiameter(int wellIdx) const
Return the diameter of the well.
Definition: CompdatWrapper.hpp:103
int saturationTableIndex(int wellIdx) const
Return the index of the saturation table to calculate the relative permebilities of the connection...
Definition: CompdatWrapper.hpp:91
std::string penetrationDirection(int wellIdx) const
Return the direction into which the cells are penetrated by the well.
Definition: CompdatWrapper.hpp:134
Definition: Deck.hpp:29
std::shared_ptr< const DeckKeyword > DeckKeywordConstPtr
Definition: DeckKeyword.hpp:71
double intrinsicPermeability(int wellIdx) const
Return the effective intrinisic permeability to be used for the well.
Definition: CompdatWrapper.hpp:109
int coordinateKLower(int wellIdx) const
Return the lower K-coordinate of the well.
Definition: CompdatWrapper.hpp:72
std::string wellStatus(int wellIdx) const
Return whether a well is open or closed.
Definition: CompdatWrapper.hpp:84
int coordinateKUpper(int wellIdx) const
Return the upper K-coordinate of the well.
Definition: CompdatWrapper.hpp:66
Definition: CompdatWrapper.hpp:28
int numWells() const
Return the number of injection wells.
Definition: CompdatWrapper.hpp:42
int coordinateI(int wellIdx) const
Return the I-coordinate of the well.
Definition: CompdatWrapper.hpp:54
double dFactor(int wellIdx) const
Return the "D-factor" (for non-Darcy flow regimes) to be used for the well.
Definition: CompdatWrapper.hpp:121
double skinFactor(int wellIdx) const
Return the skin factor to be used for the well.
Definition: CompdatWrapper.hpp:115
std::string wellName(int wellIdx) const
Return the human-readable name of the well with a given index.
Definition: CompdatWrapper.hpp:48
double transmissibilityFactor(int wellIdx) const
Return the transmissibility factor to be used for the connection.
Definition: CompdatWrapper.hpp:97
int coordinateJ(int wellIdx) const
Return the J-coordinate of the well.
Definition: CompdatWrapper.hpp:60
CompdatWrapper(Opm::DeckKeywordConstPtr keyword)
A wrapper class to provide convenient access to the data of the 'COMPDAT' keyword.
Definition: CompdatWrapper.hpp:34