OpenCAEPoro  0.2.0 Sep/22/2022
A simulator for multicomponent porous media flow
OCPConst.hpp
Go to the documentation of this file.
1 
12 #ifndef __OPENCAEPORO_CONSTS_HEADER__
13 #define __OPENCAEPORO_CONSTS_HEADER__
14 
15 // Standard header files
16 #include <iostream>
17 
18 // OpenCAEPoro header files
19 #include "UtilError.hpp"
20 
21 // Build-in data type
22 typedef unsigned int USI;
23 typedef unsigned long long OCP_ULL;
24 typedef unsigned int OCP_USI;
25 typedef int OCP_INT;
26 typedef double OCP_DBL;
27 typedef float OCP_SIN;
28 
29 // General error type
30 const int OCP_SUCCESS = 0;
31 const int OCP_ERROR_NUM_INPUT = -1;
32 const int OCP_ERROR = -100;
33 
34 // General consts
35 const OCP_DBL GAS_CONSTANT = 10.73159;
36 const OCP_DBL TINY = 1E-8;
37 const OCP_DBL PI = 3.141592653;
38 
39 // Control consts
40 const OCP_DBL MAX_TIME_STEP = 365.0;
41 const OCP_DBL MIN_TIME_STEP = 0.01;
42 const OCP_DBL MIN_TIME_CURSTEP = 1E-6;
43 const OCP_DBL TIME_STEP_CUT = 0.5;
45 const OCP_DBL MAX_VOLUME_ERR = 0.01;
46 const OCP_DBL MAX_DP_LIMIT = 200;
47 const OCP_DBL MAX_DS_LIMIT = 0.1;
48 const OCP_DBL TARGET_DP = 50;
49 const OCP_DBL TARGET_DS = 0.01;
50 
51 // Physical consts
52 const OCP_DBL GRAVITY_FACTOR = 0.00694444;
53 const OCP_DBL RHOW_STD = 62.3664;
54 const OCP_DBL RHOAIR_STD = 0.076362;
55 const OCP_DBL PRESSURE_STD = 14.7;
56 const OCP_DBL TEMPERATURE_STD = 519.67;
57 
58 // Unit conversion consts
59 const OCP_DBL CONV1 = 5.61458;
60 const OCP_DBL CONV2 = 1.12712E-3;
61 const OCP_DBL CONV3 = 0.45359237;
62 const OCP_DBL CONV4 = 0.02831685;
63 
64 // Grid Type
65 const USI ORTHOGONAL_GRID = 1;
66 const USI CORNER_GRID = 2;
67 const USI GENERAL_GRID = 3;
68 
69 // Solution methods
70 const USI IMPEC = 1;
71 const USI FIM = 2;
72 const USI AIMs = 3;
73 const USI AIMt = 4;
74 const USI AIMc = 5;
75 const USI FIMn = 6;
76 
77 // Linear Solver
78 const USI SCALARFASP = 1;
79 const USI VECTORFASP = 2;
80 
81 // Fluid types
82 const USI OIL = 0;
83 const USI GAS = 1;
84 const USI WATER = 2;
85 const USI SOLVENT = 3;
86 
87 // Mixture types
88 const USI BLKOIL = 1;
89 const USI EOS_PVTW = 2;
90 
91 // EoS models
92 const USI EOS_PR = 1;
93 const USI EOS_SRK = 2;
94 
95 // Phase types
96 const USI PHASE_W = 1;
97 const USI PHASE_GW = 2;
98 const USI PHASE_OW = 3;
99 const USI PHASE_OG = 4;
100 const USI PHASE_ODGW = 5;
101 const USI PHASE_DOGW = 6;
102 const USI PHASE_ODGW01 = 51;
103 const USI PHASE_ODGW02 = 52;
105 
106 // Well params
107 const USI INJ = 1;
108 const USI PROD = 2;
109 const USI HORIZONTAL = 1;
110 const USI VERTICAL = 2;
111 const bool OPEN = true;
112 const bool CLOSE = false;
113 
114 // Well option params
115 const USI RATE_MODE = 1;
116 const USI ORATE_MODE = 2;
117 const USI GRATE_MODE = 3;
118 const USI WRATE_MODE = 4;
119 const USI LRATE_MODE = 5;
120 const USI BHP_MODE = 6;
121 
122 // Perforation directions
123 const USI X_DIRECTION = 1;
124 const USI Y_DIRECTION = 2;
125 const USI Z_DIRECTION = 3;
126 
127 #endif // __OPENCAEPORO_CONSTS_HEADER__
128 
129 /*----------------------------------------------------------------------------*/
130 /* Brief Change History of This File */
131 /*----------------------------------------------------------------------------*/
132 /* Author Date Actions */
133 /*----------------------------------------------------------------------------*/
134 /* Shizhe Li Oct/01/2021 Create file */
135 /* Chensong Zhang Oct/15/2021 Format file */
136 /* Chensong Zhang Oct/27/2021 Unify error check */
137 /* Chensong Zhang Jan/16/2022 Update Doxygen */
138 /* Chensong Zhang Sep/21/2022 Add error messages */
139 /*----------------------------------------------------------------------------*/
const USI X_DIRECTION
x-direction
Definition: OCPConst.hpp:123
const OCP_DBL TIME_STEP_CUT
Time stepsize cut ratio.
Definition: OCPConst.hpp:43
const USI VECTORFASP
Use vector linear solver in Fasp.
Definition: OCPConst.hpp:79
const USI CORNER_GRID
Grid type = corner-point.
Definition: OCPConst.hpp:66
const USI AIMs
Adaptive implicit.
Definition: OCPConst.hpp:72
const USI BLKOIL
Mixture model = black-oil.
Definition: OCPConst.hpp:88
const OCP_DBL TINY
Small constant.
Definition: OCPConst.hpp:36
const USI SOLVENT
Fluid type = solvent.
Definition: OCPConst.hpp:85
const USI PHASE_ODGW01
Phase type = oil-dry gas-water.
Definition: OCPConst.hpp:102
const USI AIMt
improved version of IMPEC, loacl FIM after IMPEC
Definition: OCPConst.hpp:73
const OCP_DBL MAX_DS_LIMIT
Maximal saturation change.
Definition: OCPConst.hpp:47
const USI EOS_PVTW
Mixture model = equation-of-state.
Definition: OCPConst.hpp:89
unsigned int USI
Generic unsigned integer.
Definition: OCPConst.hpp:22
const USI GAS
Fluid type = gas.
Definition: OCPConst.hpp:83
double OCP_DBL
Double precision.
Definition: OCPConst.hpp:26
const USI VERTICAL
Well type = vectical.
Definition: OCPConst.hpp:110
const OCP_DBL CONV1
1 bbl = CONV1 ft3
Definition: OCPConst.hpp:59
const OCP_DBL GRAVITY_FACTOR
0.00694444 ft2 psi / lb
Definition: OCPConst.hpp:52
const USI LRATE_MODE
Well option = fixed fluid rate???
Definition: OCPConst.hpp:119
const USI WRATE_MODE
Well option = fixed water rate.
Definition: OCPConst.hpp:118
const USI WATER
Fluid type = water.
Definition: OCPConst.hpp:84
float OCP_SIN
Single precision.
Definition: OCPConst.hpp:27
const USI FIMn
Solution method = FIM.
Definition: OCPConst.hpp:75
const USI PHASE_ODGW
Phase type = oil-dry gas-water.
Definition: OCPConst.hpp:100
const int OCP_SUCCESS
Finish without trouble.
Definition: OCPConst.hpp:30
const OCP_DBL MIN_TIME_STEP
Minimal time stepsize.
Definition: OCPConst.hpp:41
const OCP_DBL RHOW_STD
Water density in lb / ft3.
Definition: OCPConst.hpp:53
const USI HORIZONTAL
Well type = horizontal.
Definition: OCPConst.hpp:109
const USI ORTHOGONAL_GRID
Grid type = orthogonal.
Definition: OCPConst.hpp:65
const USI PHASE_ODGW02
Phase type = oil-dry gas-water.
Definition: OCPConst.hpp:103
const USI EOS_SRK
EoS model = SRK.
Definition: OCPConst.hpp:93
const OCP_DBL TARGET_DP
Target pressure change.
Definition: OCPConst.hpp:48
const USI Y_DIRECTION
y-direction
Definition: OCPConst.hpp:124
const USI ORATE_MODE
Well option = fixed oil rate.
Definition: OCPConst.hpp:116
const OCP_DBL MIN_TIME_CURSTEP
Minimal time stepsize of current step ???
Definition: OCPConst.hpp:42
const USI OIL
Fluid type = oil.
Definition: OCPConst.hpp:82
const bool CLOSE
Well type = closed.
Definition: OCPConst.hpp:112
const OCP_DBL CONV3
1 lb = CONV3 kg
Definition: OCPConst.hpp:61
const OCP_DBL MAX_TIME_STEP
Maximal time stepsize.
Definition: OCPConst.hpp:40
const int OCP_ERROR
Unidentified error.
Definition: OCPConst.hpp:32
const OCP_DBL TARGET_DS
Target saturation change.
Definition: OCPConst.hpp:49
const USI GENERAL_GRID
Grid type = general.
Definition: OCPConst.hpp:67
const USI FIM
Solution method = FIM.
Definition: OCPConst.hpp:71
const USI PHASE_W
Phase type = water only.
Definition: OCPConst.hpp:96
const USI RATE_MODE
Well option = fixed total rate???
Definition: OCPConst.hpp:115
unsigned int OCP_USI
Long unsigned integer.
Definition: OCPConst.hpp:24
const int OCP_ERROR_NUM_INPUT
Wrong number of input param.
Definition: OCPConst.hpp:31
const OCP_DBL MAX_DP_LIMIT
Maximal pressure change.
Definition: OCPConst.hpp:46
const USI EOS_PR
EoS model = PR.
Definition: OCPConst.hpp:92
const bool OPEN
Well type = open.
Definition: OCPConst.hpp:111
const USI PHASE_ODGW01_MISCIBLE
Phase type = oil-dry gas-water.
Definition: OCPConst.hpp:104
const USI Z_DIRECTION
z-direction
Definition: OCPConst.hpp:125
const USI PHASE_OW
Phase type = oil-water.
Definition: OCPConst.hpp:98
const USI AIMc
Adaptive implicit -— Collins.
Definition: OCPConst.hpp:74
const OCP_DBL TIME_STEP_AMPLIFY
Time stepsize amplification ratio.
Definition: OCPConst.hpp:44
const USI IMPEC
Solution method = IMPEC.
Definition: OCPConst.hpp:70
const USI PROD
Well type = producer.
Definition: OCPConst.hpp:108
const OCP_DBL TEMPERATURE_STD
Standard temperature.
Definition: OCPConst.hpp:56
const OCP_DBL MAX_VOLUME_ERR
Maximal volume error.
Definition: OCPConst.hpp:45
const OCP_DBL GAS_CONSTANT
Gas Constant.
Definition: OCPConst.hpp:35
const USI SCALARFASP
Use scalar linear solver in Fasp.
Definition: OCPConst.hpp:78
const USI PHASE_DOGW
Phase type = dead oil-gas-water.
Definition: OCPConst.hpp:101
const OCP_DBL PI
Pi.
Definition: OCPConst.hpp:37
int OCP_INT
Long integer.
Definition: OCPConst.hpp:25
const USI INJ
Well type = injector.
Definition: OCPConst.hpp:107
const USI PHASE_OG
Phase type = oil-gas.
Definition: OCPConst.hpp:99
const USI BHP_MODE
Well option = fixed bottom-hole-pressure.
Definition: OCPConst.hpp:120
const OCP_DBL RHOAIR_STD
Air density in lb / ft3.
Definition: OCPConst.hpp:54
const USI GRATE_MODE
Well option = fixed gas rate.
Definition: OCPConst.hpp:117
const OCP_DBL PRESSURE_STD
14.6959 psia = 1 atm
Definition: OCPConst.hpp:55
unsigned long long OCP_ULL
Long long unsigned integer.
Definition: OCPConst.hpp:23
const OCP_DBL CONV4
1 ft3 = CONV4 m3
Definition: OCPConst.hpp:62
const OCP_DBL CONV2
Darcy constant in field unit.
Definition: OCPConst.hpp:60
const USI PHASE_GW
Phase type = gas-water.
Definition: OCPConst.hpp:97
Logging error and warning messages.