Jack
Jack

Reputation: 1232

Error during simulation using Newton solver in Dymola but end with success

I meet an error of using newton solver to solve nonlinear equation in Dymola, but the simulation ends with success, just like another question here,
my question is:
In the list of solvers, there is no newton solver, why would Dymola use newton solver? Does Dymola choose dassal solver only when newton solver doesn't work?

enter image description here

Upvotes: 0

Views: 670

Answers (1)

Markus A.
Markus A.

Reputation: 7525

Implicit solvers need to iterate to find a solution, as they use unknown variables to estimate the result. These variables are estimated first and then verified using a residual equation. This iteration needs to be done in every solver-step and is often done with Newton-iteration, as this promises good performance (some slide-deck on this, and the full lecture). One disadvantage of the Newton-iteration is, that it can fail given strong non-linearity or sub-optimal guess values. This is the reason for the error message stating, that better "start values" should be provided.

What solvers can do, is switching from the good-performing but not always stable Newton-iteration to something slower, but more robust like bi-section. In Dymola this will give you a warning (unfortunately logged as an ERROR), but the simulation continues. So your model is hard to handle, but the solver can still do it with some extra-work.

Providing better start values seems difficult in your case, as this happens during the simulation and not at the start (although there were messages of the same type before the one you show, with the first one providing more information). Therefore it seems the solver itself estimates a value far off, or an event has happened at that time, interrupting and re-starting the solver. It is probably worth testing the options provided here.

If you want to get rid of the Newton-Iteration, you would need to choose an explicit solver (e.g. Euler, Rkfix, Dopri in Dymola). But likely you will need very small steps to successfully simulate the model - making the simulation slow.

Upvotes: 4

Related Questions