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>
25
34#ifdef __cplusplus
35extern "C" {
36#endif
37
44};
45
46
50struct Wells
51{
59
63 double *depth_ref;
64
73 double *comp_frac;
74
82
88
92 double *WI;
93
98
102 struct WellControls **ctrls;
103
107 char **name;
108
114
118 void *data;
119
120};
121
122
137{
141 double *wdp;
142
146 double *A;
147
152 double *phasemob;
153};
154
179struct Wells *
180create_wells(int nphases, int nwells, int nperf);
181
182
205int
207 double depth_ref,
208 int nperf ,
209 const double *comp_frac,
210 const int *cells ,
211 const double *WI ,
212 const int *sat_table_id,
213 const char *name ,
214 int allow_cf ,
215 struct Wells *W );
216
217
238int
240 double target,
241 double alq,
242 int vfp,
243 const double *distr,
244 int well_index,
245 struct Wells *W);
246
247
264void
265set_current_control(int well_index, int current_control, struct Wells *W);
266
267
279void
280clear_well_controls(int well_index, struct Wells *W);
281
282
291void
293
294
304struct Wells *
305clone_wells(const struct Wells *W);
306
307
344bool
345wells_equal(const struct Wells *W1, const struct Wells *W2 , bool verbose);
346
347
348#ifdef __cplusplus
349}
350#endif
351
352#endif /* OPM_WELLS_H_INCLUDED */
Definition: wells.h:137
double * phasemob
Definition: wells.h:152
double * wdp
Definition: wells.h:141
double * A
Definition: wells.h:146
Definition: wells.h:51
double * depth_ref
Definition: wells.h:63
double * comp_frac
Definition: wells.h:73
int * well_connpos
Definition: wells.h:81
double * WI
Definition: wells.h:92
enum WellType * type
Definition: wells.h:58
int * sat_table_id
Definition: wells.h:97
char ** name
Definition: wells.h:107
struct WellControls ** ctrls
Definition: wells.h:102
int * allow_cf
Definition: wells.h:113
int number_of_wells
Definition: wells.h:52
int * well_cells
Definition: wells.h:87
int number_of_phases
Definition: wells.h:53
void * data
Definition: wells.h:118
WellControlType
Definition: well_controls.h:34
int append_well_controls(enum WellControlType type, double target, double alq, int vfp, const double *distr, int well_index, struct Wells *W)
int add_well(enum WellType type, double depth_ref, int nperf, const double *comp_frac, const int *cells, const double *WI, const int *sat_table_id, const char *name, int allow_cf, struct Wells *W)
void clear_well_controls(int well_index, struct Wells *W)
bool wells_equal(const struct Wells *W1, const struct Wells *W2, bool verbose)
struct Wells * clone_wells(const struct Wells *W)
struct Wells * create_wells(int nphases, int nwells, int nperf)
void set_current_control(int well_index, int current_control, struct Wells *W)
WellType
Definition: wells.h:41
@ INJECTOR
Definition: wells.h:42
@ PRODUCER
Definition: wells.h:43
void destroy_wells(struct Wells *W)