OpenCAEPoro  v0.5.0
A simulator for multicomponent porous media flow
Reservoir.hpp
Go to the documentation of this file.
1 
12 #ifndef __RESERVOIR_HEADER__
13 #define __RESERVOIR_HEADER__
14 
15 // OpenCAEPoro header files
16 #include "AllWells.hpp"
17 #include "Bulk.hpp"
18 #include "BulkConn.hpp"
19 #include "Grid.hpp"
20 #include "OptionalFeatures.hpp"
21 #include "ParamRead.hpp"
22 
31 class Reservoir
32 {
33  friend class OCPControl;
34  friend class Summary;
35  friend class CriticalInfo;
36  friend class Out4RPT;
37  friend class Out4VTK;
38 
39  // temp
40  friend class IsoT_IMPEC;
41  friend class IsoT_FIM;
42  friend class IsoT_FIMn;
43  friend class IsoT_AIMc;
44  friend class T_FIM;
45  friend class Solver;
46 
48  // General
50 
51 public:
54  void InputParam(ParamRead& param);
56  void SetupIsoT();
58  void SetupT();
60  void ApplyControl(const USI& i);
62  void CalIPRT(const OCP_DBL& dt);
64  void CalMaxChange();
66  OCP_USI GetBulkNum() const { return bulk.GetBulkNum(); }
68  USI GetWellNum() const { return allWells.GetWellNum(); }
70  USI GetComNum() const { return bulk.GetComNum(); }
71 
72 protected:
78 
79 public:
81  OCP_DBL CalCFL(const OCP_DBL& dt) const;
85  OCP_DBL GetNRdSmax(OCP_USI& index) { return bulk.CalNRdSmax(index); }
88  void PrintSolFIM(const string& outfile) const;
89  void OutInfoFinal() const { bulk.OutMixtureIters(); }
90 };
91 
92 #endif /* end if __RESERVOIR_HEADER__ */
93 
94 /*----------------------------------------------------------------------------*/
95 /* Brief Change History of This File */
96 /*----------------------------------------------------------------------------*/
97 /* Author Date Actions */
98 /*----------------------------------------------------------------------------*/
99 /* Shizhe Li Oct/01/2021 Create file */
100 /* Chensong Zhang Oct/15/2021 Format file */
101 /*----------------------------------------------------------------------------*/
AllWells class declaration.
BulkConn class declaration.
Bulk class declaration.
Grid class declaration.
unsigned int USI
Generic unsigned integer.
Definition: OCPConst.hpp:23
double OCP_DBL
Double precision.
Definition: OCPConst.hpp:27
unsigned int OCP_USI
Long unsigned integer.
Definition: OCPConst.hpp:25
OptionalFeatures class declaration.
ParamRead class declaration.
USI GetWellNum() const
Return the num of wells.
Definition: AllWells.hpp:141
Properties and operations on connections between bulks (active grids).
Definition: BulkConn.hpp:71
Physical information of each active reservoir bulk.
Definition: Bulk.hpp:104
OCP_DBL GetNRdPmax() const
Return NRdPmax.
Definition: Bulk.hpp:404
OCP_DBL CalNRdSmax(OCP_USI &index)
Calculate some auxiliary variable, for example, dSmax.
Definition: Bulk.cpp:1235
OCP_DBL GetNRdNmax() const
Return NRdNmax.
Definition: Bulk.hpp:406
OCP_USI GetBulkNum() const
Return the number of bulks.
Definition: Bulk.hpp:146
USI GetComNum() const
Return the number of components.
Definition: Bulk.hpp:150
void OutMixtureIters() const
Output iterations in Mixture.
Definition: Bulk.hpp:186
Collect important information of each time step for fast review.
Definition: OCPOutput.hpp:155
Definition: Grid.hpp:89
IsoT_FIM is FIM (Fully Implicit Method).
IsoT_IMPEC is IMPEC (implicit pressure explict saturation) method.
All control parameters except for well controllers.
Definition: OCPControl.hpp:94
Collect more detailed information of each time step.
Definition: OCPOutput.hpp:211
Pre-processing unit for OpenCAEPoro for reading params from input files.
Definition: ParamRead.hpp:33
void SetupT()
Setup static information for reservoir with input params for Thermal model.
Definition: Reservoir.cpp:40
BulkConn conn
Bulk's connection info.
Definition: Reservoir.hpp:76
OCP_DBL GetNRdSmax(OCP_USI &index)
Return NRdSmax.
Definition: Reservoir.hpp:85
OptionalFeatures optFeatures
optional features.
Definition: Reservoir.hpp:77
void InputParam(ParamRead &param)
Definition: Reservoir.cpp:18
OCP_DBL CalCFL(const OCP_DBL &dt) const
Calculate the CFL number, including bulks and wells for IMPEC.
Definition: Reservoir.cpp:73
USI GetWellNum() const
Return the num of Well.
Definition: Reservoir.hpp:68
OCP_DBL GetNRdPmax()
Return NRdPmax.
Definition: Reservoir.hpp:83
void CalMaxChange()
Calculate Maximum Change of some reference variables for IMPEC.
Definition: Reservoir.cpp:56
USI GetComNum() const
Return the num of Components.
Definition: Reservoir.hpp:70
Grid grid
Init Grid info.
Definition: Reservoir.hpp:73
void ApplyControl(const USI &i)
Apply the control of ith critical time point.
Definition: Reservoir.cpp:48
Bulk bulk
Active grid info.
Definition: Reservoir.hpp:74
AllWells allWells
Wells class info.
Definition: Reservoir.hpp:75
void SetupIsoT()
Setup static information for reservoir with input params for Isothermal model.
Definition: Reservoir.cpp:28
void CalIPRT(const OCP_DBL &dt)
Calculate num of Injection, Production.
Definition: Reservoir.cpp:64
OCP_DBL GetNRdNmax()
Return NRdNmax.
Definition: Reservoir.hpp:87
OCP_USI GetBulkNum() const
Return the num of Bulk.
Definition: Reservoir.hpp:66
Solver class for overall solution methods.
Definition: Solver.hpp:22
The Summary class manages the output in the summary file.
Definition: OCPOutput.hpp:104