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
  • » George Tomlinson
  • » Profile

Posts

Posts

I've been attempting to use ThermoFluid in OpenModelica http://sourceforge.net/projects/thermofluid/files/, but whilst I've been able to open .mo files and view the code, I don't get the schematic model icons with ports. 

Does anyone know if it's possible to use ThermoFluid in this way in OpenModelica and if so, how I ought to go about it?

I've plotted a graph for which the y axis range is 0 to 1.  Firstly I'd like to know how to change this range, as well as the interval at which labels occur.

Secondly I would like to know where I should look (other than this site if there is somewhere more fitting as my first reference point) to find answers to such questions.  I don't know if they are answered in the OpenModelica User Guide.  I didn't notice any such answers when I scanned through it earlier.  If they're not covered in the User Guide and there is somewhere which would be more appropriate to go to find these sorts of answer, could you please let me know where?

That's brilliant: thanks.

After clicking 'Simulate' on a new model, the following warning appeared:

[:0:0-0:0] Warning: The initial conditions are not fully specified. Use +d=initialization for more information.

I would like to know exactly how I might '[use] +d=initialization for more information.'  Presumably I need to type this somewhere, but where?

I would also like to know how to specify fully the initial conditions for the model (the code for which is posted below, which I copied from a video tutorial here https://www.youtube.com/watch?v=fHA0U8l … r_embedded) so as to avoid receiving this warning:

Code:

model Pendulum


  parameter Real M = 1;
  // Mass of pendulum
  parameter Real L = 1;
  // Length of pendulum
  parameter Real g = 9.81;
  // Acceleration of gravity
  Real u;
  // Input torque
  Real y;
  // Output angular displacement
  Real x1(start = 1);
  // Pendulum angular displacement
  Real x2(start = 0);
  // Pendulum angular velocity
equation
  der(x1) = x2;
  der(x2) = (u - M * g * L * sin(x1)) / (M * L ^ 2);
  y = x1;
  u = 0;
 
end Pendulum;

Mar-12-14 19:12:22
Change duration of simulation and run new simulation

I've found the answer: the box I was after is here: Simulation > Simulation Setup

Mar-12-14 18:00:16
Change duration of simulation and run new simulation

When watching a tutorial on OpenModelica, the author of the video tutorial was able to specify the duration of a simulation in a box which appeared immediately after clicking Simulate.  No such box appeared for me.  It seems that I have a newer version, which doesn't function in the same way.  I am using OpenModelica-revision-19519, which I downloaded the day before yesterday (10/03/2014).

I have created a new model and run a simulation which has a default duration of 1 second. Now I wish to know how to do 3 things, which I have not been able to work out how to do yet:

1. Specify the duration before a new simulation of a new model is run for the first time.

2. Run a new simulation of the same model for a longer period of time (say 10 seconds).

3. Change a parameter in the existing model, specify the duration and then run a simulation of this modified model,

What I've tried:

1. I've spent some time searching the OpenModelica User Guide and http://www.mail-archive.com/openmodelic … da.liu.se/ and exploring OMEdit.

2. In trying to accomplish the second step, I've tried switching back to the Modelling Tab and clicking Check Model followed by Simulate. This produces the same results as my first simulation, since there's no option to change the duration.

3. In trying to achieve the third goal, I tried switching back to the Modelling Tab, changing the parameter and then clicking Check Model followed by Simulate.  Once again, there was no option to alter the duration, as there was in the video tutorial I wrote of.

  • Index
  • » Users
  • » George Tomlinson
  • » Profile
You are here: