My Project
Loading...
Searching...
No Matches
WellInjectionControls.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_INJECTION_CONTROLS_HPP
22#define WELL_INJECTION_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 explicit WellInjectionControls(int controls_arg) :
32 controls(controls_arg)
33 {}
34
35 bool hasControl(WellInjectorCMode cmode_arg) const
36 {
37 return (this->controls & static_cast<int>(cmode_arg)) != 0;
38 }
39
40 void skipControl(WellInjectorCMode cmode_arg) {
41 auto int_arg = static_cast<int>(cmode_arg);
42 if ((this->controls & int_arg) != 0)
43 this->controls -= int_arg;
44 }
45
46 void addControl(WellInjectorCMode cmode_arg) {
47 auto int_arg = static_cast<int>(cmode_arg);
48 if ((this->controls & int_arg) == 0)
49 this->controls += int_arg;
50 }
51
52 void clearControls(){
53 this->controls = 0;
54 }
55
56 double bhp_limit;
57 double thp_limit;
58
59 InjectorType injector_type;
60 WellInjectorCMode cmode = WellInjectorCMode::CMODE_UNDEFINED;
61 double surface_rate;
62 double reservoir_rate;
63 int vfp_table_number;
64 bool prediction_mode;
65 double rs_rv_inj;
66
67private:
68 int controls;
69};
70
71}
72
73#endif
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Definition WellInjectionControls.hpp:29