AdaptiveTimeStepping.hpp
Go to the documentation of this file.
128 , maxTimeStep_(Parameters::Get<Parameters::SolverMaxTimeStepInDays<Scalar>>() * 24 * 60 * 60) // 365.25
129 , minTimeStep_(unitSystem.to_si(UnitSystem::measure::time, Parameters::Get<Parameters::SolverMinTimeStep<Scalar>>())) // 1e-12;
130 , ignoreConvergenceFailure_(Parameters::Get<Parameters::SolverContinueOnConvergenceFailure>()) // false;
134 , suggestedNextTimestep_((max_next_tstep <= 0 ? Parameters::Get<Parameters::InitialTimeStepInDays>() : max_next_tstep) * 24 * 60 * 60) // 1.0
136 , timestepAfterEvent_(Parameters::Get<Parameters::TimeStepAfterEventInDays<Scalar>>() * 24 * 60 * 60) // 1e30
138 , minTimeStepBeforeShuttingProblematicWells_(Parameters::Get<Parameters::MinTimeStepBeforeShuttingProblematicWellsInDays>() * unit::day)
163 , suggestedNextTimestep_(max_next_tstep <= 0 ? Parameters::Get<Parameters::InitialTimeStepInDays>() * 24 * 60 * 60 : max_next_tstep) // 1.0
167 , minTimeStepBeforeShuttingProblematicWells_(Parameters::Get<Parameters::MinTimeStepBeforeShuttingProblematicWellsInDays>() * unit::day)
240 OpmLog::debug("Overall linear iterations used: " + std::to_string(substepReport.total_linear_iterations));
420 std::set<std::string> failing_wells = detail::consistentlyFailingWells(solver.model().stepReports());
428 bool was_shut = solver.model().wellModel().forceShutWellByName(well, substepTimer.simulationTimeElapsed());
461 ss << "Suggested next step size = " << unit::convert::to(suggestedNextTimestep_, unit::day) << " (days)" << std::endl;
492 // \Note Only update next suggested step if TSINIT was explicitly set in TUNING or NEXTSTEP is active.
646 const double decayDampingFactor = Parameters::Get<Parameters::TimeStepControlDecayDampingFactor>(); // 1.0
647 const double growthDampingFactor = Parameters::Get<Parameters::TimeStepControlGrowthDampingFactor>(); // 3.2
648 timeStepControl_ = std::make_unique<PIDAndIterationCountTimeStepControl>(iterations, decayDampingFactor, growthDampingFactor, tol);
652 const int iterations = Parameters::Get<Parameters::TimeStepControlTargetNewtonIterations>(); // 8
653 const double decayDampingFactor = Parameters::Get<Parameters::TimeStepControlDecayDampingFactor>(); // 1.0
654 const double growthDampingFactor = Parameters::Get<Parameters::TimeStepControlGrowthDampingFactor>(); // 3.2
655 const double nonDimensionalMinTimeStepIterations = Parameters::Get<Parameters::MinTimeStepBasedOnNewtonIterations>(); // 0.0 by default
657 double minTimeStepReducedByIterations = unitSystem.to_si(UnitSystem::measure::time, nonDimensionalMinTimeStepIterations);
658 timeStepControl_ = std::make_unique<PIDAndIterationCountTimeStepControl>(iterations, decayDampingFactor,
667 timeStepControl_ = std::make_unique<SimpleIterationCountTimeStepControl>(iterations, decayrate, growthrate);
671 const int iterations = Parameters::Get<Parameters::TimeStepControlTargetNewtonIterations>(); // 8
674 timeStepControl_ = std::make_unique<SimpleIterationCountTimeStepControl>(iterations, decayrate, growthrate);
679 const std::string filename = Parameters::Get<Parameters::TimeStepControlFileName>(); // "timesteps"
Defines a type tags and some fundamental properties all models. Simulation timer for adaptive time stepping. Definition: AdaptiveSimulatorTimer.hpp:41 Definition: AdaptiveTimeStepping.hpp:90 double minTimeStep_ minimal allowed time step size before throwing Definition: AdaptiveTimeStepping.hpp:699 double suggestedNextTimestep_ suggested size of next timestep Definition: AdaptiveTimeStepping.hpp:704 bool solverVerbose_ solver verbosity Definition: AdaptiveTimeStepping.hpp:702 void init_(const UnitSystem &unitSystem) Definition: AdaptiveTimeStepping.hpp:634 void setSuggestedNextStep(const double x) Definition: AdaptiveTimeStepping.hpp:477 double suggestedNextStep() const Returns the simulator report for the failed substeps of the last report step. Definition: AdaptiveTimeStepping.hpp:474 double growthFactor_ factor to multiply time step when solver recovered from failed convergence Definition: AdaptiveTimeStepping.hpp:696 AdaptiveTimeStepping(const UnitSystem &unitSystem, const double max_next_tstep=-1.0, const bool terminalOutput=true) contructor taking parameter object Definition: AdaptiveTimeStepping.hpp:121 void serializeOp(Serializer &serializer) Definition: AdaptiveTimeStepping.hpp:499 void updateTUNING(double max_next_tstep, const Tuning &tuning) Definition: AdaptiveTimeStepping.hpp:480 static void registerParameters() Definition: AdaptiveTimeStepping.hpp:172 TimeStepController timeStepControl_ time step control object Definition: AdaptiveTimeStepping.hpp:694 static AdaptiveTimeStepping< TypeTag > serializationTestObjectSimple() Definition: AdaptiveTimeStepping.hpp:547 bool fullTimestepInitially_ beginning with the size of the time step from data file Definition: AdaptiveTimeStepping.hpp:705 AdaptiveTimeStepping(double max_next_tstep, const Tuning &tuning, const UnitSystem &unitSystem, const bool terminalOutput=true) contructor taking parameter object Definition: AdaptiveTimeStepping.hpp:149 std::unique_ptr< TimeStepControlInterface > TimeStepController Definition: AdaptiveTimeStepping.hpp:691 double timestepAfterEvent_ suggested size of timestep after an event Definition: AdaptiveTimeStepping.hpp:706 bool useNewtonIteration_ use newton iteration count for adaptive time step control Definition: AdaptiveTimeStepping.hpp:707 bool timestepVerbose_ timestep verbosity Definition: AdaptiveTimeStepping.hpp:703 int solverRestartMax_ how many restart of solver are allowed Definition: AdaptiveTimeStepping.hpp:701 TimeStepControlType timeStepControlType_ type of time step control object Definition: AdaptiveTimeStepping.hpp:693 double minTimeStepBeforeShuttingProblematicWells_ Definition: AdaptiveTimeStepping.hpp:708 bool operator==(const AdaptiveTimeStepping< TypeTag > &rhs) Definition: AdaptiveTimeStepping.hpp:552 SimulatorReport step(const SimulatorTimer &simulatorTimer, Solver &solver, const bool isEvent, const std::vector< int > *fipnum=nullptr, const std::function< bool()> tuningUpdater=[](){return false;}) step method that acts like the solver::step method in a sub cycle of time steps Definition: AdaptiveTimeStepping.hpp:184 static AdaptiveTimeStepping< TypeTag > serializationTestObjectPIDIt() Definition: AdaptiveTimeStepping.hpp:542 void updateNEXTSTEP(double max_next_tstep) Definition: AdaptiveTimeStepping.hpp:490 AdaptiveTimeStepping()=default bool ignoreConvergenceFailure_ continue instead of stop when minimum time step is reached Definition: AdaptiveTimeStepping.hpp:700 double maxTimeStep_ maximal allowed time step size in days Definition: AdaptiveTimeStepping.hpp:698 static AdaptiveTimeStepping< TypeTag > serializationTestObjectHardcoded() Definition: AdaptiveTimeStepping.hpp:532 double restartFactor_ factor to multiply time step with when solver fails to converge Definition: AdaptiveTimeStepping.hpp:695 double maxGrowth_ factor that limits the maximum growth of a time step Definition: AdaptiveTimeStepping.hpp:697 static AdaptiveTimeStepping< TypeTag > serializationTestObjectPID() Definition: AdaptiveTimeStepping.hpp:537 Definition: TimeStepControlInterface.hpp:32 Definition: SimulatorTimer.hpp:39 double currentStepLength() const override Definition: blackoilnewtonmethodparams.hpp:31 auto Get(bool errorIfNotRegistered=true) Retrieve a runtime parameter. Definition: parametersystem.hpp:185 void logTimer(const AdaptiveSimulatorTimer &substepTimer) void registerAdaptiveParameters() std::set< std::string > consistentlyFailingWells(const std::vector< StepReport > &sr) Definition: blackoilboundaryratevector.hh:37 typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(.... Definition: propertysystem.hh:235 std::string to_string(const ConvergenceReport::ReservoirFailure::Type t) @ PIDAndIterationCount @ SimpleIterationCount @ HardCodedTimeStep This file provides the infrastructure to retrieve run-time parameters. The Opm property system, traits with inheritance. Definition: AdaptiveTimeStepping.hpp:57 static constexpr bool value Definition: AdaptiveTimeStepping.hpp:57 Definition: AdaptiveTimeStepping.hpp:56 static constexpr double value Definition: AdaptiveTimeStepping.hpp:56 Definition: AdaptiveTimeStepping.hpp:68 static constexpr double value Definition: AdaptiveTimeStepping.hpp:68 Definition: AdaptiveTimeStepping.hpp:67 static constexpr double value Definition: AdaptiveTimeStepping.hpp:67 Definition: AdaptiveTimeStepping.hpp:52 static constexpr bool value Definition: AdaptiveTimeStepping.hpp:52 Definition: AdaptiveTimeStepping.hpp:53 static constexpr int value Definition: AdaptiveTimeStepping.hpp:53 Definition: AdaptiveTimeStepping.hpp:54 static constexpr int value Definition: AdaptiveTimeStepping.hpp:54 Definition: AdaptiveTimeStepping.hpp:64 static constexpr double value Definition: AdaptiveTimeStepping.hpp:64 Definition: AdaptiveTimeStepping.hpp:62 static constexpr double value Definition: AdaptiveTimeStepping.hpp:62 Definition: AdaptiveTimeStepping.hpp:66 static constexpr auto value Definition: AdaptiveTimeStepping.hpp:66 Definition: AdaptiveTimeStepping.hpp:65 static constexpr double value Definition: AdaptiveTimeStepping.hpp:65 Definition: AdaptiveTimeStepping.hpp:63 static constexpr double value Definition: AdaptiveTimeStepping.hpp:63 Definition: AdaptiveTimeStepping.hpp:58 static constexpr auto value Definition: AdaptiveTimeStepping.hpp:58 Definition: AdaptiveTimeStepping.hpp:60 static constexpr int value Definition: AdaptiveTimeStepping.hpp:60 Definition: AdaptiveTimeStepping.hpp:61 static constexpr int value Definition: AdaptiveTimeStepping.hpp:61 Definition: AdaptiveTimeStepping.hpp:59 static constexpr double value Definition: AdaptiveTimeStepping.hpp:59 Definition: AdaptiveTimeStepping.hpp:55 static constexpr int value Definition: AdaptiveTimeStepping.hpp:55 Definition: SimulatorReport.hpp:100 double output_write_time Definition: SimulatorReport.hpp:45 Definition: ConvergenceReport.hpp:338 |