My Project
Loading...
Searching...
No Matches
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
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
Collect per-connection static information to enable calculating connection-level or well-level produc...
Definition WellProdIndexCalculator.hpp:37
std::size_t numConnections() const
Number of connections in this well.
Definition WellProdIndexCalculator.hpp:72
Scalar connectionProdIndStandard(const std::size_t connIdx, const Scalar connMobility) const
Compute connection-level steady-state productivity index value using dynamic phase mobility.
Definition WellProdIndexCalculator.cpp:121
void reInit(const Well &well)
Reinitialization operation.
Definition WellProdIndexCalculator.cpp:114
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
Scalar wellProdIndStandard(const WellProdIndexCalculator< Scalar > &wellPICalc, const std::vector< Scalar > &connMobility)
Compute well-level productivity index value.
Definition WellProdIndexCalculator.cpp:147
std::vector< Scalar > connectionProdIndStandard(const WellProdIndexCalculator< Scalar > &wellPICalc, const std::vector< Scalar > &connMobility)
Compute connection-level productivity index values for all connections in a well.
Definition WellProdIndexCalculator.cpp:131
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242