My Project
Loading...
Searching...
No Matches
RatioCalculator.hpp
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,
54
55 void gasOilPerfRateInj(const std::vector<Value>& cq_s,
57 const Value& rv,
58 const Value& rs,
59 const Value& pressure,
60 const Value& rvw,
61 const bool waterActive,
63
64 void gasOilPerfRateProd(std::vector<Value>& cq_s,
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,
79
80 void gasWaterPerfRateInj(const std::vector<Value>& cq_s,
82 const Value& rvw,
83 const Value& rsw,
84 const Value& pressure,
86
87 void gasWaterPerfRateProd(std::vector<Value>& cq_s,
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
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
Definition PerforationData.hpp:41