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
33template<class Scalar>
35public:
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 Scalar 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 {
80 return m_tables.empty();
81 }
82
94 Scalar bhp(const int table_id,
95 const Scalar aqua,
96 const Scalar liquid,
97 const Scalar vapour,
98 const Scalar thp) const;
99
111 Scalar thp(const int table_id,
112 const Scalar aqua,
113 const Scalar liquid,
114 const Scalar vapour,
115 const Scalar bhp) const;
116
117protected:
118 // Map which connects the table number with the table itself
119 std::map<int, std::reference_wrapper<const VFPInjTable>> m_tables;
120};
121
122} //namespace
123
124
125
126#endif /* OPM_AUTODIFF_VFPINJPROPERTIES_HPP_ */
Definition: VFPInjProperties.hpp:34
const VFPInjTable & getTable(const int table_id) const
bool hasTable(const int table_id) const
void addTable(const VFPInjTable &new_table)
Scalar bhp(const int table_id, const Scalar aqua, const Scalar liquid, const Scalar vapour, const Scalar thp) const
std::map< int, std::reference_wrapper< const VFPInjTable > > m_tables
Definition: VFPInjProperties.hpp:119
EvalWell bhp(const int table_id, const EvalWell &aqua, const EvalWell &liquid, const EvalWell &vapour, const Scalar thp) const
Scalar thp(const int table_id, const Scalar aqua, const Scalar liquid, const Scalar vapour, const Scalar bhp) const
bool empty() const
Definition: VFPInjProperties.hpp:78
Definition: blackoilboundaryratevector.hh:37