# DtLessThanMin while err estimate = 1.65e-10

**URL:** <https://discourse.julialang.org/t/dtlessthanmin-while-err-estimate-1-65e-10/104120>\
**Category:** Modelling & Simulations\
**Created:** [September 21, 2023, 7:45pm UTC](https://discourse.julialang.org/t/dtlessthanmin-while-err-estimate-1-65e-10/104120 "2023-09-21T19:45:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cuihantao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cuihantao/32/8783_2.png) [@cuihantao](https://discourse.julialang.org/u/cuihantao)\
**Post date:** [September 21, 2023, 7:45pm UTC](https://discourse.julialang.org/t/dtlessthanmin-while-err-estimate-1-65e-10/104120/1 "2023-09-21T19:45:46Z")

</div>

I was troubleshooting a mass-matrix ODE model for nonconvergence due to `DtLessThanMin`.

It turns out that, with a set of properly initialized nonlinear algebraic equations (i.e., the mass matrix is all zero), OrdinaryDiffEq solvers will fail when a parameter change is applied at an arbitrary time using `DiscreteCallback`.

The warning message shows that the estimated error is tiny compared with 1:

```julia
┌ Warning: dt(1.7763568394002505e-15) <= dtmin(1.7763568394002505e-15) at
│ t=1.0, and step error estimate = 1.654973077755173e-10. Aborting. There is
│ either an error in your model specification or the true solution is
│ unstable.
└ @ SciMLBase 

```

But according to [timestepping](https://docs.sciml.ai/DiffEqDocs/stable/extras/timestepping/), the step should be accepted because the error is less than one.

Question: Why is this step with such a small error not accepted? Do value jumps in algebraic variables impact the scaled error?

* * *

I then tried to apply the same parameter change at time `t=0`. With the same initial condition, OrdinaryDiffEq can successfully solve the system. At least, this verifies the algebraic system after parameter change is solvable.

Question: Is it because, for the very first step, the error is not checked?

I don’t have an MWE yet but would like to ask in case I missed something obvious.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [September 25, 2023, 12:01pm UTC](https://discourse.julialang.org/t/dtlessthanmin-while-err-estimate-1-65e-10/104120/2 "2023-09-25T12:01:09Z")

</div>

Can you make an MWE? Did you set a tstop some time very shortly in the future?

---

<div class="post-metadata">

**Author:** ![cuihantao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cuihantao/32/8783_2.png) [@cuihantao](https://discourse.julialang.org/u/cuihantao)\
**Post date:** [September 30, 2023, 1:35am UTC](https://discourse.julialang.org/t/dtlessthanmin-while-err-estimate-1-65e-10/104120/3 "2023-09-30T01:35:15Z")

</div>

Thank you for your reply! It could be a problem with my model spec. I’m still working on it.
