12 #ifndef __OCP_CONTROL_HEADER__
13 #define __OCP_CONTROL_HEADER__
80 void ReadParam(
const USI& argc,
const char* optset[]);
118 void InitTime(
const USI& i);
121 void SetupFastControl(
const USI& argc,
const char* optset[]);
160 void ResetIterNRLS();
177 return ((criticalTime[d] - current_time) <
TINY);
190 void CalNextTimeStep(
Reservoir& rs, initializer_list<string> il);
196 string linearSolverFile;
198 vector<OCP_DBL> criticalTime;
209 OCP_DBL totalUpdatePropertyTime{0};
210 OCP_DBL totalAssembleMatTime{0};
228 vector<ControlTime> ctrlTimeSet;
230 vector<ControlPreTime> ctrlPreTimeSet;
232 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.
unsigned int OCP_BOOL
OCP_BOOL in OCP.
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 time step.
OCP_DBL NRdSmax
Maximum Saturation change in a Newton iteration.
OCP_DBL Verrmax
Maximum Verr (vol error b/w fluid and pore) in a Newton step.
OCP_DBL NRdPmin
Minimum Pressure change in a Newton iteration.
Params for convergence and material balance error checks.
OCP_DBL dSlim
Ideal max Saturation change.
OCP_DBL eVlim
Ideal max relative Verr (pore - fluid) change.
OCP_DBL dPlim
Ideal max Pressure change.
OCP_DBL dNlim
Ideal max relative Ni (moles of components) change.
OCP_DBL dTlim
Ideal max Temperature change.
Params for choosing time stepsize in time marching.
OCP_DBL cutFacNR
Factor by which time step is cut after convergence failure.
OCP_DBL timeMax
Max time step during running.
OCP_DBL timeInit
Max init step length of next time step.
OCP_DBL timeMin
Min time step during running.
OCP_DBL minChopFac
Min choppable factor.
OCP_DBL maxIncreFac
Max increase factor.
Store shortcut instructions from the command line.
OCP_DBL timeMax
Maximum time step during running.
OCP_DBL timeMin
Minimum time step during running.
OCP_DBL timeInit
Maximum Init step length of next time step.
IsoT_FIM is FIM (Fully Implicit Method).
IsoT_IMPEC is IMPEC (implicit pressure explict saturation) method.
All control parameters except for well controllers.
USI GetNumTSteps() const
Return number of TSTEPs.
void RecordTotalTime(const OCP_DBL &t)
Record the total time of simulation.
string GetWorkDir() const
Return work dir name.
OCP_BOOL IsCriticalTime(const USI &d)
Determine whether the critical time point has been reached.
USI GetNRiter() const
Return the number of Newton iterations in one time step.
OCP_DBL GetLastDt() const
Return last time step size.
OCP_DBL GetCurDt() const
Return current time step size.
void UpdateIterNR()
Update the number of Newton iterations.
void RecordTimeUpdateProperty(const OCP_DBL &t)
Record time used for update property.
USI GetLSiter() const
Return the number of linear iterations in one time step.
void RecordTimeAssembleMat(const OCP_DBL &t)
Record time used for assemble matrix.
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.
void RecordTimeLS(const OCP_DBL &t)
Record time used for linear solver.
USI GetNRiterT() const
Return the total number of Newton iterations.
USI GetModel() const
Get model.
The OCPOutput class manages different kinds of ways to output information.
Top-level data structure for the OpenCAEPoro simulator.
Collect more detailed information of each time step.
Solver class for overall solution methods.