My Project
Opm::PIDTimeStepControl Class Reference

PID controller based adaptive time step control as suggested in: Turek and Kuzmin. More...

#include <TimeStepControl.hpp>

Inheritance diagram for Opm::PIDTimeStepControl:
Opm::TimeStepControlInterface Opm::PIDAndIterationCountTimeStepControl

Public Member Functions

 PIDTimeStepControl (const double tol=1e-3, const bool verbose=false)
 constructor More...
 
double computeTimeStepSize (const double dt, const int, const RelativeChangeInterface &relativeChange, const double) const
 compute new time step size suggestions based on the PID controller More...
 
- Public Member Functions inherited from Opm::TimeStepControlInterface
virtual double computeTimeStepSize (const double dt, const int iterations, const RelativeChangeInterface &relativeChange, const double simulationTimeElapsed) const =0
 compute new time step size suggestions based on the PID controller More...
 
virtual ~TimeStepControlInterface ()
 virtual destructor (empty)
 

Protected Attributes

const double tol_
 
std::vector< double > errors_
 
const bool verbose_
 

Detailed Description

PID controller based adaptive time step control as suggested in: Turek and Kuzmin.

Algebraic Flux Correction III. Incompressible Flow Problems. Uni Dortmund.

See also: D. Kuzmin and S.Turek. Numerical simulation of turbulent bubbly flows. Techreport Uni Dortmund. 2004

and the original article: Valli, Coutinho, and Carey. Adaptive Control for Time Step Selection in Finite Element Simulation of Coupled Viscous Flow and Heat Transfer. Proc of the 10th International Conference on Numerical Methods in Fluids. 1998.

Constructor & Destructor Documentation

◆ PIDTimeStepControl()

Opm::PIDTimeStepControl::PIDTimeStepControl ( const double  tol = 1e-3,
const bool  verbose = false 
)

constructor

Parameters
toltolerance for the relative changes of the numerical solution to be accepted in one time step (default is 1e-3)
verboseif true get some output (default = false)

Member Function Documentation

◆ computeTimeStepSize()

double Opm::PIDTimeStepControl::computeTimeStepSize ( const double  dt,
const int  ,
const RelativeChangeInterface relativeChange,
const double   
) const
virtual

compute new time step size suggestions based on the PID controller

Parameters
dttime step size used in the current step
iterationsnumber of iterations used (linear/nonlinear)
timeErrorobject to compute || u^n+1 - u^n || / || u^n+1 ||
Returns
suggested time step size for the next step

Implements Opm::TimeStepControlInterface.

Reimplemented in Opm::PIDAndIterationCountTimeStepControl.


The documentation for this class was generated from the following files: