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
24#include <functional>
25#include <map>
26#include <vector>
27
28
29namespace Opm {
30
31class VFPInjTable;
32
34public:
35 VFPInjProperties() = default;
39 void addTable(const VFPInjTable& new_table);
40
57 template <class EvalWell>
58 EvalWell bhp(const int table_id,
59 const EvalWell& aqua,
60 const EvalWell& liquid,
61 const EvalWell& vapour,
62 const double& thp) const;
63
68 const VFPInjTable& getTable(const int table_id) const;
69
73 bool hasTable(const int table_id) const;
74
78 bool empty() const {
79 return m_tables.empty();
80 }
81
93 double bhp(int table_id,
94 const double& aqua,
95 const double& liquid,
96 const double& vapour,
97 const double& thp) const;
98
110 double thp(int table_id,
111 const double& aqua,
112 const double& liquid,
113 const double& vapour,
114 const double& bhp) const;
115
116protected:
117 // Map which connects the table number with the table itself
118 std::map<int, std::reference_wrapper<const VFPInjTable>> m_tables;
119};
120
121
122
123} //namespace
124
125
126
127#endif /* OPM_AUTODIFF_VFPINJPROPERTIES_HPP_ */
Definition: VFPInjProperties.hpp:33
VFPInjProperties()=default
const VFPInjTable & getTable(const int table_id) const
double bhp(int table_id, const double &aqua, const double &liquid, const double &vapour, const double &thp) const
EvalWell bhp(const int table_id, const EvalWell &aqua, const EvalWell &liquid, const EvalWell &vapour, const double &thp) const
bool hasTable(const int table_id) const
std::map< int, std::reference_wrapper< const VFPInjTable > > m_tables
Definition: VFPInjProperties.hpp:118
bool empty() const
Definition: VFPInjProperties.hpp:78
void addTable(const VFPInjTable &new_table)
double thp(int table_id, const double &aqua, const double &liquid, const double &vapour, const double &bhp) const
Definition: BlackoilPhases.hpp:27