OpenModelica 1.6.0 now works for small time step

Open Modelica 1.6.0 has released a fix for the small time step problem. Revision no 5424 now fixed the issue. You can download it from:

For the thread discussion on the issue, click here.

OpenModelica 1.6.0 problem for very small time step

I encountered problem when using OpenModelica 1.6.0 for my current project which uses a very small time step. It turns out due to initialization issue. It is discussed in this forum: OpenModelica Usage and Applications.

Setting OPENMODELICALIBRARY environment variable

I had difficulties to set OPENMODELICALIBRARY environment variable in Linux Ubuntu 10.10. The detail of the problem and the solution can be found in this post:

The solution is to use setEnvironmentVar(“varname”,”value”). There is also a getEnvironmentVar(“varname”) to extract. And we can check whether it is set using checkSettings().

OpenModelica simulate() options

Modelica is a nice language, unfortunately, the documentation is still lacking a lot of details. For example, there is not much description on the options in the simulate() command.  We can find the following options:

  • numberOfIntervals
  • outputInterval
  • method
  • tolerance
  • fixedStepSize.

I found one reply to this from the forum describing the options:

  • outputInterval and fixedStepSize do not exist in OpenModelica
  • numberOfIntervals changes the step size (why it’s not called stepSize, I do not know). anyway, step size ~ (stopTime-startTime)/numberOfIntervals
  • tolerance is used in dassl (it knows how large an error there is from integrating a derivative); I’m unsure if it’s used when solving non-linear systems or the like
  • method = “euler” “rungekutta” “dassl” “dassl2” “inline-euler” or “inline-rungekutta” (default dassl). Newer omc versions give an error if it finds that you select an unsupported solver.

Trying out Transmission Line models of Modelica

I tried to connect up the transmission lines model with resistors and voltage source. I finally made it without error after adding the two grounds :p. This is the schematics to try out 🙂