29 output.PrintInfoSched(rs, ctrl, timer.
Stop());
31 for (
USI d = 0; d < numTSteps - 1; d++)
38 output.SetVal(rs, ctrl);
40 output.PrintInfoSched(rs, ctrl, timer.
Stop());
41 if (ctrl.printLevel > 2) {
50 cout <<
"SSMSTA: " << setw(12) << rs.bulk.GetSSMSTAiters()
51 << setw(15) << rs.bulk.GetSSMSTAiters() * 1.0 / rs.bulk.GetSSMSTAcounts() << endl;
52 cout <<
"NRSTA: " << setw(12) << rs.bulk.GetNRSTAiters()
53 << setw(15) << rs.bulk.GetNRSTAiters() * 1.0 / rs.bulk.GetNRSTAcounts() << endl;
54 cout <<
"SSMSP: " << setw(12) << rs.bulk.GetSSMSPiters()
55 << setw(15) << rs.bulk.GetSSMSPiters() * 1.0 / rs.bulk.GetSSMSPcounts() << endl;
56 cout <<
"NRSP: " << setw(12) << rs.bulk.GetNRSPiters()
57 << setw(15) << rs.bulk.GetNRSPiters() * 1.0 / rs.bulk.GetNRSPcounts() << endl;
58 cout <<
"NRRR: " << setw(12) << rs.bulk.GetRRiters()
59 << setw(15) << rs.bulk.GetRRiters() * 1.0 / rs.bulk.GetRRcounts() << endl;
69 if (ctrl.printLevel > 0) {
70 cout <<
"### DEBUG: " << setprecision(3) << fixed << ctrl.
GetCurTime() <<
" Days";
72 cout <<
"Last dt " << ctrl.last_dt <<
" Days" << endl;
83 AssembleSolve(rs, ctrl);
84 if (!UpdateProperty(rs, ctrl))
89 if (FinishNR(rs, ctrl))
129 return IsoTSolver.
FinishNR(rs, ctrl);
const USI EOS_PVTW
Mixture model = equation-of-state.
unsigned int USI
Generic unsigned integer.
double OCP_DBL
Double precision.
const OCP_DBL MIN_TIME_CURSTEP
Minimal time stepsize of current step ???
Solver class declaration.
#define OCP_ABORT(msg)
Abort if critical error happens.
USI GetMixMode() const
Return the mixture mode.
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 SolveLinearSystem(Reservoir &rs, OCPControl &ctrl)
Solve the linear system in single problem.
void InitReservoir(Reservoir &rs) const
Initialize the Reservoir and prepare variables for some method.
void SetupMethod(Reservoir &rs, const OCPControl &ctrl)
Setup the fluid solver.
bool UpdateProperty(Reservoir &rs, OCPControl &ctrl)
Update properties of fluid.
bool FinishNR(Reservoir &rs, OCPControl &ctrl)
Finish the Newton-Raphson iteration.
void FinishStep(Reservoir &rs, OCPControl &ctrl)
Finish the current time step.
void AssembleMat(const Reservoir &rs, const OCP_DBL &dt)
Assemble Mat.
void Prepare(Reservoir &rs, OCP_DBL &dt)
Prepare for assembling Mat.
All control parameters except for well controlers.
USI GetNumTSteps() const
Return number of TSTEPs.
void ApplyControl(const USI &i, const Reservoir &rs)
Apply control for time step i.
OCP_DBL & GetCurDt()
Return current dt.
void RecordTotalTime(const OCP_DBL &t)
Record the total time of simulation.
bool IsCriticalTime(const USI &d)
Determine whether the critical time point has been reached.
USI GetLSiterT() const
Return the total number of linear iterations.
void ResetIterNRLS()
Reset the number of iterations.
OCP_DBL GetCurTime() const
Return the current time.
USI GetNRiterT() const
Return the total nubmer of Newton iterations.
The OCPOutput class manages different kinds of ways to output information.
void ApplyControl(const USI &i)
Apply the control of ith critical time point.
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.