41 if (control.printLevel >= PRINT_MIN) {
42 cout << endl <<
"Dynamic simulation for isothermal models" << endl;
46 if (control.printLevel >= PRINT_MIN) {
47 cout << endl <<
"Dynamic simulation for thermal models" << endl;
54 solver.
Setup(reservoir, control);
56 output.Setup(reservoir, control);
58 double finalTime = timer.
Stop() / 1000;
59 if (control.printLevel >= PRINT_MIN) {
61 <<
"Setup simulation done. Wall time : " << fixed << setprecision(3)
62 << finalTime <<
" Sec" << endl;
76 double finalTime = timer.
Stop() / 1000;
77 if (control.printLevel >= PRINT_MIN) {
79 <<
"Initialization done. Wall time : " << fixed << setprecision(3)
80 << finalTime <<
" Sec" << endl;
83 control.initTime = finalTime;
91 if (control.printLevel >= PRINT_MIN) {
92 cout <<
"\nDynamic simulation with IMPEC\n" << endl;
96 if (control.printLevel >= PRINT_MIN) {
97 cout <<
"\nDynamic simulation with FIM\n" << endl;
101 if (control.printLevel >= PRINT_MIN) {
102 cout <<
"\nDynamic simulation with FIMn\n" << endl;
106 if (control.printLevel >= PRINT_MIN) {
107 cout <<
"\nDynamic simulation with AIMc\n" << endl;
122 MAX(log10(control.current_time), log10(MAX(control.totalSimTime, 1.0))) + 6;
124 cout <<
"==================================================" << endl;
127 cout <<
"Final time: " << right << fixed << setprecision(3)
128 << setw(fixWidth) << control.current_time <<
" (Days)" << endl;
129 cout <<
" - Avg time step size ......." << setw(fixWidth)
130 << control.current_time / control.numTstep <<
" (" << control.numTstep
131 <<
" steps)" << endl;
132 cout <<
" - Avg Newton steps ........." << setw(fixWidth)
133 <<
static_cast<double>(control.iterNR_total) / control.numTstep <<
" ("
134 << control.iterNR_total <<
" succeeded + " << control.wastedIterNR
135 <<
" wasted)" << endl;
136 cout <<
" - Avg linear steps ........." << setw(fixWidth)
137 <<
static_cast<double>(control.iterLS_total) / control.iterNR_total <<
" ("
138 << control.iterLS_total <<
" succeeded + " << control.wastedIterLS
139 <<
" wasted)" << endl;
142 cout <<
"Simulation time: " << setw(fixWidth) << control.totalSimTime
143 <<
" (Seconds)" << endl;
144 cout <<
" - % Initialization ........." << setw(fixWidth)
145 << 100.0 * control.initTime / control.totalSimTime <<
" (" << control.initTime
147 cout <<
" - % Assembling ............." << setw(fixWidth)
148 << 100.0 * control.totalAssembleMatTime / control.totalSimTime <<
" ("
149 << control.totalAssembleMatTime <<
"s)" << endl;
150 cout <<
" - % Linear solver .........." << setw(fixWidth)
151 << 100.0 * control.totalLStime / control.totalSimTime <<
" ("
152 << control.totalLStime <<
"s)" << endl;
153 cout <<
" - % Updating properties ...." << setw(fixWidth)
154 << 100.0 * control.totalUpdatePropertyTime / control.totalSimTime <<
" ("
155 << control.totalUpdatePropertyTime <<
"s)" << endl;
156 cout <<
" - % Scheduled output ......." << setw(fixWidth)
157 << 100.0 * output.outputTime / control.totalSimTime <<
" ("
158 << output.outputTime <<
"s)" << endl;
160 cout <<
"==================================================" << endl;
unsigned int USI
Generic unsigned integer.
const USI FIMn
Solution method = FIM.
const USI FIM
Solution method = FIM.
const USI AIMc
Adaptive implicit -— Collins.
const USI IMPEC
Solution method = IMPEC.
Main header file for OpenCAEPoro simulator.
#define OCP_ABORT(msg)
Abort if critical error happens.
Get elapsed wall-time in millisecond.
__inline__ double Stop() const
Stop the timer and return duration from start() in ms.
__inline__ void Start()
Start the timer.
void SetupFastControl(const USI &argc, const char *optset[])
Setup fast Control.
void RecordTotalTime(const OCP_DBL &t)
Record the total time of simulation.
void InputParam(const ParamControl &CtrlParam)
Input parameters for control.
USI GetMethod() const
Return type of the solution method.
USI GetModel() const
Get model.
void InputParam(ParamRead ¶m)
Read input parameters to an internal structure.
void RunSimulation()
Run dynamic simulation.
void OutputResults() const
Output necessary information for post-processing.
void InitReservoir()
Initialize or get initial status of reservoir.
void SetupSimulator(const USI &argc, const char *options[])
Setup reservoir based on an internal structure.
void ReadInputFile(const string &filename)
Read Param from an input file.
Pre-processing unit for OpenCAEPoro for reading params from input files.
ParamOutput paramOutput
Read the output params.
void ReadInputFile(const string &file)
General interface for reading input data.
ParamControl paramControl
Read the control params.
void InputParam(ParamRead ¶m)
void Setup(Reservoir &rs, const OCPControl &ctrl)
Setup Solver.
void RunSimulation(Reservoir &rs, OCPControl &ctrl, OCPOutput &output)
Start simulation.
void InitReservoir(Reservoir &rs) const
Initialize the reservoir.