WellProdIndexCalculator.hpp
Go to the documentation of this file.
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
26namespace Opm {
27 class Well;
28} // namespace Opm
29
30namespace 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>
99 const std::vector<double>& connMobility);
100
112 const std::vector<double>& connMobility);
113} // namespace Opm
114
115#endif // OPM_WELLPRODINDEXCALCULATOR_HEADER_INCLUDED
Definition: WellProdIndexCalculator.hpp:36
std::size_t numConnections() const
Definition: WellProdIndexCalculator.hpp:71
WellProdIndexCalculator(const Well &well)
double connectionProdIndStandard(const std::size_t connIdx, const double connMobility) const
void reInit(const Well &well)
Definition: BlackoilPhases.hpp:27
double wellProdIndStandard(const WellProdIndexCalculator &wellPICalc, const std::vector< double > &connMobility)
std::vector< double > connectionProdIndStandard(const WellProdIndexCalculator &wellPICalc, const std::vector< double > &connMobility)