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
  • Index
  • » Users
  • » tim.wright
  • » Profile

Posts

Posts

Nov-11-12 23:49:50
visualising a multi-body system after it has been simulated

Hi Adrian,

Some progress, but still not there.

After installing the C++ redistributable 2008, 2005 and 2005 SP1 I was still seeing this error. Through some more searching I have seen the I was missing PyGTK. I installed this and was then able to finally start dbus-server.py. I left that window open and ran omc with the script as an input.

omc tries to run the model but fails. I get a very long error message starting with;

Code:


E:\modelica_work_dir\double_wishbone>E:\OpenModelica1.9.0\bin\omc script.mos
true
""
true
true
record SimulationResult
    resultFile = "",
    simulationOptions = "startTime = 0.0, stopTime = 30.0, numberOfIntervals = 5
00, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Visualize_DoubleWishB
one', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat',
variableFilter = '.*', measureTime = false, cflags = '', simflags = ''",
    messages = "Simulation failed for model: Visualize_DoubleWishBone
Error: Error building simulator. Buildlog: gcc   -falign-functions -msse2 -mfpma
th=sse   -I\"E:/OpenModelica1.9.0//include/omc\" -I.    -c -o Visualize_DoubleWi
shBone.o Visualize_DoubleWishBone.c

after this there are about 100+ lines of errors in Visualise_DoubleWishBone.c

I have also tried to run the double pendulum example given in the users guide in OMShell. Again the model loads ok, but I get this large error when I invoke the simulate command. Again its a long list of errors in Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum.c

So at this point I suspect the problem isn't the model or the commands. Perhaps there is something wrong with my general environment?

Just to give you some more info on exaclty what environmant I'm running;
   Windows XP SP3
   Open Modelica installed in: E:\OpenModelica1.9.0 (nightly build from Build 13859 from today, 11th Nov 2012)
   Model created in OMEdit and saved in working directory E:\modelica_work_dir\double_wishbone
   script.mos which you wrote is in the same directory
   Python 2.7 and PyGTK installed in E:\Python27
   Visual C++ redist 2005, 2008, 2010 installed


So I have run out of ideas, do you have any more advice?

Thanks again

Tim

Nov-09-12 11:16:14
visualising a multi-body system after it has been simulated

Thanks again Adrian,

I did see this error was linked to the Visual C++ redistributable package, so I installed the 2008 version but it didn't solve the problem. I will try again tonight with the 2005 SP1 you suggested.

Tim

Nov-09-12 02:16:41
visualising a multi-body system after it has been simulated

Hi Adrian,

I've finally found some time to have a look at this. I have seen on the mailing list there has been some further discussions about the 3D visualisation.

In any case, I have downloaded the nightly build from today, and also installed python.

I have follwed what you have done though I'm having problems starting C:\OpenModelica1.9.0\lib\omlibrary-modelica3d\osg-gtk\dbus-server.py. I'm getting the error;

---------------------------
python.exe - Unable To Locate Component
---------------------------
This application has failed to start because MSVCR80.dll was not found. Re-installing the application may fix this problem.
---------------------------
OK   
---------------------------

From looking around I've seen this error is common to a lot of programs, but I've seen nothing specific to python. So I have reinstalled, first 2.7.3 and the 3.3.0 however both are giving me the same thing. I know this isnt a modelica problem, but have you come across this before? could you point me in the right direction?

For information, I'm running Windows XP.

Thanks

Tim

Oct-01-12 13:30:14
visualising a multi-body system after it has been simulated

Hi Adrian, thanks a lot for that detailed reply.

I will have a go at this this week.

Just a general question, am I doing things the hard way using OMEdit? Do you suggest a better environment for mbs simulation and visualisation? I have seen visualisations in the documentation for OMNotebook so is it worth trying this path as well?

This is only for my own research, so I dont have the budget for Dymola etc.

Thanks again

Regards

Tim Wright

Oct-01-12 00:25:44
visualising a multi-body system after it has been simulated

Hi All,

I'm newly experimenting with OpenModelica. I have setup a very basic model (1 d.o.f) in OMEdit which runs ok.

Now I'm trying to view some sort of animation to see if the topography and the movements are correct.

I've tried a few methods without success so far. In OMEdit, the body and joint components that I want to visualise have animation = true. So this should mean that the animation information is included in the results right?

In OMEdit I cannot find anyway to show the animation in the post processing.

I have also tried in OMNotebook, to run the model and call visualise(double_wishbone) but all I get returned is "false"

I know this is something very basic, but could someone point me in the right direction?

Cheers

Tim

PS Here is the model coming from OMEdit

Code:

model double_wishbone

  Modelica.Mechanics.MultiBody.Parts.Body body1(r_CM = {0.2,0,0.3}, m = 5) annotation(Placement(visible = true, transformation(origin = {15.1111,79.5556}, extent = {{12,-12},{-12,12}}, rotation = -270)));
  Modelica.Mechanics.MultiBody.Forces.SpringDamperParallel springdamperparallel1(c = 50000, s_unstretched = 0.5, d = 500) annotation(Placement(visible = true, transformation(origin = {69.7778,52}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.FixedTranslation fixedtranslation2(r = {0.4,0,0}) annotation(Placement(visible = true, transformation(origin = {15.1111,-20.4444}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.FixedTranslation fixedtranslation1(r = {0.4,0,0.3}) annotation(Placement(visible = true, transformation(origin = {20.8889,23.5556}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Joints.Revolute revolute1(n = {0,1,0}) annotation(Placement(visible = true, transformation(origin = {-28,52}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  inner Modelica.Mechanics.MultiBody.World world(label2 = "z", n = {0,0,-1}) annotation(Placement(visible = true, transformation(origin = {-84.0317,4}, extent = {{-12,-12},{12,12}}, rotation = 0)));
equation
  connect(fixedtranslation2.frame_a,world.frame_b) annotation(Line(points = {{3.11111,-20.4444},{-31.5556,-20.4444},{-31.5556,4},{-72.0317,4},{-72.0317,4}}));
  connect(world.frame_b,revolute1.frame_a) annotation(Line(points = {{-72.0317,4},{-51.5556,4},{-51.5556,52},{-40,52}}));
  connect(revolute1.frame_b,fixedtranslation1.frame_a) annotation(Line(points = {{-16,52},{-4,52},{-4,23.5556},{8.88889,23.5556}}));
  connect(revolute1.frame_b,body1.frame_a) annotation(Line(points = {{-16,52},{14.6667,52},{14.6667,67.5556},{15.1111,67.5556}}));
  connect(fixedtranslation1.frame_b,springdamperparallel1.frame_a) annotation(Line(points = {{32.8889,23.5556},{48,23.5556},{48,52},{57.7778,52}}));
  connect(springdamperparallel1.frame_b,fixedtranslation2.frame_b) annotation(Line(points = {{81.7778,52},{90.6667,52},{90.6667,-20.4444},{27.1111,-20.4444}}));
end double_wishbone;

  • Index
  • » Users
  • » tim.wright
  • » Profile
You are here: