Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Solver iterated 50000 times without finding a solution

Solver iterated 50000 times without finding a solution

hello,
does anyone have a suggestion, why the following model iterates without finding a solution, even if it is validated successfully?

model try
  inner Modelica.Mechanics.MultiBody.World world annotation(Placement(visible = true, transformation(origin = {-71.5,15.5}, extent = {{-9.31382,-9.31382},{9.31382,9.31382}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Forces.Spring spring1(c = 100, s_unstretched = 20) annotation(Placement(visible = true, transformation(origin = {-22.5,15.5}, extent = {{-15,-15},{15,15}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.PointMass pointmass1(m = 100) annotation(Placement(visible = true, transformation(origin = {16,15}, extent = {{-12.3967,-12.3967},{12.3967,12.3967}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Forces.WorldForce worldforce1 annotation(Placement(visible = true, transformation(origin = {-9.5,65.5}, extent = {{-15,-15},{15,15}}, rotation = 0)));
  Modelica.Blocks.Sources.Constant[3] constant1(k = {10,0,0}) annotation(Placement(visible = true, transformation(origin = {-71.5,80}, extent = {{10.1526,10.1526},{-10.1526,-10.1526}}, rotation = -180)));

equation
  connect(constant1.y,worldforce1.force) annotation(Line(points = {{-82.6678,80},{-29.5,80},{-29.5,65.5},{-27.5,65.5}}));
  connect(pointmass1.frame_a,worldforce1.frame_b) annotation(Line(points = {{16,15},{16.5,15},{16.5,65.5},{5.5,65.5}}));
  connect(spring1.frame_b,pointmass1.frame_a) annotation(Line(points = {{-7.5,15.5},{15.5,15.5},{15.5,15},{16,15}}));
  connect(spring1.frame_a,world.frame_b) annotation(Line(points = {{-37.5,15.5},{-56.5,15.5},{-56.5,15.5},{-62.1862,15.5}}));
end try;

Re: Solver iterated 50000 times without finding a solution

I am assuming it has to do with bug #1401, which I reported today: http://openmodelica.org:8080/cb/issue/1 … ation=true
Basically, the backend fails to evaluate functions that are known to be constant after some symbolic transformations. The backend continues anyway and solves this with a non-linear solver I believe, but I'm not certain.

Code:

Error: Could not evaluate expression: Modelica.Mechanics.MultiBody.Frames.TransformationMatrices.from_nxy(...

Re: Solver iterated 50000 times without finding a solution

when I am trying to compile some of the examples of multibody in the modelica standard library 3.1, espacially mechanics/multibody/examples/elementary/SpringWithMass,
modelica calculates for a long time, and the message written to log is: system is singular at time t=0.0000, stopped after 50000 iterations.
the same message is shown, if i compile some of my own models, however i do not know which should be the reason for a singularity especially in a model which was supplied by the developers of open modelica

Re: Solver iterated 50000 times without finding a solution

I guess something has changed in the last release about how to find a set of consistent initial conditions. I have a model that worked OK in OpenModelica 1.5, but in 1.6 I got the same message.

In my case I solved the problem by adding "(start=XXX)" to an specific variable. The value XXX is just a guess for the initial condition value that should help to find the right initial condition value.

There are 0 guests and 0 other users also viewing this topic
You are here: