Opened 12 years ago

Closed 10 years ago

#1962 closed defect (fixed)

Mixed multibody/fluid model initialization error

Reported by: Bruno Scaglioni Owned by: Lennart Ochel
Priority: high Milestone: 1.9.2
Component: Backend Version: trunk
Keywords: Cc: Willi Braun

Description

The attached model is a mixed fluid/multibody model build with MSL 3.2.1 components, OMC fails to initialize the model if the initial conditions for the body are not specified and stucks in infinite loop during initialization of simulation (see -lv LOG_INIT) if initial conditions are specified.
The issue happens only if both multibody and fluid components are present because the state variables are in both domains.

Attachments (1)

IncompressibleValveExample.mo (7.9 KB ) - added by Bruno Scaglioni 12 years ago.

Download all attachments as: .zip

Change History (8)

by Bruno Scaglioni, 12 years ago

comment:1 by Bruno Scaglioni, 12 years ago

Summary: Midex multibody/fluid initialization errorMixed multibody/fluid model initialization error

comment:2 by Adrian Pop, 12 years ago

Owner: changed from probably noone to lochel, wbraun
Status: newassigned

comment:3 by Adrian Pop, 12 years ago

Cc: Willi Braun added
Owner: changed from lochel, wbraun to Lennart Ochel

comment:4 by Martin Sjölund, 11 years ago

Milestone: 1.9.01.9.1

Postponed until 1.9.1

comment:5 by Lennart Ochel, 10 years ago

Status: assignedaccepted

This model has not fully specified initial conditions. This is reported by Dymola and OpenModelica:

Dymola:

Assuming fixed start value for the continuous states:
two_Port_Valve.body_mass.frame_a.r_0[1](start = two_Port_Valve.body_r_start[1])
two_Port_Valve.body_mass.frame_a.r_0[2](start = two_Port_Valve.body_r_start[2])
two_Port_Valve.body_mass.frame_a.r_0[3](start = two_Port_Valve.body_r_start[3])
two_Port_Valve.body_mass.Q[2](start = two_Port_Valve.body_mass.Q_start[2])
two_Port_Valve.body_mass.Q[3](start = two_Port_Valve.body_mass.Q_start[3])
two_Port_Valve.body_mass.Q[4](start = two_Port_Valve.body_mass.Q_start[4])
two_Port_Valve.body_mass.v_0[1](start = two_Port_Valve.body_v_start[1])
two_Port_Valve.body_mass.v_0[2](start = two_Port_Valve.body_v_start[2])
two_Port_Valve.body_mass.v_0[3](start = two_Port_Valve.body_v_start[3])
two_Port_Valve.body_mass.w_a[1](start = two_Port_Valve.body_mass.R_start.T[1, 1] *two_Port_Valve.body_mass.w_0_start[1]+two_Port_Valve.body_mass.R_start.T[1, 2] *two_Port_Valve.body_mass.w_0_start[2]+two_Port_Valve.body_mass.R_start.T[1, 3] *two_Port_Valve.body_mass.w_0_start[3])
two_Port_Valve.body_mass.w_a[2](start = two_Port_Valve.body_mass.R_start.T[2, 1] *two_Port_Valve.body_mass.w_0_start[1]+two_Port_Valve.body_mass.R_start.T[2, 2] *two_Port_Valve.body_mass.w_0_start[2]+two_Port_Valve.body_mass.R_start.T[2, 3] *two_Port_Valve.body_mass.w_0_start[3])
two_Port_Valve.body_mass.w_a[3](start = two_Port_Valve.body_mass.R_start.T[3, 1] *two_Port_Valve.body_mass.w_0_start[1]+two_Port_Valve.body_mass.R_start.T[3, 2] *two_Port_Valve.body_mass.w_0_start[2]+two_Port_Valve.body_mass.R_start.T[3, 3] *two_Port_Valve.body_mass.w_0_start[3])

OpenModelica:

Warning: Assuming fixed start value for the following 12 variables:
         two_Port_Valve.body_mass.frame_a.r_0[1]:VARIABLE(flow=false start = two_Port_Valve.body_r_start[1] unit = "m" )  "Position vector from world frame to the connector frame origin, resolved in world frame".IncompressibleValveExample.Test_Two_Port_Valve, .IncompressibleValveExample.Two_Port_Valve$two_Port_Valve, .Modelica.Mechanics.MultiBody.Parts.Body$two_Port_Valve$body_mass, .Modelica.Mechanics.MultiBody.Interfaces.Frame_a, .Modelica.SIunits.Position type: Real 
         two_Port_Valve.body_mass.frame_a.r_0[2]:VARIABLE(flow=false start = two_Port_Valve.body_r_start[2] unit = "m" )  "Position vector from world frame to the connector frame origin, resolved in world frame".IncompressibleValveExample.Test_Two_Port_Valve, .IncompressibleValveExample.Two_Port_Valve$two_Port_Valve, .Modelica.Mechanics.MultiBody.Parts.Body$two_Port_Valve$body_mass, .Modelica.Mechanics.MultiBody.Interfaces.Frame_a, .Modelica.SIunits.Position type: Real 
         two_Port_Valve.body_mass.frame_a.r_0[3]:VARIABLE(flow=false start = two_Port_Valve.body_r_start[3] unit = "m" )  "Position vector from world frame to the connector frame origin, resolved in world frame".IncompressibleValveExample.Test_Two_Port_Valve, .IncompressibleValveExample.Two_Port_Valve$two_Port_Valve, .Modelica.Mechanics.MultiBody.Parts.Body$two_Port_Valve$body_mass, .Modelica.Mechanics.MultiBody.Interfaces.Frame_a, .Modelica.SIunits.Position type: Real 
         $STATESET1.x[1]:VARIABLE(start = /*Real*/($STATESET1.A[1,1]) * $_start(two_Port_Valve.body_mass.Q[4]) + /*Real*/($STATESET1.A[1,2]) * $_start(two_Port_Valve.body_mass.Q[3]) + /*Real*/($STATESET1.A[1,3]) * $_start(two_Port_Valve.body_mass.Q[2]) + /*Real*/($STATESET1.A[1,4]) * $_start(two_Port_Valve.body_mass.Q[1]) fixed = false )  type: Real 
         $STATESET1.x[2]:VARIABLE(start = /*Real*/($STATESET1.A[2,1]) * $_start(two_Port_Valve.body_mass.Q[4]) + /*Real*/($STATESET1.A[2,2]) * $_start(two_Port_Valve.body_mass.Q[3]) + /*Real*/($STATESET1.A[2,3]) * $_start(two_Port_Valve.body_mass.Q[2]) + /*Real*/($STATESET1.A[2,4]) * $_start(two_Port_Valve.body_mass.Q[1]) fixed = false )  type: Real 
         $STATESET1.x[3]:VARIABLE(start = /*Real*/($STATESET1.A[3,1]) * $_start(two_Port_Valve.body_mass.Q[4]) + /*Real*/($STATESET1.A[3,2]) * $_start(two_Port_Valve.body_mass.Q[3]) + /*Real*/($STATESET1.A[3,3]) * $_start(two_Port_Valve.body_mass.Q[2]) + /*Real*/($STATESET1.A[3,4]) * $_start(two_Port_Valve.body_mass.Q[1]) fixed = false )  type: Real 
         two_Port_Valve.body_mass.v_0[1]:VARIABLE(start = two_Port_Valve.body_v_start[1] unit = "m/s" stateSelect=StateSelect.avoid )  "Absolute velocity of frame_a, resolved in world frame (= der(r_0))".IncompressibleValveExample.Test_Two_Port_Valve, .IncompressibleValveExample.Two_Port_Valve$two_Port_Valve, .Modelica.Mechanics.MultiBody.Parts.Body$two_Port_Valve$body_mass, .Modelica.SIunits.Velocity$two_Port_Valve$body_mass$v_0 type: Real 
         two_Port_Valve.body_mass.v_0[2]:VARIABLE(start = two_Port_Valve.body_v_start[2] unit = "m/s" stateSelect=StateSelect.avoid )  "Absolute velocity of frame_a, resolved in world frame (= der(r_0))".IncompressibleValveExample.Test_Two_Port_Valve, .IncompressibleValveExample.Two_Port_Valve$two_Port_Valve, .Modelica.Mechanics.MultiBody.Parts.Body$two_Port_Valve$body_mass, .Modelica.SIunits.Velocity$two_Port_Valve$body_mass$v_0 type: Real 
         two_Port_Valve.body_mass.v_0[3]:VARIABLE(start = two_Port_Valve.body_v_start[3] unit = "m/s" stateSelect=StateSelect.avoid )  "Absolute velocity of frame_a, resolved in world frame (= der(r_0))".IncompressibleValveExample.Test_Two_Port_Valve, .IncompressibleValveExample.Two_Port_Valve$two_Port_Valve, .Modelica.Mechanics.MultiBody.Parts.Body$two_Port_Valve$body_mass, .Modelica.SIunits.Velocity$two_Port_Valve$body_mass$v_0 type: Real
         two_Port_Valve.body_mass.w_a[1]:VARIABLE(start = two_Port_Valve.body_mass.w_0_start[1] unit = "rad/s" fixed = false stateSelect=StateSelect.avoid )  "Absolute angular velocity of frame_a resolved in frame_a".IncompressibleValveExample.Test_Two_Port_Valve, .IncompressibleValveExample.Two_Port_Valve$two_Port_Valve, .Modelica.Mechanics.MultiBody.Parts.Body$two_Port_Valve$body_mass, .Modelica.SIunits.AngularVelocity$two_Port_Valve$body_mass$w_a type: Real 
         two_Port_Valve.body_mass.w_a[2]:VARIABLE(start = two_Port_Valve.body_mass.w_0_start[2] unit = "rad/s" fixed = false stateSelect=StateSelect.avoid )  "Absolute angular velocity of frame_a resolved in frame_a".IncompressibleValveExample.Test_Two_Port_Valve, .IncompressibleValveExample.Two_Port_Valve$two_Port_Valve, .Modelica.Mechanics.MultiBody.Parts.Body$two_Port_Valve$body_mass, .Modelica.SIunits.AngularVelocity$two_Port_Valve$body_mass$w_a type: Real 
         two_Port_Valve.body_mass.w_a[3]:VARIABLE(start = two_Port_Valve.body_mass.w_0_start[3] unit = "rad/s" fixed = false stateSelect=StateSelect.avoid )  "Absolute angular velocity of frame_a resolved in frame_a".IncompressibleValveExample.Test_Two_Port_Valve, .IncompressibleValveExample.Two_Port_Valve$two_Port_Valve, .Modelica.Mechanics.MultiBody.Parts.Body$two_Port_Valve$body_mass, .Modelica.SIunits.AngularVelocity$two_Port_Valve$body_mass$w_a type: Real

The simulation reports the following:

Cannot initialize the dynamic state selection in an unique way. Use -lv LOG_DSS to see the switching state set.

I will further investigate this issue.

comment:6 by Martin Sjölund, 10 years ago

Milestone: 1.9.11.9.2

This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).

comment:7 by Lennart Ochel, 10 years ago

Resolution: fixed
Status: acceptedclosed

This was fixed in the meantime.

Note: See TracTickets for help on using tickets.