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

OpenModelica3D, visualization problems

OpenModelica3D, visualization problems

Hello,

I have an error when I try to visualize projects using Modelica3D. I followed the guide instructions for OpenModelica (Chapter 10 - Modelica 3D). I installed Python and PyGTK, and I have the expected output "Running dbus-server...". When I try to run the doublePendulum example in OMShell with

loadModelica3D();getErrorString();
loadString("model DoublePendulum
extends Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum;
inner ModelicaServices.Modelica3D.Controller m3d_control;
end DoublePendulum;");getErrorString();
simulate(DoublePendulum);

I got this error :

Notification: It was not possible to analyze the given system symbolically, because the relevant equations are part of an algebraic loop. This is not supported yet.
[c:/dev/OpenModelica/Compiler/BackEnd/BackendDAETransform.mo:463:9-463:50:writable] Error: Internal error BackendDAETransform.analyseStrongComponentBlock failed
Sorry - Support for Discrete Equation Systems is not yet implemented
world.x_label.cylinders[2].moved
$PRE.world.x_label.cylinders[2].moved
world.x_label.cylinders[2].moved = $PRE.world.x_label.cylinders[2].moved
world.x_label.cylinders[2].moved = $PRE.world.x_label.cylinders[2].moved
[c:/dev/OpenModelica/Compiler/BackEnd/BackendDAETransform.mo:469:9-469:92:writable] Error: Internal error function analyseStrongComponentBlock failed
[c:/dev/OpenModelica/Compiler/BackEnd/BackendDAETransform.mo:114:7-115:62:writable] Error: Internal error function strongComponentsScalar failed
- sorting equations (strongComponents) failed
Error: Internal error Transformation Module sort components failed!
Warning: No system for the symbolic initialization was generated. A method using numerical algorithms will be used instead.

By luck, I can still get a visualization for this example, but not for many others like ThreeSprings or SpringDamperSystem, where no visualization window opens and I get the same error message.
I use OpenModelica 1.9.2Beta (I used to have the latest version but even the pendulum example wasn't working on it).
I would like to use a visualization with my own models.

If someone have an idea to fix my problem, I would be reaaally grateful.

Re: OpenModelica3D, visualization problems

You could try version 1.9.1 until we fix this issue.

Re: OpenModelica3D, visualization problems

When I try the same thing with 1.9.1, I can't visualize any model either and got this message (and many more after but I think this one is the most important) :


[C:/OpenModelica1.9.1/lib/omlibrary/ModelicaServices 3.2.1 modelica3d/Modelica3D/package.mo:15:3-18:12:writable] Warning: Ignoring record component:
  ExternalObject ModelicaServices.modbus.Connection conn;
when building record the constructor. Records are allowed to contain only components of basic types, arrays of basic types or other records.


Re: OpenModelica3D, visualization problems

Ouch, it seems this is broken since a long time now. In 1.9.1 is because of some other reason but still.
We're investigating the issue now and hopefully we'll find a solution soon:
https://trac.openmodelica.org/OpenModelica/ticket/3209

I'll let you know how it goes.

Cheers,
Adrian Pop/

Re: OpenModelica3D, visualization problems

Ok, thanks for your reactivity!

Re: OpenModelica3D, visualization problems

I fixed this issue in r25016. You can take the nightly-build from tomorrow morning and it should work:
https://build.openmodelica.org/omc/buil … ly-builds/

Re: OpenModelica3D, visualization problems

I juste tried this new version, and I have a new error message :

Notification: The given system is mixed-determined.   [index > 0]
Notification: The given system is mixed-determined.   [index > 1]
Notification: The given system is mixed-determined.   [index > 2]
Notification: The given system is mixed-determined.   [index > 3]
Error: No system for the symbolic initialization was generated.

Thanks again for your support.

Re: OpenModelica3D, visualization problems

Hello,

It is working now for me! (r25022)
Thanks for all your work!

Bas

Re: OpenModelica3D, visualization problems

it works too with r25022 (not with r25016 for me), thanks! I can now visualize examples but the last step is to visualize my own project. I tried a few manips but have no idea how to process, OpenModelica manual isn't very clear on this point. Could you explain me how to do this?

Edited by: Antoine_R - Mar-12-15 14:52:54

Re: OpenModelica3D, visualization problems

You will need to add visualization elements to your model similarly to what is done in the Modelica.MultiBody
See some documentation here:
http://simulationresearch.lbl.gov/model … isualizers
See how is done for body:
http://simulationresearch.lbl.gov/model … Parts.Body
this part:

Code:


  // Declarations for animation
  Visualizers.Advanced.Shape cylinder ....

Then you will need to extend your model similar to this (put this in a script.mos):

Code:


// load the modelica 3d
loadModelica3D(); getErrorString();
// extend the model
loadString("model MyModelExtended
extends MyModel;
inner ModelicaServices.Modelica3D.Controller m3d_control;
end MyModelExtended;");getErrorString();
// simulate your model
simulate(MyModelExtended);

Then run omc on script.mos.

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