Loading...
Searching...
No Matches
WellProdIndexCalculator.hpp
/*
Copyright 2020 Equinor ASA.
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_WELLPRODINDEXCALCULATOR_HEADER_INCLUDED
#define OPM_WELLPRODINDEXCALCULATOR_HEADER_INCLUDED
#include <cstddef>
#include <vector>
namespace Opm {
class Well;
} // namespace Opm
namespace Opm {
template<class Scalar>
class WellProdIndexCalculator
{
public:
explicit WellProdIndexCalculator(const Well& well);
void reInit(const Well& well);
Scalar connectionProdIndStandard(const std::size_t connIdx,
const Scalar connMobility) const;
std::size_t numConnections() const
{
return this->standardConnFactors_.size();
}
private:
std::vector<Scalar> standardConnFactors_{};
};
template<class Scalar>
std::vector<Scalar>
connectionProdIndStandard(const WellProdIndexCalculator<Scalar>& wellPICalc,
const std::vector<Scalar>& connMobility);
template<class Scalar>
Scalar wellProdIndStandard(const WellProdIndexCalculator<Scalar>& wellPICalc,
const std::vector<Scalar>& connMobility);
} // namespace Opm
#endif // OPM_WELLPRODINDEXCALCULATOR_HEADER_INCLUDED
Opm::WellProdIndexCalculator
Collect per-connection static information to enable calculating connection-level or well-level produc...
Definition WellProdIndexCalculator.hpp:37
Opm::WellProdIndexCalculator::WellProdIndexCalculator
WellProdIndexCalculator(const Well &well)
Constructor.
Definition WellProdIndexCalculator.cpp:108
Opm::WellProdIndexCalculator::numConnections
std::size_t numConnections() const
Number of connections in this well.
Definition WellProdIndexCalculator.hpp:72
Opm::WellProdIndexCalculator::connectionProdIndStandard
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
Opm::WellProdIndexCalculator::reInit
void reInit(const Well &well)
Reinitialization operation.
Definition WellProdIndexCalculator.cpp:114
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43
Opm::wellProdIndStandard
Scalar wellProdIndStandard(const WellProdIndexCalculator< Scalar > &wellPICalc, const std::vector< Scalar > &connMobility)
Compute well-level productivity index value.
Definition WellProdIndexCalculator.cpp:147
Opm::connectionProdIndStandard
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