EquilWrapper.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_EQUIL_WRAPPER_HPP
20 #define OPM_PARSER_EQUIL_WRAPPER_HPP
21 
23 
24 #include <vector>
25 #include <algorithm>
26 
27 namespace Opm {
28  class EquilWrapper {
29  public:
35  : m_keyword(keyword)
36  {
37  }
38 
42  int numRegions() const
43  { return m_keyword->size(); }
44 
48  double datumDepth(int regionIdx) const
49  { return m_keyword->getRecord(regionIdx)->getItem(0)->getSIDouble(0); }
50 
54  double datumDepthPressure(int regionIdx) const
55  { return m_keyword->getRecord(regionIdx)->getItem(1)->getSIDouble(0); }
56 
60  double waterOilContactDepth(int regionIdx) const
61  { return m_keyword->getRecord(regionIdx)->getItem(2)->getSIDouble(0); }
62 
66  double waterOilContactCapillaryPressure(int regionIdx) const
67  { return m_keyword->getRecord(regionIdx)->getItem(3)->getSIDouble(0); }
68 
72  double gasOilContactDepth(int regionIdx) const
73  { return m_keyword->getRecord(regionIdx)->getItem(4)->getSIDouble(0); }
74 
78  double gasOilContactCapillaryPressure(int regionIdx) const
79  { return m_keyword->getRecord(regionIdx)->getItem(5)->getSIDouble(0); }
80 
86  int liveOilInitProceedure(int regionIdx) const
87  { return m_keyword->getRecord(regionIdx)->getItem(6)->getInt(0); }
88 
92  int wetGasInitProceedure(int regionIdx) const
93  { return m_keyword->getRecord(regionIdx)->getItem(7)->getInt(0); }
94 
98  int initializationTargetAccuracy(int regionIdx) const
99  { return m_keyword->getRecord(regionIdx)->getItem(8)->getInt(0); }
100 
106  int compositionalInitializationProceedure(int regionIdx) const
107  { return m_keyword->getRecord(regionIdx)->getItem(9)->getInt(0); }
108 
116  bool useSaturationPressure(int regionIdx) const
117  { return m_keyword->getRecord(regionIdx)->getItem(10)->getInt(0) == 0; }
118 
119  private:
120  Opm::DeckKeywordConstPtr m_keyword;
121  };
122 }
123 
124 #endif // OPM_PARSER_EQUIL_WRAPPER_HPP
125 
bool useSaturationPressure(int regionIdx) const
Use the saturation pressure at the of the gas for the gas-oil contact.
Definition: EquilWrapper.hpp:116
Definition: Deck.hpp:29
std::shared_ptr< const DeckKeyword > DeckKeywordConstPtr
Definition: DeckKeyword.hpp:71
double gasOilContactCapillaryPressure(int regionIdx) const
The capillary pressure at the gas-oil contact.
Definition: EquilWrapper.hpp:78
double datumDepth(int regionIdx) const
The reference depth.
Definition: EquilWrapper.hpp:48
double waterOilContactCapillaryPressure(int regionIdx) const
The capillary pressure at the water-oil contact.
Definition: EquilWrapper.hpp:66
int initializationTargetAccuracy(int regionIdx) const
Integer number specifying the desired accuracy of the initialization.
Definition: EquilWrapper.hpp:98
int liveOilInitProceedure(int regionIdx) const
Integer number specifying the initialization proceedure for live oil.
Definition: EquilWrapper.hpp:86
int numRegions() const
Return the number of regions used for initialization.
Definition: EquilWrapper.hpp:42
Definition: EquilWrapper.hpp:28
int wetGasInitProceedure(int regionIdx) const
Integer number specifying the initialization proceedure for wet gas.
Definition: EquilWrapper.hpp:92
double datumDepthPressure(int regionIdx) const
The pressure at reference depth.
Definition: EquilWrapper.hpp:54
int compositionalInitializationProceedure(int regionIdx) const
Integer number specifying the type of the initialization.
Definition: EquilWrapper.hpp:106
double waterOilContactDepth(int regionIdx) const
The depth of the water-oil contact.
Definition: EquilWrapper.hpp:60
EquilWrapper(Opm::DeckKeywordConstPtr keyword)
A wrapper class to provide convenient access to the data of the 'EQUIL' keyword.
Definition: EquilWrapper.hpp:34
double gasOilContactDepth(int regionIdx) const
The depth of the gas-oil contact.
Definition: EquilWrapper.hpp:72