well_controls.h
Go to the documentation of this file.
1 /*
2  Copyright 2012 SINTEF ICT, Applied Mathematics.
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_WELL_CONTROLS_H_INCLUDED
21 #define OPM_WELL_CONTROLS_H_INCLUDED
22 
23 #include <stdbool.h>
24 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
35  BHP,
36  THP,
39 };
40 
41 struct WellControls;
42 
43 bool
44 well_controls_equal(const struct WellControls *ctrls1, const struct WellControls *ctrls2 , bool verbose);
45 
46 struct WellControls *
48 
56 struct WellControls *
57 well_controls_clone(const struct WellControls *ctrl);
58 
59 void
60 well_controls_destroy(struct WellControls *ctrl);
61 
62 
63 int
64 well_controls_get_num(const struct WellControls *ctrl);
65 
66 int
67 well_controls_get_current( const struct WellControls * ctrl);
68 
69 void
70 well_controls_set_current( struct WellControls * ctrl, int current);
71 
72 
73 bool
74 well_controls_well_is_stopped(const struct WellControls * ctrl);
75 
76 bool
77 well_controls_well_is_open(const struct WellControls * ctrl);
78 
79 void
80 well_controls_open_well( struct WellControls * ctrl);
81 
82 void
83 well_controls_stop_well( struct WellControls * ctrl);
84 
85 int
86 well_controls_add_new(enum WellControlType type , double target , double alq , int vfp , const double * distr , struct WellControls * ctrl);
87 
88 enum WellControlType
89 well_controls_iget_type(const struct WellControls * ctrl, int control_index);
90 
91 enum WellControlType
92 well_controls_get_current_type(const struct WellControls * ctrl);
93 
94 void
95 well_controls_iset_type( struct WellControls * ctrls , int control_index , enum WellControlType type);
96 
97 void
98 well_controls_iset_target(struct WellControls * ctrl, int control_index , double target);
99 
100 double
101 well_controls_iget_target(const struct WellControls * ctrl, int control_index);
102 
103 void
104 well_controls_iset_alq(struct WellControls * ctrl, int control_index , double alq);
105 
106 double
107 well_controls_iget_alq(const struct WellControls * ctrl, int control_index );
108 
109 void
110 well_controls_iset_vfp(struct WellControls * ctrl, int control_index , int vfp);
111 
112 int
113 well_controls_iget_vfp(const struct WellControls * ctrl, int control_index );
114 
115 double
116 well_controls_get_current_target(const struct WellControls * ctrl);
117 
118 const double *
119 well_controls_iget_distr(const struct WellControls * ctrl, int control_index);
120 
121 void
122 well_controls_iset_distr(const struct WellControls * ctrl, int control_index, const double * distr);
123 
124 const double *
125 well_controls_get_current_distr(const struct WellControls * ctrl);
126 
127 void
128 well_controls_assert_number_of_phases(struct WellControls * ctrl , int number_of_phases);
129 
130 void
131 well_controls_clear(struct WellControls * ctrl);
132 
133 
134 #ifdef __cplusplus
135 }
136 #endif
137 
138 #endif /* OPM_WELL_CONTROLS_H_INCLUDED */
Definition: well_controls.h:38
void well_controls_iset_target(struct WellControls *ctrl, int control_index, double target)
void well_controls_iset_type(struct WellControls *ctrls, int control_index, enum WellControlType type)
struct WellControls * well_controls_create(void)
void well_controls_iset_distr(const struct WellControls *ctrl, int control_index, const double *distr)
const double * well_controls_get_current_distr(const struct WellControls *ctrl)
void well_controls_clear(struct WellControls *ctrl)
bool well_controls_well_is_open(const struct WellControls *ctrl)
void well_controls_set_current(struct WellControls *ctrl, int current)
Definition: well_controls.h:36
enum WellControlType well_controls_iget_type(const struct WellControls *ctrl, int control_index)
double well_controls_iget_alq(const struct WellControls *ctrl, int control_index)
double well_controls_iget_target(const struct WellControls *ctrl, int control_index)
int well_controls_add_new(enum WellControlType type, double target, double alq, int vfp, const double *distr, struct WellControls *ctrl)
int well_controls_iget_vfp(const struct WellControls *ctrl, int control_index)
void well_controls_iset_alq(struct WellControls *ctrl, int control_index, double alq)
void well_controls_stop_well(struct WellControls *ctrl)
void well_controls_destroy(struct WellControls *ctrl)
const double * well_controls_iget_distr(const struct WellControls *ctrl, int control_index)
bool well_controls_equal(const struct WellControls *ctrls1, const struct WellControls *ctrls2, bool verbose)
WellControlType
Definition: well_controls.h:34
int well_controls_get_num(const struct WellControls *ctrl)
void well_controls_open_well(struct WellControls *ctrl)
int well_controls_get_current(const struct WellControls *ctrl)
void well_controls_iset_vfp(struct WellControls *ctrl, int control_index, int vfp)
Definition: well_controls.h:35
double well_controls_get_current_target(const struct WellControls *ctrl)
bool well_controls_well_is_stopped(const struct WellControls *ctrl)
enum WellControlType well_controls_get_current_type(const struct WellControls *ctrl)
struct WellControls * well_controls_clone(const struct WellControls *ctrl)
void well_controls_assert_number_of_phases(struct WellControls *ctrl, int number_of_phases)
Definition: well_controls.h:37