21#ifndef OPM_TIMESTEPCONTROL_HEADER_INCLUDED
22#define OPM_TIMESTEPCONTROL_HEADER_INCLUDED
24#include <opm/simulators/timestepping/TimeStepControlInterface.hpp>
25#include <opm/simulators/timestepping/AdaptiveSimulatorTimer.hpp>
32 enum class TimeStepControlType {
48 static constexpr TimeStepControlType Type = TimeStepControlType::SimpleIterationCount;
69 template<
class Serializer>
81 const int target_iterations_ = 0;
82 const double decayrate_ = 0.0;
83 const double growthrate_ = 0.0;
84 const bool verbose_ =
false;
104 static constexpr TimeStepControlType Type = TimeStepControlType::PID;
120 template<
class Serializer>
131 const double tol_ = 1
e-3;
132 mutable std::vector< double > errors_{};
134 const bool verbose_ =
false;
147 static constexpr TimeStepControlType Type = TimeStepControlType::PIDAndIterationCount;
157 const double tol = 1
e-3,
165 const int iterations,
169 template<
class Serializer>
182 const int target_iterations_;
183 const double decayDampingFactor_;
184 const double growthDampingFactor_;
185 const double minTimeStepBasedOnIterations_;
196 static constexpr TimeStepControlType Type = TimeStepControlType::General3rdOrder;
209 template<
class Serializer>
223 const double tolerance_ = 1
e-3;
224 const double safetyFactor_ = 0.8;
225 mutable std::vector<double> errors_{};
226 mutable std::vector<double> timeSteps_{};
227 mutable int counterSinceFailure_ = 0;
228 const bool verbose_ =
false;
243 static constexpr TimeStepControlType Type = TimeStepControlType::HardCodedTimeStep;
258 template<
class Serializer>
268 std::vector<double> subStepTime_;
Simulation timer for adaptive time stepping.
Definition AdaptiveSimulatorTimer.hpp:41
General 3rd order controller.
Definition TimeStepControl.hpp:194
double computeTimeStepSize(const double dt, const int, const RelativeChangeInterface &relativeChange, const AdaptiveSimulatorTimer &substepTimer) const override
compute new time step size suggestions based on the PID controller
Definition TimeStepControl.cpp:312
HardcodedTimeStepControl Input generated from summary file using the ert application:
Definition TimeStepControl.hpp:241
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
Definition TimeStepControl.cpp:139
PID controller based adaptive time step control as above that also takes an target iteration into acc...
Definition TimeStepControl.hpp:144
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
Definition TimeStepControl.cpp:254
PID controller based adaptive time step control as suggested in: Turek and Kuzmin.
Definition TimeStepControl.hpp:102
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
Definition TimeStepControl.cpp:175
RelativeChangeInterface.
Definition TimeStepControlInterface.hpp:34
A simple iteration count based adaptive time step control.
Definition TimeStepControl.hpp:46
double computeTimeStepSize(const double dt, const int iterations, const RelativeChangeInterface &, const AdaptiveSimulatorTimer &) const override
compute new time step size suggestions based on the PID controller
Definition TimeStepControl.cpp:78
TimeStepControlInterface.
Definition TimeStepControlInterface.hpp:51
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242