Loading...
Searching...
No Matches
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:

## Public Member Functions

| PIDTimeStepControl (const double tol, const bool verbose)
| constructor
double | computeTimeStepSize (const double dt, const int, const RelativeChangeInterface &relativeChange, const AdaptiveSimulatorTimer &) const override
| compute new time step size suggestions based on the PID controller
bool | timeStepAccepted (const double, const double) const override
| For the general 3rd order controller, the internal shifting of errors and time steps happens here, and hence this method needs to be called for (after) each time step.
template<class Serializer>
void | serializeOp (Serializer &serializer)
bool | operator== (const PIDTimeStepControl &) const
Public Member Functions inherited from Opm::TimeStepControlInterface
virtual | ~TimeStepControlInterface ()
| virtual destructor (empty)

## Static Public Member Functions

static PIDTimeStepControl | serializationTestObject ()

## Static Public Attributes

static constexpr TimeStepControlType | Type = TimeStepControlType::PID

## Protected Attributes

const double | tol_ = 0.1
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,
|  | const bool | verbose )

constructor

Parameters

  tol | tolerance for the relative changes of the numerical solution to be accepted in one time step
  verbose | if true, get some output

## Member Function Documentation

## computeTimeStepSize()

double Opm::PIDTimeStepControl::computeTimeStepSize | ( | const double | dt,
|  | const int | ,
|  | const RelativeChangeInterface & | relativeChange,
|  | const AdaptiveSimulatorTimer & | ) const

override virtual

compute new time step size suggestions based on the PID controller

Parameters

  dt | time step size used in the current step
  iterations | number of iterations used (linear/nonlinear)
  relativeChange | Relative change handler
  substepTimer | Sub step timer

Returns
  suggested time step size for the next step

Parameters

  dt | Time step length
  relativeChange | Relative change handler

Implements Opm::TimeStepControlInterface.

## timeStepAccepted()

bool Opm::PIDTimeStepControl::timeStepAccepted | ( | const double | error,
|  | const double | timeStepJustCompleted ) const

inline override virtual

For the general 3rd order controller, the internal shifting of errors and time steps happens here, and hence this method needs to be called for (after) each time step.

Implements Opm::TimeStepControlInterface.

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

- opm/simulators/timestepping/TimeStepControl.hpp
- opm/simulators/timestepping/TimeStepControl.cpp