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
35template<class Scalar>
37{
38public:
43 explicit WellProdIndexCalculator(const Well& well);
44
53 void reInit(const Well& well);
54
66 Scalar connectionProdIndStandard(const std::size_t connIdx,
67 const Scalar connMobility) const;
68
72 std::size_t numConnections() const
73 {
74 return this->standardConnFactors_.size();
75 }
76
77private:
83 std::vector<Scalar> standardConnFactors_{};
84};
85
98template<class Scalar>
99std::vector<Scalar>
101 const std::vector<Scalar>& connMobility);
102
113template<class Scalar>
115 const std::vector<Scalar>& connMobility);
116
117} // namespace Opm
118
119#endif // OPM_WELLPRODINDEXCALCULATOR_HEADER_INCLUDED
Definition: WellProdIndexCalculator.hpp:37
WellProdIndexCalculator(const Well &well)
std::size_t numConnections() const
Definition: WellProdIndexCalculator.hpp:72
Scalar connectionProdIndStandard(const std::size_t connIdx, const Scalar connMobility) const
void reInit(const Well &well)
Definition: blackoilboundaryratevector.hh:37
Scalar wellProdIndStandard(const WellProdIndexCalculator< Scalar > &wellPICalc, const std::vector< Scalar > &connMobility)
std::vector< Scalar > connectionProdIndStandard(const WellProdIndexCalculator< Scalar > &wellPICalc, const std::vector< Scalar > &connMobility)