|
opm-simulators
|
General 3rd order controller. More...
#include <TimeStepControl.hpp>
Public Member Functions | |
| 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 | |
| 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 | |
| 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 |
Public Member Functions inherited from Opm::TimeStepControlInterface | |
| virtual | ~TimeStepControlInterface () |
| virtual destructor (empty) | |
Static Public Member Functions | |
| static General3rdOrderController | serializationTestObject () |
Static Public Attributes | |
| static constexpr TimeStepControlType | Type = TimeStepControlType::General3rdOrder |
Protected Attributes | |
| 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.
| 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
| 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 |
|
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 |
Implements Opm::TimeStepControlInterface.
|
overridevirtual |
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.