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
  • » blazieblaze
  • » Profile

Posts

Posts

Hi, I wanted to somehow include myself into this discussion cause I have a problem with several versions of OpenModelica. I've used OpenModelica last year more, and now when my OS is changed I can't get any of the examples to compile. When running the last published beta version to simulate a model I made and compiled last year, the compiling output says I have a mingw32-make Error 2, and there is a warning message saying I am missing some start values for my electrical circuit (capacitor voltage, inductor current). Since I have never had to make any adjustments to these models, I really don't know what to do. I have tried installing a couple of old versions (18.0, 18.1) and a couple of new ones (19.0, 19.1 Beta2) and I can never get any of the examples or my models to simulate. In the older versions, I just run the simulation and nothing happens, the newer ones give me the already mentioned messages. I hope someone could shed some light on this issue.. Thanks in advance!
Cheers,

Ilma

Sep-10-13 23:48:08
visualising a multi-body system after it has been simulated

Thanks for the help, and I'm glad I could contribute. The previous build works like a charm, I don't have to change anything in the models for now.

Sep-10-13 22:34:56
visualising a multi-body system after it has been simulated

I already did that, but as I said, the Editor crashes and the error message isn't visible really. All see is something along the lines of assumed fixed start for the angle in revolutes in the model. (when i try running the strukturav2 model).

Sep-10-13 20:54:25
visualising a multi-body system after it has been simulated

Now, I can get none of the models I used to run normally in Connection Editor to simulate. First I got some errors but couldn't even see them cause the Editor kept crashing. Then I saw it said something about +d=initialization. I tried changing some of the initialization values for the inertia components, then it said it was an overdetermined system. I can't figure out why it doesn't simulate since the animation still works. This the warning after running the strukturav2 animation in Shell.

Code:

 "Warning: The initial conditions are not fully specified. Use +d=initialization for more information.

Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.

I also had problems with the Editor after updating to Beta4, with the Media library, so I uninstalled both versions and installed the Beta4 again. Now, there is no problem with libraries, but still the Editor crashes even after I run the DoublePendulum example, and shows these 2 errors I think, but can't really be sure since it goes down mid-simulation.
I can't even start to figure out where to fix what. I'd think it's my model, but it also happens with integrated examples and all of my models simulated perfectly in the previous version.

Sep-10-13 19:22:14
visualising a multi-body system after it has been simulated

Yaaay, it works now! Thank you soo much current/smile I'll try to visualize the entire robot model now. Do I have to add code to the script? I don't even know it it can be animated since it contains stuff from the rest of the Mechannical library, Blocks and Electrical. Thank you so much, again! (I just love that hype phase I go through when something starts working current/big_smile)

Sep-10-13 18:33:01
visualising a multi-body system after it has been simulated

I'm using OpenModeica 1.9.0 Beta2 r13495.
I think it gives the same error as before:

Code:

4"true

\"\"
true
\"\"
\"C:/OpenModelica1.9.0//lib/omlibrary-modelica3d/\"
true
\"[C:/Users/Ilma/Dropbox/zavrsni/robotic/script1.mos:4:1-4:74:writable] Error: Class getInstallationDirectoryPath not found in scope <global scope> (looking for a function or record).
\"
\"C:/Users/Ilma/Dropbox/zavrsni/robotic\"
\"\"
true
\"\"
true
record SimulationResult
    resultFile = \"\",
    simulationOptions = \"startTime = 0.0, stopTime = 30.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Visualize_strukturav2', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = ''\",
    messages = \"Simulation execution failed for model: Visualize_strukturav2
\",
    timeFrontend = 3.62144810352734,
    timeBackend = 6.58144509849884,
    timeSimCode = 0.373417074555496,
    timeTemplates = 0.548226807399431,
    timeCompile = 8.27939950334925
end SimulationResult;
\"Warning: No corresponding 'inner' declaration found for component world.x_label.cylinders[1].m3d_control declared as 'outer '.
  The existing 'inner' components are:
    There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.Mechanics.MultiBody.Visualizers.Advanced.Shape.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.

the segment after "Warning:..repeats itself for different components a lot.
I'm getting the feeling this won't be working, I feel really bad for taking your time..
Thank you, but feel free to ignore me if you have other things to do current/big_smile

Sep-10-13 17:32:26
visualising a multi-body system after it has been simulated

When I run the script in OMNotebook, I get:

Code:

"true

\"\"
true
\"\"
\"C:/OpenModelica1.9.0//lib/omlibrary-modelica3d/\"
true
\"[C:/Users/Ilma/Dropbox/zavrsni/robotic/script1.mos:4:1-4:74:writable] Error: Class getInstallationDirectoryPath not found in scope <global scope> (looking for a function or record).
\"
false
\"\"
true
\"C:/Users/Ilma/Dropbox/zavrsni/robotic\"
\"\"
record SimulationResult
    resultFile = \"\",
    simulationOptions = \"startTime = 0.0, stopTime = 30.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Visualize_strukturav2', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = ''\",
    messages = \"Simulation failed for model: Visualize_strukturav2
[<interactive>:4:1-4:20:writable] Error: Base class strukturav2 not found in scope Visualize_strukturav2
Error: Error occurred while flattening model Visualize_strukturav2
\",
    timeFrontend = 0.0,
    timeBackend = 0.0,
    timeSimCode = 0.0,
    timeTemplates = 0.0,
    timeCompile = 0.0,
    timeSimulation = 0.0,
    timeTotal = 0.0
end SimulationResult;
\"\"
"

When I run it in Shell :

Code:

"true

\"\"
true
true
\"C:/Users/Ilma/Dropbox/zavrsni/robotic\"
\"Warning: Requested package ModelicaServices of version 1.0, but this package was already loaded with version 1.0 modelica3d. You might experience problems if these versions are incompatible.
\"
record SimulationResult
    resultFile = \"\",
    simulationOptions = \"startTime = 0.0, stopTime = 30.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Visualize_strukturav2', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = ''\",
    messages = \"Simulation execution failed for model: Visualize_strukturav2
\",
    timeFrontend = 3.92805214627592,
    timeBackend = 4.07157468830014,
    timeSimCode = 0.328943884377013,
    timeTemplates = 0.770892440095455,
    timeCompile = 5.99926926902682
end SimulationResult;
\"Warning: No corresponding 'inner' declaration found for component world.x_label.cylinders[1].m3d_control declared as 'outer '.
  The existing 'inner' components are:
    There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.Mechanics.MultiBody.Visualizers.Advanced.Shape.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration

I am so sorry if I'm not that familiar with things, I am mostly just starting to work with this.
Thank You so much for your help.

Sep-10-13 10:40:33
visualising a multi-body system after it has been simulated

Hello,
yes, I can simulate the model. It also works as a part of the robot alltogether. I thought it might be the fact that it's written as a component with hanging flanges, but even without them, it still simulates without modelica3d. The code is the following:

Code:

model strukturav2

  parameter Modelica.SIunits.Acceleration g = 9.81;
  Modelica.SIunits.Angle q[3];
  Modelica.SIunits.AngularVelocity qd[3];
  Modelica.SIunits.AngularAcceleration qdd[3];
  Modelica.SIunits.Torque tau[3];
  inner Modelica.Mechanics.MultiBody.World world annotation(Placement(visible = true, transformation(origin = {-75.2272,-85.0742}, extent = {{-9.01578,-9.01578},{9.01578,9.01578}}, rotation = 0)));
  Modelica.Mechanics.Rotational.Interfaces.Flange_a flange_a annotation(Placement(visible = true, transformation(origin = {-75.4746,52.5041}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin = {-75.4746,52.5041}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  annotation(Icon(graphics = {Rectangle(rotation = 0, lineColor = {0,0,255}, fillColor = {0,0,255}, pattern = LinePattern.Solid, fillPattern = FillPattern.None, lineThickness = 0.25, extent = {{-58.7952,82.4096},{71.3253,-78.5542}}),Text(rotation = 0, lineColor = {0,0,255}, fillColor = {0,0,255}, pattern = LinePattern.Solid, fillPattern = FillPattern.None, lineThickness = 0.25, extent = {{-35.6627,41.9277},{51.5663,-35.1807}}, textString = "struktura")}), Diagram());
  Modelica.Mechanics.Rotational.Interfaces.Flange_a flange_a1 annotation(Placement(visible = true, transformation(origin = {-74.6542,-2.18767}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin = {-74.6542,-2.18767}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Mechanics.Rotational.Interfaces.Flange_a flange_a2 annotation(Placement(visible = true, transformation(origin = {-76.268,-54.0188}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin = {-76.268,-54.0188}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.BodyShape bodyshape1(r = {0.2,0.4,0}, m = 3) annotation(Placement(visible = true, transformation(origin = {-2.40964,-83.8554}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.BodyShape bodyshape2(r = {0.2,0.4,0}, m = 3) annotation(Placement(visible = true, transformation(origin = {43.3735,-28.4337}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.BodyShape bodyshape3(r = {0.2,0.4,0}, m = 3) annotation(Placement(visible = true, transformation(origin = {63.1325,24.5783}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.BodyShape bodyshape4(m = 3, r = {0.2,0.4,0}, I_11 = 0.001, I_22 = 0.001, I_33 = 0.001) annotation(Placement(visible = true, transformation(origin = {59.759,80}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Joints.Revolute revolute1(useAxisFlange = true) annotation(Placement(visible = true, transformation(origin = {32.7711,-54.4578}, extent = {{12,-12},{-12,12}}, rotation = -270)));
  Modelica.Mechanics.MultiBody.Joints.Revolute revolute2(useAxisFlange = true) annotation(Placement(visible = true, transformation(origin = {44.8193,-1.92771}, extent = {{12,-12},{-12,12}}, rotation = -270)));
  Modelica.Mechanics.MultiBody.Joints.Revolute revolute3(useAxisFlange = true) annotation(Placement(visible = true, transformation(origin = {37.1084,48.6747}, extent = {{12,-12},{-12,12}}, rotation = -270)));
equation
  connect(revolute3.frame_b,bodyshape4.frame_a) annotation(Line(points = {{37.1084,60.6747},{36.1446,60.6747},{36.1446,80},{47.759,80},{47.759,80}}));
  connect(bodyshape3.frame_b,revolute3.frame_a) annotation(Line(points = {{75.1325,24.5783},{84.8193,24.5783},{84.8193,31.8072},{35.6627,31.8072},{35.6627,38.5542},{37.1084,38.5542},{37.1084,36.6747}}));
  connect(revolute2.frame_b,bodyshape3.frame_a) annotation(Line(points = {{44.8193,10.0723},{41.4458,10.0723},{41.4458,25.0602},{51.1325,25.0602},{51.1325,24.5783}}));
  connect(bodyshape2.frame_b,revolute2.frame_a) annotation(Line(points = {{55.3735,-28.4337},{67.9518,-28.4337},{67.9518,-19.759},{43.8554,-19.759},{43.8554,-13.494},{44.8193,-13.494},{44.8193,-13.9277}}));
  connect(revolute1.frame_b,bodyshape2.frame_a) annotation(Line(points = {{32.7711,-42.4578},{30.8434,-42.4578},{30.8434,-37.5904},{13.494,-37.5904},{13.494,-28.4337},{31.3735,-28.4337},{31.3735,-28.4337}}));
  connect(bodyshape1.frame_b,revolute1.frame_a) annotation(Line(points = {{9.59036,-83.8554},{32.2892,-83.8554},{32.2892,-66.4578},{32.7711,-66.4578}}));
  connect(world.frame_b,bodyshape1.frame_a) annotation(Line(points = {{-66.2114,-85.0742},{-14.4578,-85.0742},{-14.4578,-83.8554},{-14.4096,-83.8554}}));
  connect(revolute3.axis,flange_a) annotation(Line(points = {{25.1084,48.6747},{-74.2169,48.6747},{-74.2169,52.5041},{-75.4746,52.5041}}));
  connect(revolute2.axis,flange_a1) annotation(Line(points = {{32.8193,-1.92771},{-74.2169,-1.92771},{-74.2169,-2.18767},{-74.6542,-2.18767}}));
  connect(revolute1.axis,flange_a2) annotation(Line(points = {{20.7711,-54.4578},{-78.0723,-54.4578},{-78.0723,-54.0188},{-76.268,-54.0188}}));
  q = {revolute1.phi,revolute2.phi,revolute3.phi};
  qd = der(q);
  qdd = der(qd);
  tau = {revolute1.axis.tau,revolute2.axis.tau,revolute3.axis.tau};
end strukturav2;

Sep-10-13 01:43:25
visualising a multi-body system after it has been simulated

Hi,
I don't know if this thread is the way to go, but I've built a 3DOF robot structure (99% similar to the RobotR3) and included it in a model also similar to the one in the the Example library. I'm now trying just to visualize the structure of the robot, not including the drive and control parts of the model. I've tried the steps from the OpenModelica User's Guide, and was able to visualize the DoublePendulum. However, I have tried running both the code in the Guide, and the one you wrote for the script.mos in OMNotebook and they both give me [done] when I've changed the names of the model. I've run the Modelica 3D server beforehand. Haven't really figured out if I'm supposed to extract the simulation from the Visualize_Strukturav2 (my model name) model somehow or is the visualization window supposed to pop up like for the pendulum? When I get rid of the getErrorString(); command, and let the code run without the semicolon after the simulate command with both codes, the error says that the simulation failed:

Code:

true

record SimulationResult
    resultFile = "",
    simulationOptions = "startTime = 0.0, stopTime = 30.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Visualize_Strukturav2', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = ''",
    messages = "Simulation failed for model: Visualize_Strukturav2
[<interactive>:7:3-7:22:writable] Error: Base class strukturav2 not found in scope Visualize_Strukturav2
Error: Error occurred while flattening model Visualize_Strukturav2
",
    timeFrontend = 0.0,
    timeBackend = 0.0,
    timeSimCode = 0.0,
    timeTemplates = 0.0,
    timeCompile = 0.0,
    timeSimulation = 0.0,
    timeTotal = 0.0
end SimulationResult;

I located my model into the modelica-3d library, but I'm still not sure how to reference it in the code.
I got interested in OO modeling and I used OpenModelica a bit, but the multibody library and making this animation thing work is kind of complicated, so I thought maybe someone could give me a hand. Thanks in advance for any help or even for just for reading through my message.

Cheers,

Ilma

  • Index
  • » Users
  • » blazieblaze
  • » Profile
You are here: