﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1860	Multibody MSL models that use quaternions as states fail simulation	Bruno Scaglioni	somebody	"Using MSL 3.2.1 and the last nightly build for windows (13222)
Models from Multibody.Examples in which quaternions must be used as state variables can compile but can't simulate because of a runtime error

the tested model is:
{{{
model SpringWithMass
 extends  Modelica.Mechanics.MultiBody.Examples.Elementary.SpringWithMass;
end SpringWithMass;
}}}

output log file says that the variables:
body.frame_a.r_0[1]
body.frame_a.r_0[2] 
body.frame_a.r_0[3] 
body.v_0[1] 
body.v_0[2] 
body.v_0[3] 
body.w_a[1] 
body.w_a[2] 
body.w_a[3] 

are taken as states, plus three out of four quaternions in order to determine the body orientation.

Whenever this is necessary (there are no joint variable that can be used as states) the simulation fails with a runtime error

the result is this:
{{{
record SimulationResult
    resultFile = ""c:/temp/TestPolimi.MultiBody.MSLTest.Failed.SpringWithMass_res.mat"",
    simulationOptions = ""startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'TestPolimi.MultiBody.MSLTest.Failed.SpringWithMass', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = ''"",
    messages = ""warning | Error solving nonlinear system residualFunc10 (size 1) at time 2.35831e-007

info    | model terminate | Simulation terminated at time 0.002
...
}}}"	defect	new	high	1.9.0	Run-time	1.9.0Beta		Multibody MSL3.2.1	Jens Frenkel
