OpenCAEPoro  v0.5.0
A simulator for multicomponent porous media flow
Solver.hpp
Go to the documentation of this file.
1 
12 // OpenCAEPoro header files
13 #include "IsothermalSolver.hpp"
14 #include "OCPOutput.hpp"
15 #include "ThermalSolver.hpp"
16 
17 #ifndef __SOLVER_HEADER__
18 #define __SOLVER_HEADER__
19 
21 class Solver
22 {
23 public:
25  void Setup(Reservoir& rs, const OCPControl& ctrl);
27  void InitReservoir(Reservoir& rs) const;
29  void RunSimulation(Reservoir& rs, OCPControl& ctrl, OCPOutput& output);
30 
31 private:
33  void GoOneStep(Reservoir& rs, OCPControl& ctrl);
34 
36  void SetupIsoT(Reservoir& rs, const OCPControl& ctrl);
38  void GoOneStepIsoT(Reservoir& rs, OCPControl& ctrl);
39 
41  void SetupT(Reservoir& rs, const OCPControl& ctrl);
43  void GoOneStepT(Reservoir& rs, OCPControl& ctrl);
44 
45 private:
47  USI OCPModel{ISOTHERMALMODEL};
49  IsothermalSolver IsoTSolver;
51  ThermalSolver TSolver;
52 };
53 
54 #endif /* end if __SOLVER_HEADER__ */
55 
56 /*----------------------------------------------------------------------------*/
57 /* Brief Change History of This File */
58 /*----------------------------------------------------------------------------*/
59 /* Author Date Actions */
60 /*----------------------------------------------------------------------------*/
61 /* Shizhe Li Oct/01/2021 Create file */
62 /* Shizhe Li Oct/21/2021 Change from OCPMethod to Solver */
63 /* Chensong Zhang Oct/27/2021 Rearrange and add comments */
64 /*----------------------------------------------------------------------------*/
IsothermalSolver class declaration.
unsigned int USI
Generic unsigned integer.
Definition: OCPConst.hpp:23
OCPOutput class declaration.
ThermalSolver class declaration.
IsothermalSolver class for fluid solution method.
All control parameters except for well controllers.
Definition: OCPControl.hpp:94
The OCPOutput class manages different kinds of ways to output information.
Definition: OCPOutput.hpp:436
Solver class for overall solution methods.
Definition: Solver.hpp:22
void Setup(Reservoir &rs, const OCPControl &ctrl)
Setup Solver.
Definition: Solver.cpp:15
void RunSimulation(Reservoir &rs, OCPControl &ctrl, OCPOutput &output)
Start simulation.
Definition: Solver.cpp:61
void InitReservoir(Reservoir &rs) const
Initialize the reservoir.
Definition: Solver.cpp:45
ThermalSolver class for fluid solution method.