#include <TimeStepControl.hpp>

Inheritance diagram for Opm::PIDTimeStepControl:
Inheritance graph

Public Member Functions

 PIDTimeStepControl (const double tol=1e-3, const boost::any &pinfo=boost::any(), const bool verbose=false)
 constructor More...
 
void initialize (const SimulatorState &state)
 
double computeTimeStepSize (const double dt, const int, const SimulatorState &state) const
 

Protected Member Functions

template<class Iterator >
double euclidianNormSquared (Iterator it, const Iterator end, int num_components=1) const
 

Protected Attributes

std::vector< double > p0_
 
std::vector< double > sat0_
 
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

Opm::PIDTimeStepControl::PIDTimeStepControl ( const double  tol = 1e-3,
const boost::any &  pinfo = boost::any(),
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) pinfo The information about the parallel information. Needed to compute parallel scalarproducts.
verboseif true get some output (default = false)

Member Function Documentation

double Opm::PIDTimeStepControl::computeTimeStepSize ( const double  dt,
const int  ,
const SimulatorState state 
) 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)
statenew solution state
Returns
suggested time step size for the next step

Implements Opm::TimeStepControlInterface.

Reimplemented in Opm::PIDAndIterationCountTimeStepControl.

template<class Iterator >
double Opm::PIDTimeStepControl::euclidianNormSquared ( Iterator  it,
const Iterator  end,
int  num_components = 1 
) const
inlineprotected
void Opm::PIDTimeStepControl::initialize ( const SimulatorState state)
virtual

Parameters
statesimulation state before computing update in the solver (default is empty)

Reimplemented from Opm::TimeStepControlInterface.

Member Data Documentation

std::vector< double > Opm::PIDTimeStepControl::errors_
mutableprotected
std::vector<double> Opm::PIDTimeStepControl::p0_
mutableprotected
std::vector<double> Opm::PIDTimeStepControl::sat0_
mutableprotected
const double Opm::PIDTimeStepControl::tol_
protected
const bool Opm::PIDTimeStepControl::verbose_
protected

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