OpenModelica / OMSimulator

The OpenModelica FMI & SSP-based co-simulation environment.
Other
72 stars 51 forks source link

Solutions to intermediate evaluation by CVODE are leaking to algebraic loop solutions #1333

Open rruusu opened 3 weeks ago

rruusu commented 3 weeks ago

Description

The initial guesses for each algebraic loop evaluation are not based on the end of the last solver step. Instead, the initial guess is based on whatever result was last obtained by the previous RHS evaluation of the ODEs, which might be related to a trial step in Jacobian evaluation using difference quotient steps.

This results in both unnecessary noise to inputs in algebraic loops, as well as possible extra iterations.

Version and OS

rruusu commented 3 weeks ago

I will push a solution for this to my fork shortly.