General 3rd order controller.
More...
#include <TimeStepControl.hpp>
|
| | General3rdOrderController (const double tolerance, const double safetyFactor, const bool rejectCompletedStep, const std::string &toleranceTestVersion, const double maxReductionTimeStep, const std::string ¶meters, const bool verbose) |
| | constructor More...
|
| |
| double | computeTimeStepSize (const double dt, const int, const RelativeChangeInterface &, const AdaptiveSimulatorTimer &substepTimer) const override |
| | compute new time step size suggestions based on the PID controller More...
|
| |
|
double | timeStepFactor (const std::array< double, 3 > &errors, const std::array< double, 3 > &timeSteps) const |
| |
|
bool | timeStepAccepted (const double error, const double timeStepJustCompleted) 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 General3rdOrderController &) const |
| |
|
virtual | ~TimeStepControlInterface () |
| | virtual destructor (empty)
|
| |
|
|
static constexpr TimeStepControlType | Type = TimeStepControlType::General3rdOrder |
| |
|
|
const double | tolerance_ = 0.1 |
| |
|
const double | safetyFactor_ = 0.8 |
| |
|
const bool | rejectCompletedStep_ = false |
| |
|
std::array< double, 3 > | errors_ {} |
| |
|
std::array< double, 3 > | timeSteps_ {} |
| |
|
std::array< double, 3 > | beta_ {0.125, 0.25, 0.125} |
| |
|
std::array< double, 2 > | alpha_ {0.75, 0.25} |
| |
|
InternalControlVersions | controllerVersion_ {InternalControlVersions::IController} |
| |
|
ToleranceTestVersions | toleranceTestVersion_ {ToleranceTestVersions::Standard} |
| |
|
const double | maxReductionTimeStep_ = 0.1 |
| |
|
const bool | verbose_ = false |
| |
General 3rd order controller.
◆ General3rdOrderController()
| Opm::General3rdOrderController::General3rdOrderController |
( |
const double |
tolerance, |
|
|
const double |
safetyFactor, |
|
|
const bool |
rejectCompletedStep, |
|
|
const std::string & |
toleranceTestVersion, |
|
|
const double |
maxReductionTimeStep, |
|
|
const std::string & |
parameters, |
|
|
const bool |
verbose |
|
) |
| |
constructor
- Parameters
-
| tolerance | tolerance for the relative changes of the numerical solution to be accepted in one time step |
| safetyFactor | multiplied with tolerance to ensure that target relative change is lower than tolerance |
| rejectCompletedStep | if true, discard the recently completed time step and try again |
| toleranceTestVersion | the test used to decide if a time step should be rejected |
| maxReductionTimeStep | limits the reduction in time step size for control error filtering |
| parameters | parameter values for the controller formula |
| verbose | if true, get some output |
◆ computeTimeStepSize()
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
Implements Opm::TimeStepControlInterface.
The documentation for this class was generated from the following files:
- opm/simulators/timestepping/TimeStepControl.hpp
- opm/simulators/timestepping/TimeStepControl.cpp