opm-simulators
Toggle main menu visibility
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
31
namespace
Opm
{
32
33
class
DeferredLogger
;
34
template
<
class
Scalar>
struct
PerforationRates
;
35
36
template
<
class
Value>
37
class
RatioCalculator
38
{
39
public
:
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
93
private
:
94
int
gasComp_;
95
int
oilComp_;
96
int
waterComp_;
97
std::string name_;
98
};
99
100
}
// namespace Opm
101
102
#endif
// RATIO_CALCULATOR_HPP
Opm::DeferredLogger
Definition
DeferredLogger.hpp:57
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition
blackoilbioeffectsmodules.hh:43
Opm::PerforationRates
Definition
PerforationData.hpp:41
opm
simulators
wells
RatioCalculator.hpp
Generated by
1.17.0