12 #ifndef __OCP_CONTROL_HEADER__
13 #define __OCP_CONTROL_HEADER__
80 void ReadParam(
const USI& argc,
const char* optset[]);
106 friend class OCP_FIM_IMPEC;
118 void InitTime(
const USI& i);
121 void SetupFastControl(
const USI& argc,
const char* optset[]);
160 void ResetIterNRLS();
169 void CalNextTstepIMPEC(
const Reservoir& reservoir);
170 void CalNextTstepFIM(
const Reservoir& reservoir);
175 return ((criticalTime[d] - current_time) <
TINY);
185 void SetWellChange(
const bool& flag) { wellChange = flag; }
190 string linearsolveFile;
192 vector<OCP_DBL> criticalTime;
218 vector<ControlTime> ctrlTimeSet;
220 vector<ControlPreTime> ctrlPreTimeSet;
222 vector<ControlNR> ctrlNRSet;
Definition of build-in datatypes and consts.
const OCP_DBL TINY
Small constant.
unsigned int USI
Generic unsigned integer.
double OCP_DBL
Double precision.
ParamControl class declaration.
Reservoir class declaration.
Params for Newton iterations and linear iterations.
OCP_DBL NRtol
Maximum non-linear convergence error.
OCP_DBL NRdSmin
Minimum Saturation change in a Newton iteration.
OCP_DBL NRdPmax
Maximum Pressure change in a Newton iteration.
USI maxNRiter
Maximum number of Newton iterations in a timestep.
OCP_DBL NRdSmax
Maximum Saturation change in a Newton iteration.
OCP_DBL NRdPmin
Minimum Pressure change in a Newton iteration.
Params for convergence and material balance error checks.
OCP_DBL dVlim
Ideal max relative Verr (pore - fluid) change.
OCP_DBL dSlim
Ideal max Saturation change.
OCP_DBL dPlim
Ideal max Pressure change.
OCP_DBL dNlim
Ideal max relative Ni (moles of components) change.
Params for choosing time stepsize in time marching.
OCP_DBL cutFacNR
Factor by which timestep is cut after convergence failure.
OCP_DBL timeMax
Max time step during running.
OCP_DBL timeInit
Max init step length of next timestep.
OCP_DBL timeMin
Min time step during running.
OCP_DBL minChopFac
Min choppable timestep.
OCP_DBL maxIncreFac
Max timestep increase factor.
Collect more detailed information of each time step.
Store shortcut instructions from the command line.
OCP_DBL timeMax
Maximum time step during running.
OCP_DBL timeMin
Minmum time step during running.
OCP_DBL timeInit
Maximum Init step length of next timestep.
All control parameters except for well controlers.
USI GetNumTSteps() const
Return number of TSTEPs.
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.
string GetWorkDir() const
Return work dir name.
USI GetNRiter() const
Return the number of Newton iterations in one time step.
OCP_DBL GetLastDt() const
Return last dt.
void UpdateIterNR()
Update the number of Newton iterations.
USI GetLSiter() const
Return the number of linear iterations in one time step.
USI GetLSiterT() const
Return the total number of linear iterations.
string GetLsFile() const
Return linear solver file name.
void UpdateIterLS(const USI &num)
Update the number of linear iterations.
USI GetMethod() const
Return type of the solution method.
OCP_DBL GetCurTime() const
Return the current time.
USI GetNRiterT() const
Return the total nubmer of Newton iterations.
void UpdateTimeLS(const OCP_DBL &t)
Update time used for linear solver.
The OCPOutput class manages different kinds of ways to output information.
perform AIM in space, that is, some grids will be implicit, others will be explicit at the same time ...
perform AIM in time, that is, local FIM will be performed after global IMPEC performs
OCP_FIM is FIM (Fully Implicit Method).
OCP_IMPEC is IMPEC (implict pressure explict saturation) method.
Top-level data structure for the OpenCAEPoro simulator.
Solver class for overall solution methods.