﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5328	ODE solver behaves erratically in two MultiBody examples with dynamic state selection	Francesco Casella	Karim Adbdelhak	"Steps to reproduce:
- set {{{-d=newInst,stateselection}}}
- simulate {{{Modelica.Mechanics.MultiBody.Examples.Elementary.SpringDamperSystem}}}

The simulation terminates successfully, but the solver statistics and the fairly long simulation time point to some issue with the solver
{{{
solver: dassl
53347 steps taken
139199 calls of functionODE
76637 evaluations of jacobian
  394 error test failures
25259 convergence test failures
4.2913s time of jacobian evaluation
}}}
Most importantly, if you cross-check {{{body1.w_a[3]}}} and its derivative, they are definitely not consistent with each other until about time = 2.4; afterwards, they seem more in synch with each other, at first sight.

This is strange, because the state selection includes {{{body1.w_a[3]}}} as a state, so the relationship among the two should be derivative/integral, with a relative tolerance of less than 1e-6. If you reduce the tolerance to 1e-7, the shape of the state curve changes, but it remains inconsistent with the derivative during the first two and a half seconds.

Maybe the indication of the state selection is incorrect, and what I am seeing is a wrongly computed dummy derivative. The reported state selection is the expected one, maybe the solver is doing something else in the background.

This problem does not show up if the old frontend is used to flatten the model, and I am currently investigating what is the difference among the two. Nevertheless, this kind of things should never happen anyway."	defect	new	blocker	1.19.0	Run-time	v1.14.0-dev-nightly			Andreas Heuermann Lennart Ochel
