|
opm-simulators
|
PID controller based adaptive time step control as above that also takes target iterations into account. More...
#include <TimeStepControl.hpp>
Public Member Functions | |
| PIDAndIterationCountTimeStepControl (const int target_iterations, const double decayDampingFactor, const double growthDampingFactor, const double tol, const double minTimeStepBasedOnIterations, const bool verbose) | |
| constructor | |
| double | computeTimeStepSize (const double dt, const int iterations, 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 PIDAndIterationCountTimeStepControl &) const |
Public Member Functions inherited from Opm::PIDTimeStepControl | |
| 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 PIDAndIterationCountTimeStepControl | serializationTestObject () |
Static Public Member Functions inherited from Opm::PIDTimeStepControl | |
| static PIDTimeStepControl | serializationTestObject () |
Static Public Attributes | |
| static constexpr TimeStepControlType | Type = TimeStepControlType::PIDAndIterationCount |
Static Public Attributes inherited from Opm::PIDTimeStepControl | |
| static constexpr TimeStepControlType | Type = TimeStepControlType::PID |
Protected Attributes | |
| const int | target_iterations_ = 8 |
| const double | decayDampingFactor_ = 1.0 |
| const double | growthDampingFactor_ = 3.2 |
| const double | minTimeStepBasedOnIterations_ = 0.0 |
| const bool | verbose_ = false |
Protected Attributes inherited from Opm::PIDTimeStepControl | |
| const double | tol_ = 0.1 |
| std::vector< double > | errors_ {} |
| const bool | verbose_ = false |
PID controller based adaptive time step control as above that also takes target iterations into account.
| Opm::PIDAndIterationCountTimeStepControl::PIDAndIterationCountTimeStepControl | ( | const int | target_iterations, |
| const double | decayDampingFactor, | ||
| const double | growthDampingFactor, | ||
| const double | tol, | ||
| const double | minTimeStepBasedOnIterations, | ||
| const bool | verbose | ||
| ) |
constructor
| target_iterations | number of desired iterations per time step |
| decayDampingFactor | limiting the decrease in time step if iteration count was high |
| growthDampingFactor | limiting the increase in time step if iteration count was low |
| tol | tolerance for the relative changes of the numerical solution to be accepted in one time step |
| minTimeStepBasedOnIterations | time step suggestion from target iterations should not be below this |
| verbose | if true, get some output |
|
overridevirtual |
compute new time step size suggestions based on the PID controller
| dt | time step size used in the current step |
| iterations | number of iterations used (linear/nonlinear) |
| relativeChange | Relative change handler |
| substepTimer | Sub step timer |
| dt | Time step length |
| iterations | Number of iterations used |
| relativeChange | Relative change handler |
Implements Opm::TimeStepControlInterface.
|
inlineoverridevirtual |
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.