From ecc3c5557d69cde4f016b701e6e20664378e2993 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Wed, 22 Jan 2025 10:28:02 +0100 Subject: [PATCH] Dont reset subtimestep from tuning/wcycle if time step is chopped due to convergence issues --- opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp b/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp index 4e113fe5e..7364ec93c 100644 --- a/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp +++ b/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp @@ -749,7 +749,11 @@ run() // sub step time loop while (!this->substep_timer_.done()) { - maybeUpdateTuningAndTimeStep_(); + // if we just chopped the timestep due to convergence i.e. restarts>0 + // we dont what to update the next timestep based on Tuning + if (restarts == 0) { + maybeUpdateTuningAndTimeStep_(); + } const double dt = this->substep_timer_.currentStepLength(); if (timeStepVerbose_()) { detail::logTimer(this->substep_timer_);