My Project
WellProdIndexCalculator.hpp
1 /*
2  Copyright 2020 Equinor ASA.
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_WELLPRODINDEXCALCULATOR_HEADER_INCLUDED
21 #define OPM_WELLPRODINDEXCALCULATOR_HEADER_INCLUDED
22 
23 #include <cstddef>
24 #include <vector>
25 
26 namespace Opm {
27  class Well;
28 } // namespace Opm
29 
30 namespace Opm {
31 
36  {
37  public:
42  explicit WellProdIndexCalculator(const Well& well);
43 
52  void reInit(const Well& well);
53 
65  double connectionProdIndStandard(const std::size_t connIdx,
66  const double connMobility) const;
67 
71  std::size_t numConnections() const
72  {
73  return this->standardConnFactors_.size();
74  }
75 
76  private:
82  std::vector<double> standardConnFactors_{};
83  };
84 
97  std::vector<double>
98  connectionProdIndStandard(const WellProdIndexCalculator& wellPICalc,
99  const std::vector<double>& connMobility);
100 
111  double wellProdIndStandard(const WellProdIndexCalculator& wellPICalc,
112  const std::vector<double>& connMobility);
113 } // namespace Opm
114 
115 #endif // OPM_WELLPRODINDEXCALCULATOR_HEADER_INCLUDED
Collect per-connection static information to enable calculating connection-level or well-level produc...
Definition: WellProdIndexCalculator.hpp:36
std::size_t numConnections() const
Number of connections in this well.
Definition: WellProdIndexCalculator.hpp:71
WellProdIndexCalculator(const Well &well)
Constructor.
Definition: WellProdIndexCalculator.cpp:95
double connectionProdIndStandard(const std::size_t connIdx, const double connMobility) const
Compute connection-level steady-state productivity index value using dynamic phase mobility.
Definition: WellProdIndexCalculator.cpp:106
void reInit(const Well &well)
Reinitialization operation.
Definition: WellProdIndexCalculator.cpp:99
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:27
double wellProdIndStandard(const WellProdIndexCalculator &wellPICalc, const std::vector< double > &connMobility)
Compute well-level productivity index value.
Definition: WellProdIndexCalculator.cpp:130
std::vector< double > connectionProdIndStandard(const WellProdIndexCalculator &wellPICalc, const std::vector< double > &connMobility)
Compute connection-level productivity index values for all connections in a well.
Definition: WellProdIndexCalculator.cpp:115