My Project
WellProductionControls.hpp
1/*
2 Copyright 2019 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
21#ifndef WELL_PRODUCTION_CONTROLS_HPP
22#define WELL_PRODUCTION_CONTROLS_HPP
23
24#include <opm/input/eclipse/Schedule/ScheduleTypes.hpp>
25#include <opm/input/eclipse/Schedule/Well/WellEnums.hpp>
26
27namespace Opm {
28
30public:
31 WellProductionControls(int controls_arg) :
32 controls(controls_arg)
33 {
34 }
35
36 bool hasControl(WellProducerCMode cmode_arg) const
37 {
38 return (this->controls & static_cast<int>(cmode_arg)) != 0;
39 }
40
41 bool operator==(const WellProductionControls& other) const
42 {
43 return this->cmode == other.cmode &&
44 this->oil_rate == other.oil_rate &&
45 this->water_rate == other.water_rate &&
46 this->gas_rate == other.gas_rate &&
47 this->liquid_rate == other.liquid_rate &&
48 this->resv_rate == other.resv_rate &&
49 this->bhp_history == other.bhp_history &&
50 this->thp_history == other.thp_history &&
51 this->bhp_limit == other.bhp_limit &&
52 this->thp_limit == other.thp_limit &&
53 this->alq_value == other.alq_value &&
54 this->vfp_table_number == other.vfp_table_number &&
55 this->prediction_mode == other.prediction_mode;
56 }
57
58 WellProducerCMode cmode = WellProducerCMode::NONE;
59 double oil_rate{0};
60 double water_rate{0};
61 double gas_rate{0};
62 double liquid_rate{0};
63 double resv_rate{0};
64 double bhp_history{0};
65 double thp_history{0};
66 double bhp_limit{0};
67 double thp_limit{0};
68 double alq_value{0};
69 int vfp_table_number{0};
70 bool prediction_mode{0};
71
72private:
73 int controls;
74};
75
76}
77
78#endif
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: WellProductionControls.hpp:29