Home Buyers' Guides Modelling With Modelica In OpenModelica

Modelling With Modelica In OpenModelica

Modelling With Modelica In OpenModelica

You are trying to rig up a simple circuit. A signal source, power supply and a few passive components are all you need. I am sure you would prefer simulating it first, to test and make sure you do not burn out the circuit. How about doing the same in an open source software environment? Let’s talkĀ about OpenModelica (OM), a modelling and simulation environment intended for industrial and academic usage.

Based on GNU general-public licence version 3, OM offers a platform for modelling, compiling and simulating Modelica based models. Graphical editing is similar to MATLAB Simulink. OM is supported by the non-profit organisation Open Source Modelica Consortium.

The website for OM can be found at www.openmodelica.org. It offers support to Windows, MAC and Linux operating systems (OSes). If your OS has no pre-built binaries, or if you are unable to install the latest release, version 1.9.3, on your system, OM provides facilities to install the tool on a virtual machine (VM). Their website even provides a pre-built VM that contains all libraries and clients that come with OpenModelica. However, a virtualisation engine like VirtualBox will be needed to run the VM.

fig 1
Fig. 1: Modelling an RLC circuit

Simulate faster on multi-core systems
With the norm today being quad-core and octa-core, using the multi-core property of OM enables faster simulation of your model. When the feature is enabled, OM partitions the system of equations and assigns one core for every part, thus simultaneously processing using shared memory. While simulating, you can even turn various flags on or off to deliver results in a specific manner.

Re-simulating is also possible for manipulating variables in the model. By compiling to efficient Java Script, OM can also simulate in a Web browser on a client computer.