OpenCAEPoro  v0.5.0
A simulator for multicomponent porous media flow
ThermalMethod.hpp
Go to the documentation of this file.
1 
12 #ifndef __THERMALMETHOD_HEADER__
13 #define __THERMALMETHOD_HEADER__
14 
15 #include "LinearSystem.hpp"
16 #include "OCPControl.hpp"
17 #include "Reservoir.hpp"
18 #include "UtilOutput.hpp"
19 #include "UtilTiming.hpp"
20 
21 class T_FIM
22 {
23 public:
24  void Setup(Reservoir& rs, LinearSystem& ls, const OCPControl& ctrl);
25  void InitReservoir(Reservoir& rs) const;
26  void Prepare(Reservoir& rs, const OCPControl& ctrl);
27  void AssembleMat(LinearSystem& ls,
28  const Reservoir& rs,
29  const OCP_DBL& t,
30  const OCP_DBL& dt) const;
31  void SolveLinearSystem(LinearSystem& ls, Reservoir& rs, OCPControl& ctrl) const;
32  OCP_BOOL UpdateProperty(Reservoir& rs, OCPControl& ctrl);
33  OCP_BOOL FinishNR(Reservoir& rs, OCPControl& ctrl);
34  void FinishStep(Reservoir& rs, OCPControl& ctrl);
35 
36 protected:
37  void AllocateReservoir(Reservoir& rs);
38  void
39  AllocateLinearSystem(LinearSystem& ls, const Reservoir& rs, const OCPControl& ctrl);
40  void InitRock(Bulk& bk) const;
41  void CalRock(Bulk& bk) const;
42  void InitFlash(Bulk& bk) const;
43  void CalFlash(Bulk& bk) const;
44  void PassFlashValue(Bulk& bk, const OCP_USI& n) const;
45  void CalKrPc(Bulk& bk) const;
46  void CalThermalConduct(BulkConn& conn, Bulk& bk) const;
47  void CalHeatLoss(Bulk& bk, const OCP_DBL& t, const OCP_DBL& dt) const;
48  void UpdateLastTimeStep(Reservoir& rs) const;
49  void CalRes(Reservoir& rs,
50  const OCP_DBL& t,
51  const OCP_DBL& dt,
52  const OCP_BOOL& resetRes0);
53  void AssembleMatBulks(LinearSystem& ls,
54  const Reservoir& rs,
55  const OCP_DBL& t,
56  const OCP_DBL& dt) const;
57  void
58  AssembleMatWells(LinearSystem& ls, const Reservoir& rs, const OCP_DBL& dt) const;
59  void AssembleMatInjWells(LinearSystem& ls,
60  const Bulk& bk,
61  const Well& wl,
62  const OCP_DBL& dt) const;
63  void AssembleMatProdWells(LinearSystem& ls,
64  const Bulk& bk,
65  const Well& wl,
66  const OCP_DBL& dt) const;
67  void
68  GetSolution(Reservoir& rs, const vector<OCP_DBL>& u, const OCPControl& ctrl) const;
69  void ResetToLastTimeStep(Reservoir& rs, OCPControl& ctrl);
70 };
71 
72 #endif /* end if __THERMALMETHOD_HEADER__ */
73 
74 /*----------------------------------------------------------------------------*/
75 /* Brief Change History of This File */
76 /*----------------------------------------------------------------------------*/
77 /* Author Date Actions */
78 /*----------------------------------------------------------------------------*/
79 /* Shizhe Li Nov/10/2022 Create file */
80 /*----------------------------------------------------------------------------*/
Linear solver class declaration.
double OCP_DBL
Double precision.
Definition: OCPConst.hpp:27
unsigned int OCP_USI
Long unsigned integer.
Definition: OCPConst.hpp:25
unsigned int OCP_BOOL
OCP_BOOL in OCP.
Definition: OCPConst.hpp:29
OCPControl class declaration.
Reservoir class declaration.
Supply basic tools used to output files.
Elapsed wall-time and CPU-cycles declaration.
Properties and operations on connections between bulks (active grids).
Definition: BulkConn.hpp:71
Physical information of each active reservoir bulk.
Definition: Bulk.hpp:104
Linear solvers for discrete systems.
All control parameters except for well controllers.
Definition: OCPControl.hpp:94
Definition: Well.hpp:45