OpenCAEPoro  0.2.0 Sep/22/2022
A simulator for multicomponent porous media flow
ParamWell.hpp
Go to the documentation of this file.
1 
12 #ifndef __PARAMWELL_HEADER__
13 #define __PARAMWELL_HEADER__
14 
15 // Standard header files
16 #include <cassert>
17 #include <fstream>
18 #include <vector>
19 
20 // OpenCAEPoro header files
21 #include "OCPConst.hpp"
22 #include "UtilInput.hpp"
23 
24 using namespace std;
25 
29 {
30 public:
31  WellOptParam(string intype, vector<string>& vbuf);
32  // WCONINJE & WCONPROD
33  string type;
34  string fluidType;
35  string state;
36  string optMode;
37 
41 
42  vector<OCP_DBL>
43  zi;
44 };
45 
50 {
51 public:
52  WellOptPair(USI i, string type, vector<string>& vbuf)
53  : d(i)
54  , opt(type, vbuf){};
55  USI d;
56  WellOptParam opt;
57 };
58 
60 class WellParam
61 {
62 public:
63  WellParam(vector<string>& info);
64  // static infomation
65  // WELSPECS
66  string name;
67  string group{"FEILD"};
68  USI I;
69  USI J;
70  OCP_DBL depth{-1.0};
71 
72  // COMPDAT ---- for all perforation.
73  vector<USI> I_perf;
74  vector<USI> J_perf;
75  vector<USI> K_perf;
76  vector<OCP_DBL> WI;
77  vector<OCP_DBL> diameter;
78  vector<OCP_DBL> kh;
79  vector<OCP_DBL> skinFactor;
80  vector<string> direction;
81 
82  // dynamic infomation
83  vector<WellOptPair> optParam;
84 };
85 
87 class Solvent
88 {
89 public:
90  Solvent() = default;
91  Solvent(const vector<string>& vbuf);
92  string name;
93  vector<OCP_DBL> comRatio;
94 };
95 
101 {
102 public:
103  vector<WellParam> well;
104  vector<OCP_DBL> criticalTime;
105  vector<Solvent> solSet;
106 
108  void Init() { InitTime(); };
110  void InitTime() { criticalTime.push_back(0); };
113  void InputWELSPECS(ifstream& ifs);
116  void InputCOMPDAT(ifstream& ifs);
119  void InputWCONINJE(ifstream& ifs);
122  void InputWCONPROD(ifstream& ifs);
127  void InputTSTEP(ifstream& ifs);
131  void InputWELTARG(ifstream& ifs);
134  void InputWELLSTRE(ifstream& ifs);
135 
136  // check
138  void CheckParam(const bool& boModel) const;
140  void CheckPerf() const;
141  void CheckINJFluid() const;
142 };
143 
144 #endif /* end if __PARAMWELL_HEADER__ */
145 
146 /*----------------------------------------------------------------------------*/
147 /* Brief Change History of This File */
148 /*----------------------------------------------------------------------------*/
149 /* Author Date Actions */
150 /*----------------------------------------------------------------------------*/
151 /* Shizhe Li Oct/01/2021 Create file */
152 /* Chensong Zhang Oct/15/2021 Format file */
153 /*----------------------------------------------------------------------------*/
Definition of build-in datatypes and consts.
unsigned int USI
Generic unsigned integer.
Definition: OCPConst.hpp:22
double OCP_DBL
Double precision.
Definition: OCPConst.hpp:26
Supply basic tools used to input files.
vector< Solvent > solSet
Sets of Solvent.
Definition: ParamWell.hpp:105
void Init()
Initialize the inputting the params of wells.
Definition: ParamWell.hpp:108
vector< OCP_DBL > criticalTime
Records the critical time given by users.
Definition: ParamWell.hpp:104
void InitTime()
Initialize the critical time.
Definition: ParamWell.hpp:110
vector< WellParam > well
Contains all the information of wells.
Definition: ParamWell.hpp:103
Describe the molar fraction of components of fluid injected to reservoir from INJ.
Definition: ParamWell.hpp:88
OCP_DBL maxBHP
Maximum allowable pressure in the injection well.
Definition: ParamWell.hpp:39
string type
Type of well, injection or production?
Definition: ParamWell.hpp:33
string fluidType
Type of fluid into the injection well. (injection well only)
Definition: ParamWell.hpp:34
OCP_DBL maxRate
Maximum allowable flow rate into/out the well.
Definition: ParamWell.hpp:38
string optMode
Mode of well, Rate or BHP?
Definition: ParamWell.hpp:36
vector< OCP_DBL > zi
Proportion of components of injection fluid. (COMPS model only).
Definition: ParamWell.hpp:43
OCP_DBL minBHP
Minimum allowable pressure in the production well.
Definition: ParamWell.hpp:40
string state
State of well, open or close?
Definition: ParamWell.hpp:35
TODO: Add Doxygen.
Definition: ParamWell.hpp:61
vector< string > direction
Direction of perforations.
Definition: ParamWell.hpp:80
vector< OCP_DBL > diameter
Diameter of perforations.
Definition: ParamWell.hpp:77
vector< OCP_DBL > skinFactor
Skin factor.
Definition: ParamWell.hpp:79
USI I
I index of well.
Definition: ParamWell.hpp:68
vector< USI > I_perf
I-index of perforation in grid.
Definition: ParamWell.hpp:73
string name
Name of Well.
Definition: ParamWell.hpp:66
vector< OCP_DBL > WI
Transmissiblity connection factor.
Definition: ParamWell.hpp:76
vector< USI > J_perf
J-index of perforation in grid.
Definition: ParamWell.hpp:74
vector< USI > K_perf
K-index of perforation in grid.
Definition: ParamWell.hpp:75
USI J
J index of well.
Definition: ParamWell.hpp:69