wells.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_WELLS_H_INCLUDED
21 #define OPM_WELLS_H_INCLUDED
22 
23 #include <stdbool.h>
24 #include <opm/core/well_controls.h>
25 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
41 enum WellType {
44 };
45 
46 
50 struct Wells
51 {
58  enum WellType *type;
59 
63  double *depth_ref;
64 
73  double *comp_frac;
74 
82 
87  int *well_cells;
88 
92  double *WI;
93 
94 
98  struct WellControls **ctrls;
99 
103  char **name;
104 
109  int *allow_cf;
110 
114  void *data;
115 
116 };
117 
118 
133 {
137  double *wdp;
138 
142  double *A;
143 
148  double *phasemob;
149 };
150 
175 struct Wells *
176 create_wells(int nphases, int nwells, int nperf);
177 
178 
201 int
202 add_well(enum WellType type ,
203  double depth_ref,
204  int nperf ,
205  const double *comp_frac,
206  const int *cells ,
207  const double *WI ,
208  const char *name ,
209  int allow_cf ,
210  struct Wells *W );
211 
212 
233 int
235  double target,
236  double alq,
237  int vfp,
238  const double *distr,
239  int well_index,
240  struct Wells *W);
241 
242 
259 void
260 set_current_control(int well_index, int current_control, struct Wells *W);
261 
262 
274 void
275 clear_well_controls(int well_index, struct Wells *W);
276 
277 
286 void
287 destroy_wells(struct Wells *W);
288 
289 
299 struct Wells *
300 clone_wells(const struct Wells *W);
301 
302 
339 bool
340 wells_equal(const struct Wells *W1, const struct Wells *W2 , bool verbose);
341 
342 
343 #ifdef __cplusplus
344 }
345 #endif
346 
347 #endif /* OPM_WELLS_H_INCLUDED */
int * well_connpos
Definition: wells.h:81
Definition: wells.h:50
int number_of_wells
Definition: wells.h:52
double * phasemob
Definition: wells.h:148
int append_well_controls(enum WellControlType type, double target, double alq, int vfp, const double *distr, int well_index, struct Wells *W)
void set_current_control(int well_index, int current_control, struct Wells *W)
int * well_cells
Definition: wells.h:87
Definition: wells.h:132
int add_well(enum WellType type, double depth_ref, int nperf, const double *comp_frac, const int *cells, const double *WI, const char *name, int allow_cf, struct Wells *W)
Definition: wells.h:43
double * depth_ref
Definition: wells.h:63
int number_of_phases
Definition: wells.h:53
double * A
Definition: wells.h:142
enum WellType * type
Definition: wells.h:58
char ** name
Definition: wells.h:103
struct WellControls ** ctrls
Definition: wells.h:98
double * comp_frac
Definition: wells.h:73
WellControlType
Definition: well_controls.h:34
void destroy_wells(struct Wells *W)
void clear_well_controls(int well_index, struct Wells *W)
struct Wells * create_wells(int nphases, int nwells, int nperf)
Definition: wells.h:42
double * wdp
Definition: wells.h:137
double * WI
Definition: wells.h:92
void * data
Definition: wells.h:114
WellType
Definition: wells.h:41
bool wells_equal(const struct Wells *W1, const struct Wells *W2, bool verbose)
struct Wells * clone_wells(const struct Wells *W)
int * allow_cf
Definition: wells.h:109