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

Posts

Posts

Oct-13-16 15:28:11
I need to run my model with a variety of input sets to get a variety of input cases

Thanks for the tips. One more question that I'm fairly embarrassed to ask... how do you write and run scripts? I can get things going from OMShell but obviously I'd rather write the script once then run it later. Do I just write the script in any old text editor, then run it using runScript(filepath)? Or is there an integrated script writing environment?

It looks like OMNotebook is what I need but I haven't gotten super deep into it yet and I'd rather avoid a false start if possible.

(I'm coming from Scilab, where there's a built-in editor with syntax checking, highlighting, that kind of thing, so I'm wondering what my best option is here in OpenModelica).

Thanks again all, sorry for the newb questions!

Oct-10-16 20:35:08
I need to run my model with a variety of input sets to get a variety of input cases

I'm quite new to Modelica here so hopefully this is an easy one. I have a simulation created in OMEdit that works well when I simulate it. I'd like to move on to simulating this model with a variety of different inputs while logging data automatically.

For example, I have a sine wave input force going into the system. I'd like to see the system's response to 10-100 Hz input sine waves in 10 Hz increments. Right now I can manually change the value, run the sim, then export the CSV to my analysis program, but that seems quite inefficient- I'd rather update my model, then hit "go" and get results for 10 different frequencies, or 10 different phases, or whatever. Just a constant input parameter evenly spaced over a predetermined range.

I've been looking at OMOptim but I don't see a way to specify input values, and I don't see a way to run it without trying to optimize anything. The results I'm looking at have to be post-processed and there aren't really good ways to define them as "optimized" anyway; I just need to know some frequency response information.

Is there a way within OMEdit, OMOptim, or the OM Shell to do something like this? I haven't done any scripting with Modelica yet, but if that's the way to go I'd be happy to learn.

Thanks for the help.

I made some progress on this one- apparently the third prismatic joint was giving it issues. Replacing the far right prismatic joint with just a 3D spring seemed to fix things for now, but I'll see how it goes when I have to start actually using the model.

If anyone can offer insight on why I can't have the third prismatic joint in there I'd greatly appreciate it.

Sep-21-16 19:50:46
i can't load modelica3d

In OMEdit, right click on "ModelicaServices" then "Unload". Next, go to your OpenModelica folder, then lib/omlibrary/ModelicaServices 3.2.1 modelica3d and load the "package.mo" file found there. You'll get a new ModelicaServices package loaded into OMEdit.

Expand that package, go to Modelica3d, then drag the Controller element onto your diagram. You'll have to do this package unload/reload every time unless you change your default settings, it doesn't stick by itself.

Also before running your simulation, run dbus-server.py in \lib\omlibrary-modelica3d\osg-gtk. You'll need Python and some other components as well, it's documented in the user guide for Modelica3D.

I'm trying to simulate a system similar to this one:

http://scienceworld.wolfram.com/physics … asses.html

I can simulate it just fine using 1-D translational elements, but I'm trying to do it in 3D with the multibody tools and I'm having trouble getting it to run. I eventually need to have a 3D system built with these components but this is my first time using Modelica so I'm trying to get a very simplified system to run, hence using 3D tools to solve a 1D problem- eventually it will be 3D.

I have attached my (primitive) stab at making this system.

SingleStrut5.mo

Right now it gives me an error that I have mismatched equations and variables, and I suspect it has something to do with my initial conditions but I'm stumped. Any help would be much appreciated!

Edit: Tried a couple more things. I replaced the frame translation element with a BodyCylinder of the same length, and now I have matched equations and variables. Unfortunately, trying to run it gives me "An independent subset of the model has imbalanced number of equations (1) and variables (0). variables:equations: 1 : 0.0 = 0.0".

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