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 <functional>
24#include <map>
25#include <vector>
26
27
28namespace Opm {
29
30class VFPProdTable;
31
38public:
39 VFPProdProperties() = default;
43 void addTable(const VFPProdTable& new_table);
44
62 template <class EvalWell>
63 EvalWell bhp(const int table_id,
64 const EvalWell& aqua,
65 const EvalWell& liquid,
66 const EvalWell& vapour,
67 const double& thp,
68 const double& alq,
69 const double& explicit_wfr,
70 const double& explicit_gfr,
71 const bool use_expvfp) const;
72
85 double bhp(int table_id,
86 const double& aqua,
87 const double& liquid,
88 const double& vapour,
89 const double& thp,
90 const double& alq,
91 const double& explicit_wfr,
92 const double& explicit_gfr,
93 const bool use_expvfp) const;
94
107 double thp(int table_id,
108 const double& aqua,
109 const double& liquid,
110 const double& vapour,
111 const double& bhp,
112 const double& alq) const;
113
118 const VFPProdTable& getTable(const int table_id) const;
119
123 bool hasTable(const int table_id) const;
124
128 bool empty() const {
129 return m_tables.empty();
130 }
131
135 double minimumBHP(const int table_id, const double thp,
136 const double wfr, const double gfr, const double alq) const;
137protected:
138 // calculate a group bhp values with a group of flo rate values
139 std::vector<double> bhpwithflo(const std::vector<double>& flos,
140 const int table_id,
141 const double wfr,
142 const double gfr,
143 const double thp,
144 const double alq,
145 const double dp) const;
146
147 // Map which connects the table number with the table itself
148 std::map<int, std::reference_wrapper<const VFPProdTable>> m_tables;
149};
150
151
152
153
154} //namespace
155
156
157#endif /* OPM_AUTODIFF_VFPPRODPROPERTIES_HPP_ */
Definition: VFPProdProperties.hpp:37
const VFPProdTable & getTable(const int table_id) const
std::map< int, std::reference_wrapper< const VFPProdTable > > m_tables
Definition: VFPProdProperties.hpp:148
double bhp(int table_id, const double &aqua, const double &liquid, const double &vapour, const double &thp, const double &alq, const double &explicit_wfr, const double &explicit_gfr, const bool use_expvfp) const
double thp(int table_id, const double &aqua, const double &liquid, const double &vapour, const double &bhp, const double &alq) const
double minimumBHP(const int table_id, const double thp, const double wfr, const double gfr, const double alq) const
void addTable(const VFPProdTable &new_table)
bool hasTable(const int table_id) const
EvalWell bhp(const int table_id, const EvalWell &aqua, const EvalWell &liquid, const EvalWell &vapour, const double &thp, const double &alq, const double &explicit_wfr, const double &explicit_gfr, const bool use_expvfp) const
bool empty() const
Definition: VFPProdProperties.hpp:128
std::vector< double > bhpwithflo(const std::vector< double > &flos, const int table_id, const double wfr, const double gfr, const double thp, const double alq, const double dp) const
Definition: BlackoilPhases.hpp:27