#include <TimeStepControl.hpp>

Inheritance diagram for Opm::PIDTimeStepControl:
Inheritance graph

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
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
bool operator== (const PIDTimeStepControl &) const
 

Static Public Member Functions

static PIDTimeStepControl serializationTestObject ()
 

Static Public Attributes

static constexpr TimeStepControlType Type = TimeStepControlType::PID
 

Protected Attributes

const double tol_ = 1e-3
 
std::vector< double > errors_ {}
 
const bool verbose_ = false
 

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.

◆ operator==()

bool Opm::PIDTimeStepControl::operator== ( const PIDTimeStepControl ) const

◆ serializationTestObject()

static PIDTimeStepControl Opm::PIDTimeStepControl::serializationTestObject ( )
static

◆ serializeOp()

template<class Serializer >
void Opm::PIDTimeStepControl::serializeOp ( Serializer &  serializer)
inline

References errors_, tol_, and verbose_.

Member Data Documentation

◆ errors_

std::vector< double > Opm::PIDTimeStepControl::errors_ {}
mutableprotected

Referenced by serializeOp().

◆ tol_

const double Opm::PIDTimeStepControl::tol_ = 1e-3
protected

Referenced by serializeOp().

◆ Type

constexpr TimeStepControlType Opm::PIDTimeStepControl::Type = TimeStepControlType::PID
staticconstexpr

◆ verbose_

const bool Opm::PIDTimeStepControl::verbose_ = false
protected

Referenced by serializeOp().


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