My Project
VFPProperties.hpp
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_VFPPROPERTIES_HPP_
21 #define OPM_AUTODIFF_VFPPROPERTIES_HPP_
22 
23 #include <opm/simulators/wells/VFPInjProperties.hpp>
24 #include <opm/simulators/wells/VFPProdProperties.hpp>
25 
26 #include <map>
27 
28 namespace Opm {
29 
30 class VFPInjTable;
31 class VFPProdTable;
32 
38 public:
39  VFPProperties() = default;
40 
41 
49  VFPProperties(const std::vector<std::reference_wrapper<const VFPInjTable>>& inj_tables,
50  const std::vector<std::reference_wrapper<const VFPProdTable>>& prod_tables)
51  {
52  for (const auto& vfpinj : inj_tables)
53  this->m_inj.addTable( vfpinj );
54 
55  for (const auto& vfpprod : prod_tables)
56  this->m_prod.addTable( vfpprod );
57  };
58 
62  const VFPInjProperties* getInj() const {
63  return &m_inj;
64  }
65 
69  const VFPProdProperties* getProd() const {
70  return &m_prod;
71  }
72 
73 private:
74  VFPInjProperties m_inj;
75  VFPProdProperties m_prod;
76 };
77 
78 
79 } //Namespace
80 
81 #endif /* OPM_AUTODIFF_VFPPROPERTIES_HPP_ */
Definition: VFPInjProperties.hpp:33
void addTable(const VFPInjTable &new_table)
Takes no ownership of data.
Definition: VFPInjProperties.cpp:84
Class which linearly interpolates BHP as a function of rate, tubing head pressure,...
Definition: VFPProdProperties.hpp:37
void addTable(const VFPProdTable &new_table)
Takes no ownership of data.
Definition: VFPProdProperties.cpp:138
A thin wrapper class that holds one VFPProdProperties and one VFPInjProperties object.
Definition: VFPProperties.hpp:37
const VFPInjProperties * getInj() const
Returns the VFP properties for injection wells.
Definition: VFPProperties.hpp:62
VFPProperties(const std::vector< std::reference_wrapper< const VFPInjTable >> &inj_tables, const std::vector< std::reference_wrapper< const VFPProdTable >> &prod_tables)
Constructor Takes no ownership of data.
Definition: VFPProperties.hpp:49
const VFPProdProperties * getProd() const
Returns the VFP properties for production wells.
Definition: VFPProperties.hpp:69
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:26