PID controller based adaptive time step control as above that also takes an target iteration into account.
More...
#include <TimeStepControl.hpp>
|
| PIDAndIterationCountTimeStepControl (const int target_iterations=20, const double decayDampingFactor=1.0, const double growthDampingFactor=1.0/1.2, const double tol=1e-3, const double minTimeStepBasedOnIterations=0., const bool verbose=false) |
| constructor
|
|
double | computeTimeStepSize (const double dt, const int iterations, const RelativeChangeInterface &relativeChange, const double) const |
| compute new time step size suggestions based on the PID controller
|
|
template<class Serializer > |
void | serializeOp (Serializer &serializer) |
|
bool | operator== (const PIDAndIterationCountTimeStepControl &) const |
|
| PIDTimeStepControl (const double tol=1e-3, const bool verbose=false) |
| constructor
|
|
double | computeTimeStepSize (const double dt, const int, const RelativeChangeInterface &relativeChange, const double) const |
| compute new time step size suggestions based on the PID controller
|
|
template<class Serializer > |
void | serializeOp (Serializer &serializer) |
|
bool | operator== (const PIDTimeStepControl &) const |
|
virtual | ~TimeStepControlInterface () |
| virtual destructor (empty)
|
|
|
static constexpr TimeStepControlType | Type = TimeStepControlType::PIDAndIterationCount |
|
static constexpr TimeStepControlType | Type = TimeStepControlType::PID |
|
|
const int | target_iterations_ |
|
const double | decayDampingFactor_ |
|
const double | growthDampingFactor_ |
|
const double | minTimeStepBasedOnIterations_ |
|
const double | tol_ = 1e-3 |
|
std::vector< double > | errors_ {} |
|
const bool | verbose_ = false |
|
PID controller based adaptive time step control as above that also takes an target iteration into account.
◆ PIDAndIterationCountTimeStepControl()
Opm::PIDAndIterationCountTimeStepControl::PIDAndIterationCountTimeStepControl |
( |
const int |
target_iterations = 20 , |
|
|
const double |
decayDampingFactor = 1.0 , |
|
|
const double |
growthDampingFactor = 1.0/1.2 , |
|
|
const double |
tol = 1e-3 , |
|
|
const double |
minTimeStepBasedOnIterations = 0. , |
|
|
const bool |
verbose = false |
|
) |
| |
constructor
- Parameters
-
target_iterations | number of desired iterations per time step |
tol | tolerance for the relative changes of the numerical solution to be accepted in one time step (default is 1e-3) |
verbose | if true get some output (default = false) |
◆ computeTimeStepSize()
double Opm::PIDAndIterationCountTimeStepControl::computeTimeStepSize |
( |
const double |
dt, |
|
|
const int |
iterations, |
|
|
const RelativeChangeInterface & |
relativeChange, |
|
|
const double |
simulationTimeElapsed |
|
) |
| const |
|
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) |
timeError | object to compute || u^n+1 - u^n || / || u^n+1 || |
- Returns
- suggested time step size for the next 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