VFPProdProperties.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2015 SINTEF ICT, Applied Mathematics.
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 
20 #ifndef OPM_AUTODIFF_VFPPRODPROPERTIES_HPP_
21 #define OPM_AUTODIFF_VFPPRODPROPERTIES_HPP_
22 
23 #include <opm/parser/eclipse/EclipseState/Tables/VFPProdTable.hpp>
24 #include <opm/core/wells.h>
26 
27 #include <vector>
28 #include <map>
29 
30 
31 namespace Opm {
32 
33 
40 public:
42 
47 
53  explicit VFPProdProperties(const VFPProdTable* prod_table);
54 
60  explicit VFPProdProperties(const std::map<int, VFPProdTable>& prod_tables);
61 
73  ADB bhp(const std::vector<int>& table_id,
74  const Wells& wells,
75  const ADB& qs,
76  const ADB& thp,
77  const ADB& alq) const;
78 
95  ADB bhp(const std::vector<int>& table_id,
96  const ADB& aqua,
97  const ADB& liquid,
98  const ADB& vapour,
99  const ADB& thp,
100  const ADB& alq) const;
101 
114  double bhp(int table_id,
115  const double& aqua,
116  const double& liquid,
117  const double& vapour,
118  const double& thp,
119  const double& alq) const;
120 
133  double thp(int table_id,
134  const double& aqua,
135  const double& liquid,
136  const double& vapour,
137  const double& bhp,
138  const double& alq) const;
139 
144  const VFPProdTable* getTable(const int table_id) const;
145 
149  bool empty() const {
150  return m_tables.empty();
151  }
152 
153 private:
154  // Map which connects the table number with the table itself
155  std::map<int, const VFPProdTable*> m_tables;
156 };
157 
158 
159 
160 
161 } //namespace
162 
163 
164 #endif /* OPM_AUTODIFF_VFPPRODPROPERTIES_HPP_ */
Definition: AdditionalObjectDeleter.hpp:22
double thp(int table_id, const double &aqua, const double &liquid, const double &vapour, const double &bhp, const double &alq) const
Definition: VFPProdProperties.hpp:39
const VFPProdTable * getTable(const int table_id) const
bool empty() const
Definition: VFPProdProperties.hpp:149
ADB bhp(const std::vector< int > &table_id, const Wells &wells, const ADB &qs, const ADB &thp, const ADB &alq) const
AutoDiffBlock< double > ADB
Definition: VFPProdProperties.hpp:41