opm-simulators
Toggle main menu visibility
Loading...
Searching...
No Matches
GasLiftWellState.hpp
1
/*
2
Copyright 2021 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_GASLIFT_WELL_STATE_HEADER_INCLUDED
21
#define OPM_GASLIFT_WELL_STATE_HEADER_INCLUDED
22
23
#include <optional>
24
#include <utility>
25
26
namespace
Opm
{
27
28
template
<
class
Scalar>
29
class
GasLiftWellState
30
{
31
public
:
32
GasLiftWellState(Scalar oil_rate,
33
bool
oil_is_limited,
34
Scalar gas_rate,
35
bool
gas_is_limited,
36
Scalar alq,
37
bool
alq_is_limited,
38
Scalar water_rate,
39
bool
water_is_limited,
40
std::optional<bool> increase)
41
: oil_rate_{oil_rate}
42
, oil_is_limited_{oil_is_limited}
43
, gas_rate_{gas_rate}
44
, gas_is_limited_{gas_is_limited}
45
, alq_{alq}
46
, alq_is_limited_{alq_is_limited}
47
, water_rate_{water_rate}
48
, water_is_limited_{water_is_limited}
49
, increase_{increase}
50
{}
51
52
Scalar alq()
const
{
return
alq_; }
53
bool
alqChanged() {
return
increase_.has_value(); }
54
bool
alqIsLimited()
const
{
return
alq_is_limited_; }
55
bool
gasIsLimited()
const
{
return
gas_is_limited_; }
56
Scalar gasRate()
const
{
return
gas_rate_; }
57
std::pair<Scalar, Scalar> getRates() {
return
{oil_rate_, gas_rate_}; }
58
std::optional<bool> increase()
const
{
return
increase_; }
59
bool
oilIsLimited()
const
{
return
oil_is_limited_; }
60
Scalar oilRate()
const
{
return
oil_rate_; }
61
Scalar waterRate()
const
{
return
water_rate_; }
62
bool
waterIsLimited()
const
{
return
water_is_limited_; }
63
void
update(Scalar oil_rate,
64
bool
oil_is_limited,
65
Scalar gas_rate,
66
bool
gas_is_limited,
67
Scalar alq,
68
bool
alq_is_limited,
69
Scalar water_rate,
70
Scalar water_is_limited,
71
bool
increase)
72
{
73
oil_rate_ = oil_rate;
74
oil_is_limited_ = oil_is_limited;
75
gas_rate_ = gas_rate;
76
gas_is_limited_ = gas_is_limited;
77
alq_ = alq;
78
alq_is_limited_ = alq_is_limited;
79
water_rate_ = water_rate;
80
water_is_limited_ = water_is_limited;
81
increase_ = increase;
82
}
83
84
private
:
85
Scalar oil_rate_;
86
bool
oil_is_limited_;
87
Scalar gas_rate_;
88
bool
gas_is_limited_;
89
Scalar alq_;
90
bool
alq_is_limited_;
91
Scalar water_rate_;
92
bool
water_is_limited_;
93
std::optional<bool> increase_;
94
};
95
96
}
// namespace Opm
97
98
#endif
// OPM_GASLIFT_WELL_STATE_HEADER_INCLUDED
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition
blackoilbioeffectsmodules.hh:43
opm
simulators
wells
GasLiftWellState.hpp
Generated by
1.17.0