well_const.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2011 Equinor ASA, Norway.
3
4 The file 'well_const.h' is part of ERT - Ensemble based Reservoir Tool.
5
6 ERT 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 ERT is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.
14
15 See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
16 for more details.
17*/
18
19
20#ifndef ERT_WELL_CONST_H
21#define ERT_WELL_CONST_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#define WELL_SEGMENT_OFFSET 1
28#define WELL_BRANCH_OFFSET 1
29
30#define ECLIPSE_WELL_SEGMENT_OFFSET 1
31#define ECLIPSE_WELL_BRANCH_OFFSET 1
32
33/* These values are taken from the ISEG description in table 6.1 in ECLIPSE file formats reference. */
34#define ECLIPSE_WELL_SEGMENT_OUTLET_END_VALUE 0
35#define ECLIPSE_WELL_SEGMENT_BRANCH_MAIN_STEM_VALUE 1
36#define ECLIPSE_WELL_SEGMENT_INACTIVE_VALUE 0
37#define ECLIPSE_CONN_NORMAL_WELL_SEGMENT_VALUE 0
38
39#define WELL_SEGMENT_OUTLET_END_VALUE (WELL_SEGMENT_OFFSET + ECLIPSE_WELL_SEGMENT_OUTLET_END_VALUE - ECLIPSE_WELL_SEGMENT_OFFSET) // -1
40#define WELL_SEGMENT_BRANCH_MAIN_STEM_VALUE (WELL_BRANCH_OFFSET + ECLIPSE_WELL_SEGMENT_BRANCH_MAIN_STEM_VALUE - ECLIPSE_WELL_BRANCH_OFFSET) // 0
41#define WELL_SEGMENT_BRANCH_INACTIVE_VALUE (WELL_BRANCH_OFFSET + ECLIPSE_WELL_SEGMENT_INACTIVE_VALUE - ECLIPSE_WELL_BRANCH_OFFSET) // -1
42#define CONN_NORMAL_WELL_SEGMENT_VALUE (WELL_SEGMENT_OFFSET + ECLIPSE_CONN_NORMAL_WELL_SEGMENT_VALUE - ECLIPSE_WELL_SEGMENT_OFFSET)
43
44
45
46/*
47 Observe that the values given as _ITEM are not indices which can
48 be directly used in the IWEL or ICON keywords; an offset must be
49 added.
50*/
51
52#define IWEL_HEADI_INDEX 0
53#define IWEL_HEADJ_INDEX 1
54#define IWEL_HEADK_INDEX 2
55#define IWEL_CONNECTIONS_INDEX 4
56#define IWEL_GROUP_INDEX 5
57#define IWEL_TYPE_INDEX 6
58#define IWEL_STATUS_INDEX 10
59#define IWEL_LGR_INDEX 42
60#define IWEL_SEGMENTED_WELL_NR_INDEX 70
61
62#define IWEL_HEADI_ITEM 0
63#define IWEL_HEADJ_ITEM 1
64#define IWEL_HEADK_ITEM 2
65#define IWEL_CONNECTIONS_ITEM 4
66#define IWEL_GROUP_ITEM 5
67#define IWEL_TYPE_ITEM 6
68#define IWEL_STATUS_ITEM 10
69#define IWEL_LGR_ITEM 42
70#define IWEL_SEGMENTED_WELL_NR_ITEM 70
71
72#define IWEL_SEGMENTED_WELL_NR_NORMAL_VALUE -1
73#define ISEG_OUTLET_INDEX 1
74#define ISEG_BRANCH_INDEX 3
75
76#define XWEL_RES_WRAT_ITEM 1
77#define XWEL_RES_GRAT_ITEM 2
78#define XWEL_RES_ORAT_ITEM 3
79#define XWEL_RESV_ITEM 4
80
81
82#define ICON_IC_INDEX 0
83#define ICON_I_INDEX 1
84#define ICON_J_INDEX 2
85#define ICON_K_INDEX 3
86#define ICON_STATUS_INDEX 5
87#define ICON_DIRECTION_INDEX 13
88#define ICON_SEGMENT_INDEX 14
89
90#define ICON_IC_ITEM 0
91#define ICON_I_ITEM 1
92#define ICON_J_ITEM 2
93#define ICON_K_ITEM 3
94#define ICON_STATUS_ITEM 5
95#define ICON_DIRECTION_ITEM 13
96#define ICON_SEGMENT_ITEM 14
97
98#define ICON_DIRX 1
99#define ICON_DIRY 2
100#define ICON_DIRZ 3
101#define ICON_FRACX 4
102#define ICON_FRACY 5
103#define ICON_DEFAULT_DIR_VALUE 0
104#define ICON_DEFAULT_DIR_TARGET ICON_DIRZ
105
106#define SCON_CF_INDEX 0
107
108#define XCON_ORAT_INDEX 0
109#define XCON_WRAT_INDEX 1
110#define XCON_GRAT_INDEX 2
111#define XCON_QR_INDEX 49
112
113#define RSEG_LENGTH_INDEX 0
114#define RSEG_DIAMETER_INDEX 2
115#define RSEG_TOTAL_LENGTH_INDEX 6
116#define RSEG_DEPTH_INDEX 7
117
118/*
119 The ECLIPSE documentation says that a certain item in the IWEL array
120 should indicate the type of the well, the available types are the
121 ones given in the enum below. Unfortunately it turns out that when
122 the well is closed the integer value in the IWEL array can be 0, if
123 the well is indeed closed we accept this zero - otherwise we fail
124 hard. Theese hoops are in the well_state_alloc() routine.
125*/
126
127#define IWEL_UNDOCUMENTED_ZERO 0
128#define IWEL_PRODUCER 1
129#define IWEL_OIL_INJECTOR 2
130#define IWEL_WATER_INJECTOR 3
131#define IWEL_GAS_INJECTOR 4
132
133 typedef enum {
134 ERT_UNDOCUMENTED_ZERO = 0, // Deprecated - retained for Resinsight compatibility
136
137 ERT_PRODUCER = 1, // Deprecated
139
140 ERT_OIL_INJECTOR = 2, // Deprecated
142
143 ERT_WATER_INJECTOR = 3, // Deprecated
145
146 ERT_GAS_INJECTOR = 4, // Deprecated
149
150#ifdef __cplusplus
151}
152#endif
153
154#endif
well_type_enum
Definition: well_const.hpp:133
@ ERT_WATER_INJECTOR
Definition: well_const.hpp:143
@ ECL_WELL_WATER_INJECTOR
Definition: well_const.hpp:144
@ ECL_WELL_GAS_INJECTOR
Definition: well_const.hpp:147
@ ERT_GAS_INJECTOR
Definition: well_const.hpp:146
@ ECL_WELL_OIL_INJECTOR
Definition: well_const.hpp:141
@ ECL_WELL_PRODUCER
Definition: well_const.hpp:138
@ ERT_UNDOCUMENTED_ZERO
Definition: well_const.hpp:134
@ ECL_WELL_ZERO
Definition: well_const.hpp:135
@ ERT_PRODUCER
Definition: well_const.hpp:137
@ ERT_OIL_INJECTOR
Definition: well_const.hpp:140