Opened 9 years ago

Closed 7 years ago

#3440 closed defect (fixed)

Mixed system detection

Reported by: Niklas Worschech Owned by: Lennart Ochel
Priority: critical Milestone: Future
Component: Backend Version: trunk
Keywords: mixed system Cc: Nils Menager, Lennart Ochel, Willi Braun, Volker Waurich

Description (last modified by Lennart Ochel)

Using the MSL mass with stop and friction with a force (see example below), Dymola detects a mixed system, which is handled as nonlinear system in OpenModelica. When looking at the equations, there is one linear equation, which depends on a boolean variable. Is there a mixed system detection and handling in OpenModelica?

model TestModel
  Modelica.Mechanics.Translational.Components.MassWithStopAndFriction
    massWithStopAndFriction(m=1);
  Modelica.Mechanics.Translational.Sources.Force force;
  Modelica.Blocks.Sources.Sine sine;
equation 
  connect(force.flange, massWithStopAndFriction.flange_a);
  connect(sine.y, force.f);
end TestModel;

Change History (15)

comment:1 by Adrian Pop, 9 years ago

Cc: Lennart Ochel Willi Braun added

comment:2 by Niklas Worschech, 9 years ago

Description: modified (diff)

comment:3 by Niklas Worschech, 9 years ago

Cc: Volker Waurich added

comment:4 by Volker Waurich, 9 years ago

I found no function in the SimCode-generation that generates a SimCode.SES_MIXED().
It seems there is no mixed system type anymore, only SimCode.SES_NONLINEAR and SimCode.SES_LINEAR. There are Boolean attributes which say that such a SimEqSystem is mixed, but not distinction between discrete and continuous vars is available.
Is there any reason for that?

comment:5 by Lennart Ochel, 9 years ago

I removed the mixed systems a while back, since they were not supported anyway but caused some problems. I will come up with a proper implementation therefore, once I managed the separation of the continuous and discrete simulation.

comment:6 by Willi Braun, 9 years ago

Currently we assume that all systems can be solved with non-discrete iteration variables what is actually achieved by tearing methods. The mixed system flag indicate that the system has some discrete relation which should switch at events points.

comment:7 by Lennart Ochel, 9 years ago

Description: modified (diff)
Owner: changed from somebody to Lennart Ochel
Status: newaccepted

in reply to:  5 comment:8 by Nils Menager, 9 years ago

Replying to lochel:
Do you know how long it will take to develop the proper implementation? Because right now, unfortunately, it is not possible to simulate models with friction in an appropriate time with OpenModelica.

comment:9 by Lennart Ochel, 9 years ago

Milestone: Future1.9.4

No, sorry, it's hard to make an estimation. Anyway, I'll try to fix this for the next release.

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

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

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

Milestone: 1.9.51.10.0

Milestone renamed

comment:12 by Martin Sjölund, 8 years ago

Milestone: 1.10.01.11.0

Ticket retargeted after milestone closed

comment:13 by Martin Sjölund, 8 years ago

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:14 by Francesco Casella, 7 years ago

Milestone: 1.12.0Future

The milestone of this ticket has been reassigned to "Future".

If you think the issue is still valid and relevant for you, please select milestone 1.13.0 for back-end, code generation and run-time issues, or 2.0.0 for front-end issues.

If you are aware that the problem is no longer present, please select the milestone corresponding to the version of OMC you used to check that, and set the status to "worksforme".

In both cases, a short informative comment would be welcome.

comment:15 by Niklas Worschech, 7 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.