VFPInjProperties.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_VFPINJPROPERTIES_HPP_
21 #define OPM_AUTODIFF_VFPINJPROPERTIES_HPP_
22 
23 #include <opm/parser/eclipse/EclipseState/Tables/VFPInjTable.hpp>
24 #include <opm/core/wells.h>
26 
27 #include <vector>
28 #include <map>
29 
30 
31 
32 namespace Opm {
33 
34 
36 public:
38 
43 
49  explicit VFPInjProperties(const VFPInjTable* inj_table);
50 
56  explicit VFPInjProperties(const std::map<int, VFPInjTable>& inj_tables);
57 
68  ADB bhp(const std::vector<int>& table_id,
69  const Wells& wells,
70  const ADB& qs,
71  const ADB& thp) const;
72 
88  ADB bhp(const std::vector<int>& table_id,
89  const ADB& aqua,
90  const ADB& liquid,
91  const ADB& vapour,
92  const ADB& thp) const;
93 
105  double bhp(int table_id,
106  const double& aqua,
107  const double& liquid,
108  const double& vapour,
109  const double& thp) const;
110 
111 
123  double thp(int table_id,
124  const double& aqua,
125  const double& liquid,
126  const double& vapour,
127  const double& bhp) const;
128 
133  const VFPInjTable* getTable(const int table_id) const;
134 
138  bool empty() const {
139  return m_tables.empty();
140  }
141 
142 private:
143  // Map which connects the table number with the table itself
144  std::map<int, const VFPInjTable*> m_tables;
145 };
146 
147 
148 
149 } //namespace
150 
151 
152 
153 #endif /* OPM_AUTODIFF_VFPINJPROPERTIES_HPP_ */
Definition: AdditionalObjectDeleter.hpp:22
const VFPInjTable * getTable(const int table_id) const
Definition: VFPInjProperties.hpp:35
bool empty() const
Definition: VFPInjProperties.hpp:138
AutoDiffBlock< double > ADB
Definition: VFPInjProperties.hpp:37
ADB bhp(const std::vector< int > &table_id, const Wells &wells, const ADB &qs, const ADB &thp) const
double thp(int table_id, const double &aqua, const double &liquid, const double &vapour, const double &bhp) const