All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
legacy_well.h
Go to the documentation of this file.
1 /*
2  Copyright 2010 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_LEGACY_WELL_HEADER_INCLUDED
21 #define OPM_LEGACY_WELL_HEADER_INCLUDED
22 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 
38 
42 enum well_control { BHP , RATE };
43 
47 enum surface_component { WATER = 0, OIL = 1, GAS = 2 };
48 
54  int *well_connpos;
55  int *well_cells;
56 };
57 
62  enum well_type *type;
64  double *target;
65  double *zfrac;
66 };
67 
72  double *WI;
73  double *gpot;
74  double *A;
75  double *phasemob;
76 };
77 
83 
89 
103 int
104 allocate_cell_wells(int nc, well_t *W, int **cwpos, int **cwells);
105 
116 void
117 deallocate_cell_wells(int *cvpos, int *cwells);
118 
128 void
129 derive_cell_wells(int nc, well_t *W, int *cwpos, int *cwells);
130 
131 
132 #ifdef __cplusplus
133 }
134 #endif
135 
136 #endif /* OPM_LEGACY_WELL_HEADER_INCLUDED */
Well constrained by BHP target.
Definition: well_controls.h:35
void derive_cell_wells(int nc, well_t *W, int *cwpos, int *cwells)
Construct cell-to-well mapping (i.e., transpose the well-to-cell mapping represented by W-&gt;well_cells...
surface_component
Compositions recognised in injection wells.
Definition: legacy_well.h:47
double * gpot
Gravity potential.
Definition: legacy_well.h:73
Basic representation of well controls.
Definition: legacy_well.h:61
int * well_cells
Well connections.
Definition: legacy_well.h:55
int allocate_cell_wells(int nc, well_t *W, int **cwpos, int **cwells)
Allocate cell-to-well mapping (as a sparse array).
int number_of_wells
Number of wells.
Definition: legacy_well.h:53
well_control
Control types recognised in system.
Definition: legacy_well.h:42
double * WI
Well indices.
Definition: legacy_well.h:72
double * zfrac
Surface injection composition.
Definition: legacy_well.h:65
Well is an injector.
Definition: wells.h:42
double * phasemob
Phase mobility, per connection.
Definition: legacy_well.h:75
double * A
for compressible flows.
Definition: legacy_well.h:74
Basic representation of well topology.
Definition: legacy_well.h:52
Well is a producer.
Definition: wells.h:43
enum well_type * type
Individual well taxonomy.
Definition: legacy_well.h:62
double * target
Control target.
Definition: legacy_well.h:64
void deallocate_cell_wells(int *cvpos, int *cwells)
Dispose of memory resources allocated using function allocate_cell_wells().
enum well_control * ctrl
Individual well controls.
Definition: legacy_well.h:63
int * well_connpos
Well topology start pointers.
Definition: legacy_well.h:54
well_type
Well taxonomy.
Definition: legacy_well.h:37
Dynamic discretisation data relating well to flow in reservoir.
Definition: legacy_well.h:71