OpenCAEPoro  0.2.0 Sep/22/2022
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 
16 #ifndef __SOLVER_HEADER__
17 #define __SOLVER_HEADER__
18 
20 class Solver
21 {
22 public:
24  void Setup(Reservoir& rs, const OCPControl& ctrl);
26  void InitReservoir(Reservoir& rs) const;
28  void RunSimulation(Reservoir& rs, OCPControl& ctrl, OCPOutput& output);
29 
30 private:
32  void GoOneStep(Reservoir& rs, OCPControl& ctrl);
34  void SetupMethod(Reservoir& rs, const OCPControl& ctrl);
36  void Prepare(Reservoir& rs, OCP_DBL& dt);
38  void AssembleSolve(Reservoir& rs, OCPControl& ctrl);
40  bool UpdateProperty(Reservoir& rs, OCPControl& ctrl);
42  bool FinishNR(Reservoir& rs, OCPControl& ctrl);
44  void FinishStep(Reservoir& rs, OCPControl& ctrl);
45 
46 private:
48  IsothermalSolver IsoTSolver;
50  LinearSystem LSolver;
51 };
52 
53 #endif /* end if __SOLVER_HEADER__ */
54 
55 /*----------------------------------------------------------------------------*/
56 /* Brief Change History of This File */
57 /*----------------------------------------------------------------------------*/
58 /* Author Date Actions */
59 /*----------------------------------------------------------------------------*/
60 /* Shizhe Li Oct/01/2021 Create file */
61 /* Shizhe Li Oct/21/2021 Change from OCPMethod to Solver */
62 /* Chensong Zhang Oct/27/2021 Rearrange and add comments */
63 /*----------------------------------------------------------------------------*/
IsothermalSolver class declaration.
double OCP_DBL
Double precision.
Definition: OCPConst.hpp:26
OCPOutput class declaration.
IsothermalSolver class for fluid solution method.
Linear solvers for discrete systems.
All control parameters except for well controlers.
Definition: OCPControl.hpp:94
The OCPOutput class manages different kinds of ways to output information.
Definition: OCPOutput.hpp:202
Solver class for overall solution methods.
Definition: Solver.hpp:21
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:25
void InitReservoir(Reservoir &rs) const
Initialize the reservoir.
Definition: Solver.cpp:18