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



I do prefer the previously available options. I often had the situation, to put parameters in for a part in my model, but did not know what to put in. Previously it was possible to have the model open and see the documentation of the part in question and open at the same time the parameter menu of that part. In this way it was easily possible to copy sample values given in the documentation or just look up an explanation while the parameter menu is still open.

Now this is not possible anymore. You need to learn each parameter and remember it. Then switch to another window and open the parameter menu in order to fill in the parameters. Having the documentation available at time of filling in, is much more convenient.

The same holds for looking up the modelica grammar. I could see an example of the documentation side by side with my own code. This is what I am missing now.

I do understand that this may not be important once you have learned everything. However, this feature was very helpful for me as a beginner in modelica.


I learned the modelica standard library with OMEdit 13. There you could right click on a symbol in a library or model could open the related documentation from the context menu. This helped me a lot to read the documentation. 

Now this feature is missing in OMEdit 14. One has to open the class, in order to see the documentation. This ends up with more opened classes, as one like to have.

Are there any reasons to disable the documentation item in the context menu or is it just a regression?


I experimented a little bit with your sample code. The trick seems to be, to define y_buf as a discrete variable. The buffer will be filled then.


block bufferTest
  import Modelica.Constants.pi;

  parameter Integer N = 360 "Total number of samples";

  Integer iTick;
  discrete Real y_buf[N](each fixed = true);

initial algorithm
iTick := 0;

when sample(0, 0.01) then     
  iTick :=iTick + 1;
  if iTick > 0 and iTick <= N then
    y_buf[iTick] := Modelica.Math.sin(time);
  end if;
end when;


annotation(experiment(StartTime = 0, StopTime = 4));
end bufferTest;

This model runs in OMEdit and fills the y_buf.

I have attached a modified example RealFFT1, that provides the described results.

Regards Ulrich

May-30-19 14:28:20
Redeclaring two medium packages in one system component

I am trying to use models with two media and I am are new to Modelica too.  In my cases these media are miscible in any ratio or connected to different connections. As far as I know, you can have only one medium per connector. You need to define one medium with two components, water and oil in your case.

But there is the problem, that water and oil do have a miscibility gap. The brine package tries defines such media with water and gas, but this package is not fully compatible with Openmodelica. In order to get a model with realistic behavior, you may need to create a new media which exposes the miscibility gab. Otherwise your model may show unrealistic mixtures of oil and water.


I am new to Modelica and started modeling components for a fluid application. I first used OM 1.13.0. Now I am using:
OMEdit v1.14.0-dev-5817-g44507d2e8 (64-bit)
Connected to v1.14.0-dev-231-g3006b8aee (64-bit)
Connected to OMSimulator v2.1.0-dev-80-g917fc35-mingw

This version crashes always at opening of the Modelica Media-Air library. I observed this both with 64-bit and 32-bit versions running on Windows 10. I can not remember having this crash with the version of OM 1.13.0.

Is this failure already known?
Is it possible to install both a stable version and a development version under windows?


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