Modelica Tools
In order that the Modelica modeling language can be used to solve actual problems, a modeling and simulation environment is needed
- to conveniently define a Modelica model with a graphical user interface (composition diagram/schematic editor) such that the result of the graphical editing is a (internal) textual description of the model in Modelica format.
- to translate the defined Modelica model into a form which can be efficiently simulated in an appropriate simulation environment. This requires especially sophisticated symbolic transformation techniques.
- to simulate the translated model with standard numerical integration methods and visualize the result.
The following commercial and free modeling and simulation environments for Modelica are currently available (note, that demo versions for the commercial environments are available and that some demo versions can be downloaded free of charge):
Commercial Modelica Simulation Environments
(in alphabetical order)
- Dymola from Dynasim has a Modelica translator which is able to perform all necessary symbolic transformations for large systems (> 100 000 equations) as well as for real time applications. A graphical editor for model editing and browsing, as well as a simulation environment are included. Convenient interfaces to MATLAB and the popular block diagram simulator Simulink exist. For example, a Modelica model can be transformed into a SIMULINK S-function C mex-file which can be simulated in SIMULINK as an input/output block. A demo version of Dymola can be downloaded here.
- LMS Imagine.Lab AMESim from LMS is a complete 1D simulation suite to model and analyze multi-domain systems and predict their performances. It provides a large variety of validated model libraries (mechanical, hydraulic, electric, thermal, control) and application oriented tools (specialized libraries, pre and post processing tools, customization features,…). The AMESim platform and its dedicated solutions cover numerous application fields to address the customer’s specific needs for the design of powertrain transmissions, thermal management systems, vehicle systems dynamics, fluid systems, internal combustion engines, aircraft ground loads, flight controls or electrical and electromechanical systems. LMS Imagine.Lab AMESim is now able to deal with Modelica. For instance, Modelica models can be created and modified in a text editor dedicated to the Modelica language, and imported into the LMS Imagine.Lab AMESim environment so as to be linked to other model and to be simulated in the simulation environment.
- MapleSim™, from Maplesoft, is a high-performance multi-domain modeling and simulation tool. Systems are described in a compact and intuitive component diagram using next-generation physical modeling techniques, making them easier to build and understand. Model equations are automatically generated and simplified, yielding concise models and high-speed simulations of sophisticated systems. Many components in MapleSim are from the Modelica Standard Library, and all MapleSim models and components can be exported to Modelica. In the near future, MapleSim will be able to access third-party Modelica libraries. Users will be able to directly import any Modelica components or libraries and seamlessly incorporate them into MapleSim models. For more information, please visit the Maplesoft web site.
- MathModelica System Designer from MathCore provides a Modelica simulation environment. It provides an interactive graphical environment for easy model composition and an environment for simulation management. The professional edition, MathModelica System Designer Professional, includes a Mathematica link, offering facilities for mathematical computation, plotting, calculation, natural display of mathematical formulae, inline documentation, etc. within the powerful Mathematica notebook environment. MathCore also offer a basic graphical modeling environment, MathModelica Lite, for the Modelica open source compiler. This version is free for use for academic institutions.
- MOSILAB from the Fraunhofer-Gesellschaft is a newly developed Modelica simulator for complex technical systems. One innovative feature of MOSILAB is the mapping of state-dependent changes of the model structure during the simulation experiment. This enables, for example, simulation experiments with models of variable modeling depth or varying model physics. In 2006, interested Modelica users can obtain a beta-version of MOSILAB, which is currently under development. In the beginning of 2007, MOSILAB will be available as a commercial simulation tool.
- SimulationX by ITI is a graphically-interactive tool for the holistic modeling, simulation and analysis of multi-domain systems from 1D to 3D. Multi-level customizing options and SimulationX’s capability to adjust the model’s complexity by mouse-click allow modeling in every step of the design process. Ready-to-use model libraries, e.g., for mechanics, multi-body systems, power transmission, hydraulics, pneumatics, thermodynamics, and electric drives are written in Modelica language. Libraries are extendable by Modelica-based modeling using the SimulationX TypeDesigner. A comprehensive API supports the integration into any CAE, CFD, CAD or database tool environment. Versatile interfaces offer plenty of opportunities for exporting models in terms of Simulink S-function and C-Code for HiL, RCP and other real-time applications. Different features (tracing, performance analyzer, switchable model complexity) support users in achieving real-time-capabilities. SimulationX is available for test online. www.simulationx.com
Free Modelica Simulation Environments
- JModelica.org: JModelica.org is an extensible Modelica-based open source platform for optimization, simulation and analysis of complex dynamic systems. The main objective of the project is to offer an industrially viable open source platform for optimization of Modelica models, and a flexible platform serving as a virtual lab for algorithm development and research. At the core of the JModelica.org platform are compilers for Modelica and Optimica, which is an extension of Modelica dedicated to formulation of dynamic optimization problems. JModelica.org also features a Python integration for scripting and custom application development, code generation to C and XML, numerical algorithms for solving dynamic optimization problems, an interface to the state of the art optimization algorithm Ipopt, and an Eclipse plugin based on the JModelica.org compilers. The JModlica.org platform is available under the GPL open source license. Part of the software is also available under the less restrictive CPL license. In addition, commercial licenses are available from Modelon AB.
-
Modelicac is a compiler for a subset of the Modelica language including parts of the "equation" subset that can express relations between Real variables.
Modelicac is included into the Scilab
distribution (although it is an independant executable) and
is used by Scicos
(Scilab's block-oriented editor and simulator) to handle hybrid model simulations.
The following features are supported by Modelicac:
- Declaration of "Real" scalar variables and (statically fixed-size) arrays;
- Aggregation of components is supported (but inheritance is not)
- Modifications of parameters are supported;
- Declaration of equations (equalities, "for" equations, "when" equations)
- "if" equations are not supported, however it is possible to write "if" expressions in equations.
Control (by way of discrete variables, algorithms, blocks, etc.) is not handled by Modelicac, however it is handled by Scicos (in fact, it is Scicos's original purpose). Hence hybrid models can be simulated under the Scicos environment in a rather transparent way: Scicos calls Modelicac on the continuous part of the model and simulates directly the remaining (discrete) part.
Scilab, Scicos and Modelicac are free software: one can use them for educational purposes but also into industrial applications (see the Scilab licence for details). More details about Modelicac and Scicos can be found here. Scicos is currently further developed in the SIMPA2 project to handle the full Modelica language. - OpenModelica: OpenModelica is an open source Modelica environment developed and supported by Linköping University and the Open Source Modelica Consortium (OSMC) - a growing group of companies, universities, institutes and individuals. The goal of the project is to create a complete Modelica modeling, compilation and simulation environment based on free software distributed in source code and executable form intended for research, teaching, and industrial usage. OpenModelica is freely available for use. It can be combined with open source software according to the OSMC-GPL license. Moreover, it can also be integrated with proprietary software according to the OSMC-EPL. The current OpenModelica release supports most of the Modelica language, including equations, algorithms, event-handling, functions, and packages. Also included are a Modelica Eclipse plugin for advanced developers, and an electronic notebook interface for teaching (see DrModelica). Improving the compiler, a general solver interface, enhanced graphics, and Modelica-UML integration in Eclipse are examples of ongoing development activities. We invite all interested developers, researchers, and students to participate in the project. Please visit OpenModelica page.
- SimForge is an integrated open-source tool for Modelica model development and IEC 61131-3 control code generation. The tool is based on the OpenModelica compiler, and provides text-based editing and a graphical user interface with full Modelica 3.0 graphical annotations support. Visit http://trac.ws.dei.polimi.it/simforge/ for further information and to download the tool.
Teaching material
- DrModelica is an interactive teaching material to teach yourself Modelica. It contains exercises with answers, and examples. It is downloaded and run as part of OpenModelica, using the OMNotebook interface. The examples are from the book by Peter Fritzson - "Principles of Object-Oriented Modeling and Simulation with Modelica 2.1, (November 2003). This book teaches modeling and simulation and gives an introduction to the Modelica language to people who are familiar with basic programming concepts. Downloadable chapters and a tutorial based on the book are available here,
Other tools
- Simelica, a Simulink to Modelica translator is available from Claytex.
- Free Excel interface to Dymola available from Magnus Holmgren
- Free Simulink-Block similar to the "To File" Block, which writes a bus including the signal names in a Dymola-compatible mat-File. SaveToFile.zip written by Arne Schmenkel.
Free syntax highlighting tool Highlight which converts source code to formatted text with syntax highlighting.
(Coloured output in HTML, XHTML, RTF, TeX, LaTeX and XML format, supports 120+ programming languages including Modelica)- EXITE from EXTESSY AG is a co-simulation platform connecting Dymola models to any other simulator. EXITE provides interfaces to Dymola, Simulink, ASCET, Rhapsody, ARTiSAN Studio and C/C++. During the co-simulation all models remain in their simulator and EXITE realises the communication among them via dedicated communication blocks. EXITE is capable of realising the data exchange in less than 30µs, thus allowing high-performance distributed simulation. Further information and software download can be found here.
- EXITE ACE from EXTESSY AG is a co-execution platform following the paradigm of component based system design as standardised by AUTOSAR or AADL. EXITE ACE is used to simulate and test distributed control systems together with the controlled plant model, e.g. complete virtual cars. Components can be implemented with Simulink, Real-time Workshop, Targetlink (µC target code), ASCET (offline experiment and µC target code), ANSI-C, Rhapsody and Dymola. From a system architecture model EXITE ACE generates a model stub, which can be filled with the intended behaviour using the tool of your choice. EXITE ACE provides the connection of any simulation to hardware interfaces (CAN bus) and a common measurement and calibration interface. For improving execution speed EXITE ACE allows distributed simulation on WINDOWS PC and RT Linux. Further information and software download can be found here.
- TestWeaver from QTronic is a tool for automatic test generation and validation of systems. TestWeaver can be directly used with Modelica simulators, such as, Dymola or SimulationX, as well as with MATLAB/Simulink and Silver simulations.
- Silver from QTronic is a tool that allows to simulate controller and simulation modules produced with various tools, such as: Dymola, SimulationX, MATLAB/Simulink, C/C++ and Python. The modules are self-integrating and are co-simulated on standard PC hardware under Windows. Automotive ECU software interfaces, such as A2L and XCP, are provided.
- TISC is a co-simulation environment for controlling different simulation applications and exchanging data between them. TISC organizes the co-simulation setup by managing simulation programs, models, parameters and initialization settings, different simulation computers, as well as IP connections. TISC provides interfaces to Modelica, MATLAB/Simulink, Ascet, Labview, Fluent, Star-CD, Theseus-FE, Flowmaster, Kuli, Trnsys, and Wave. New Interfaces can be developed upon request based on C, C++, C# (using .NET Framework 2.0), Python, or FORTRAN.
Please visit the TLK-Thermo website for more information. - TILMedia is an interface library to provide fluid and solid properties from various existing property databases to different applications. The interface library can be used in both function-based and object-oriented programming.
Please visit the TLK-Thermo website for more information. - StateViewer is an advanced software tool for graphical presentation of transient thermodynamic measurements or simulation data in different types of state charts (e.g. ph- or Ts-diagram). The StateViewer can open csv-files as well as Dymola result files, an online-visualization can easily be set up while running a measurement or simulation process. Using the media data of REFPROP as well as interfaces to other media databases guarantees a wide range of application.
Please visit the TLK-Thermo website for more information. - Free StateViewer Lite is a version of StateViewer with restricted functionality. It can be downloaded from the the TLK-Thermo website.
Free Modelica Editors
Modelica models are usually graphically constructed with one of the schematic editors of Dymola or MathModelica. However, since Modelica is basically a textual description it is also possible to utilize a text editor to edit or to browse Modelica models. A free Modelica text editor and adaptations of popular text editors are available here:
- MathModelica Lite, is a model editor for the Modelica open source compiler. The model editor is free for academic institutions.
- The Free Modelica Editor has been developed by Falko Jens Wagner (Windows-98,-NT,-2000).
- Modelica mode for Emacs , version 1.4.1 by Rüdiger Franke
- Modelica syntax highlighting for text editor UltraEdit. (= shareware editor on PC which is fast, "simple things are simple", many useful features such as copying/moving of rectangular text). Copy content of file WordfileModelica.txt in file UltraEdit/Wordfile.txt and change first tag "/L6" to the correct number of supported language, if necessary.
- Text-editor SciTE with a Modelica Mode (syntax highlighting, class folding and more) by Fraunhofer FIRST.
- Modelica Development Tooling (MDT) is a plugin for Eclipse
Modelica Testsuite
Modelica models to test various aspects of the Modelica language (version 1.4 from December 2000) can be downloaded. testsuite.zip