diff --git a/CHANGELOG.md b/CHANGELOG.md index 76f645cea6..7f210c13cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Features -- Reformatted Getting Starte notebooks ([#1083](https://github.com/pybamm-team/PyBaMM/pull/1083)) +- Reformatted Getting Started notebooks ([#1083](https://github.com/pybamm-team/PyBaMM/pull/1083)) - Reformatted Landesfeind electrolytes ([#1064](https://github.com/pybamm-team/PyBaMM/pull/1064)) - Adapted examples to be run in Google Colab ([#1061](https://github.com/pybamm-team/PyBaMM/pull/1061)) - Added some new solvers for algebraic models ([#1059](https://github.com/pybamm-team/PyBaMM/pull/1059)) @@ -12,6 +12,8 @@ ## Optimizations +- Reformatted CasADi "safe" mode to deal with events better ([#1089](https://github.com/pybamm-team/PyBaMM/pull/1089)) + ## Bug fixes - 2D processed variables can now be evaluated at the domain boundaries ([#1088](https://github.com/pybamm-team/PyBaMM/pull/1088)) diff --git a/pybamm/solvers/casadi_solver.py b/pybamm/solvers/casadi_solver.py index 96cb48ee51..03b515bb50 100644 --- a/pybamm/solvers/casadi_solver.py +++ b/pybamm/solvers/casadi_solver.py @@ -152,8 +152,7 @@ def _integrate(self, model, t_eval, inputs=None): dt_max = self.dt_max / model.timescale_eval else: # t_f is the dimensionless final time (scaled with the timescale) - # Keeping a safe factor of 0.01 but could potentially be bigger - dt_max = 0.01 * min(1, t_f) + dt_max = 0.1 * min(1, t_f) dt_eval_max = np.max(np.diff(t_eval)) * 1.01 dt_max = np.max([dt_max, dt_eval_max]) while t < t_f: