RatioCalculator.hpp
Go to the documentation of this file.
1/*
2 Copyright 2017 SINTEF Digital, Mathematics and Cybernetics.
3 Copyright 2017 Statoil ASA.
4 Copyright 2016 - 2017 IRIS AS.
5
6 This file is part of the Open Porous Media project (OPM).
7
8 OPM is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 OPM is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with OPM. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#ifndef RATIO_CALCULATOR_HPP
23#define RATIO_CALCULATOR_HPP
24
25#include <opm/material/densead/Math.hpp>
26
27#include <string>
28#include <string_view>
29#include <vector>
30
31namespace Opm {
32
33class DeferredLogger;
34template<class Scalar> struct PerforationRates;
35
36template<class Value>
38{
39public:
40 using Scalar = decltype(getValue(Value{}));
41
42 RatioCalculator(int gasCompIdx,
43 int oilCompIdx,
44 int waterCompIdx,
45 std::string_view name);
46
47 void disOilVapWatVolumeRatio(Value& volumeRatio,
48 const Value& rvw,
49 const Value& rsw,
50 const Value& pressure,
51 const std::vector<Value>& cmix_s,
52 const std::vector<Value>& b_perfcells_dense,
53 DeferredLogger& deferred_logger) const;
54
55 void gasOilPerfRateInj(const std::vector<Value>& cq_s,
56 PerforationRates<Scalar>& perf_rates,
57 const Value& rv,
58 const Value& rs,
59 const Value& pressure,
60 const Value& rvw,
61 const bool waterActive,
62 DeferredLogger& deferred_logger) const;
63
64 void gasOilPerfRateProd(std::vector<Value>& cq_s,
65 PerforationRates<Scalar>& perf_rates,
66 const Value& rv,
67 const Value& rs,
68 const Value& rvw,
69 const bool waterActive,
70 const bool isProducer) const;
71
72 void gasOilVolumeRatio(Value& volumeRatio,
73 const Value& rv,
74 const Value& rs,
75 const Value& pressure,
76 const std::vector<Value>& cmix_s,
77 const std::vector<Value>& b_perfcells_dense,
78 DeferredLogger& deferred_logger) const;
79
80 void gasWaterPerfRateInj(const std::vector<Value>& cq_s,
81 PerforationRates<Scalar>& perf_rates,
82 const Value& rvw,
83 const Value& rsw,
84 const Value& pressure,
85 DeferredLogger& deferred_logger) const;
86
87 void gasWaterPerfRateProd(std::vector<Value>& cq_s,
88 PerforationRates<Scalar>& perf_rates,
89 const Value& rvw,
90 const Value& rsw,
91 const bool isProducer) const;
92
93private:
94 int gasComp_;
95 int oilComp_;
96 int waterComp_;
97 std::string name_;
98};
99
100} // namespace Opm
101
102#endif // RATIO_CALCULATOR_HPP
Definition: DeferredLogger.hpp:57
Definition: RatioCalculator.hpp:38
decltype(getValue(Value{})) Scalar
Definition: RatioCalculator.hpp:40
void gasWaterPerfRateInj(const std::vector< Value > &cq_s, PerforationRates< Scalar > &perf_rates, const Value &rvw, const Value &rsw, const Value &pressure, DeferredLogger &deferred_logger) const
RatioCalculator(int gasCompIdx, int oilCompIdx, int waterCompIdx, std::string_view name)
void gasWaterPerfRateProd(std::vector< Value > &cq_s, PerforationRates< Scalar > &perf_rates, const Value &rvw, const Value &rsw, const bool isProducer) const
void gasOilPerfRateInj(const std::vector< Value > &cq_s, PerforationRates< Scalar > &perf_rates, const Value &rv, const Value &rs, const Value &pressure, const Value &rvw, const bool waterActive, DeferredLogger &deferred_logger) const
void disOilVapWatVolumeRatio(Value &volumeRatio, const Value &rvw, const Value &rsw, const Value &pressure, const std::vector< Value > &cmix_s, const std::vector< Value > &b_perfcells_dense, DeferredLogger &deferred_logger) const
void gasOilVolumeRatio(Value &volumeRatio, const Value &rv, const Value &rs, const Value &pressure, const std::vector< Value > &cmix_s, const std::vector< Value > &b_perfcells_dense, DeferredLogger &deferred_logger) const
void gasOilPerfRateProd(std::vector< Value > &cq_s, PerforationRates< Scalar > &perf_rates, const Value &rv, const Value &rs, const Value &rvw, const bool waterActive, const bool isProducer) const
Definition: blackoilboundaryratevector.hh:39
Definition: PerforationData.hpp:41