Modelica Tools
Introduction
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.
Free Modelica Simulation Environments
- 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. 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.
Commercial Modelica Simulation Environments
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):
(in alphabetical order)
-
By Altair:
- Altair Twin Activate_ is a multi-disciplinary system modeling and simulation solution. Its intuitive block diagram environment combined with a modern user interface allows to rapidly build diagrams. Activate comes with a comprehensive library of blocks along with a powerful hybrid simulator that can not only handle continuous and discrete-time models but also allows to mix both signal-based as well as physical components (Modelica) in the same model. It’s also compliant with Functional Mock-up Interface (FMI) for both import and export – in model exchange as well as co-simulation modes. The Modelica support in Twin Activate is powered by Maplesoft™ and includes the Maplesoft™ Modelica engine and Modelica Standard Library for the modeling of physical components.
-
By ANSYS:
- Simplorer is a powerful platform for simulating and analyzing physics-based models of complex systems. With flexible modeling capabilities and tight integrations with ANSYS solutions for 3-D physics simulation and embedded software design, Simplorer provides broad support for assembling system-level physical models and robust simulation for verifying and optimizing system performance. Simplorer supports multiple standard modeling languages and exchange formats, including Modelica, VHDL-AMS, and the Functional Mock-up Interface, and is compatible with Modelica libraries offered by Modelon.
-
- Dymola rapidly solves complex multi-disciplinary systems modeling and analysis problems, using best-in-class Modelica and simulation technology. Dymola is a complete environment for model creation, testing, simulation and post-processing. Dymola has full support for the Modelica language, proven simulation performance, and can use a large number of commercial and free Modelica libraries. In addition, support for FMI 2.0, FMI 3.0, SSP and eFMI. Integrated with version control systems and lifecycle management/cloud simulation on the 3DEXPERIENCE platform. A trial version of Dymola can be downloaded here.
- Systems Simulation Designer allows domain experts to create multi-physics simulation models using Modelica libraries and share ready-to-use experiments in the overall company for system assesment and trade-off analysis. This application allows user to create high level view called the simulation dashboard, which is benificial to non expert users for fast model understanding. The dashboard view allows user to have access to all relevant simulation information (Parameters, plots, results) on a single page. The user can easily change parameters, redeclare components andcompute simulation models from web browser using cloud computing.
-
By ESI ITI GmbH:
- SimulationX 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
-
By Maplesoft:
- MapleSim™ 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.
-
By Modelon:
- Modelon Impact is a next generation system modeling and simulation platform, leveraging the benefits of web and open standard technologies. With openness at its core, Modelon Impact supports standards such as Modelica, FMI, Python and REST. The user-friendly browser interface provides modeling experts the tools they need to create, simulate, and experiment. Steady-state or dynamic solutions can be executed from the same model, reducing effort to get an answer. Finally, the Modelon Impact API enables user-specific workflows through Python-based custom functions, and deployment of models to non-experts via targeted web applications or Jupyter Notebooks.
-
- Simcenter Amesim 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 Simcenter 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. Simcenter 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 Simcenter AMESim environment so as to be linked to other model and to be simulated in the simulation environment. More information about our Simcenter Amesim Modelica platform can be found on our website.
-
- MWorks is a Modelica-based visual modeling and simulation platform for multi-domain engineering systems. It provides visual modeling studio, effective Modelica compiler and symbolic analyzer, as well as powerful postprocessors of curves, schema and 3D animation. Engineering tools, such as experiment design and multi-object optimization, are included in MWorks. MWorks supports the interfaces with CAD, FEM, Matlab/Simulink and FMI. In particular, it can import general CAD files and FEM modal data into 3D animation postprocessor, including stl, sat, hsf, 3ds, dxf and MNF formats. It is also convenient to customize and expand MWorks through C/C++ interfaces, COM components and Python scripts.
-
By Wolfram:
- Wolfram SystemModeler® is a high-fidelity modeling environment that uses versatile symbolic components and computation to drive design efficiency and innovation. It integrates with the Wolfram technology platform to enable modeling, simulation, and analysis (of many types), all together achieving the first fully agile design optimization loop. Many of today’s tools are limited in their fidelity by their foundations: using block-diagrams that poorly represent key components or producing models just for simulation and not engineering analysis. Moreover, computation is numerics-only or not integrated at all. It is the SystemModeler approach of versatile symbolic components backed by the ultimate computation environment that enables an all-in-one integrated workflow. That gets you the power to model reality at high fidelity-driving insight, innovation, and results.
Free Modelica Editor(extension)s
Modelica models are usually graphically constructed with one of the schematic editors. 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:
- Atom - Atom is a text editor that’s modern, approachable, yet hackable to the core — a tool you can customize to do anything but also use productively without ever touching a config file. The Atom language-modelica package provides Modelica grammar support.
- Modelica mode for Emacs, created by Rüdiger Franke
- Modelica Sublime Text Package - A package is to bring Modelica language support to Sublime Text and also to provide snippets for commonly used language patterns.
- 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.
- Visual Studio Code - Modelica language support including syntax highlighting, bracket matching and some useful snippets
Modelica tools for developers
- Modelica Compliance Suite: A semantics compliance suite for the Modelica language
- CSV Result Compare tool: The CSV Result Compare can be used to compare curves from one CSV file with curves from other CSV files using a special algorithm.
- MapleSim Standalone Modelica Parser: May be freely used for library syntax validation, and for non-commercial educational purposes.
- Online Version:http://www.maplesoft.com/products/maplesim/modelicachecker
- Trimming of trailing white spaces (and other code clean-up): This script will recursively remove all trailing white spaces in all text files in a given directory. Binary files and files residing in version control specific directories are skipped. As an addition, one can also let it clean out obsolete or empty/superfluous Modelica annotations from Modelica files and more.
- PMD: An extensible multilanguage static code analyzer with support for Modelica language.
Other free tools
Here comes a list of free tools that are useful in combination with some of the Modelica Simulation Environments mentioned above:
-
awesim: Python module for management of Modelica simulation files in .mat format (follow on GitHub)
-
BuildingsPy: is a Python package that can be used to run Modelica simulations using Dymola, to process *.mat output files that were generated by Dymola or OpenModelica, and to run unit tests as part of the library development.
-
DyMat: This package contains some modules to read and process the result files from Dymola and OpenModelica with python.
-
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) -
listings-modelica This project provides syntax highlighting definitions of the Modelica language for the LaTeX listings package.
-
ModelicaRes: Python utilities to set up and analyze Modelica simulation experiments (follow on GitHub)
-
modelica-builder: Python package enabling users to programmatically edit Modelica models using a simple interface.
-
modelica-fmt: Command-line interface for formatting Modelica code.
-
OpenModelica Microgrid Gym (OMG):The OpenModelica Microgrid Gym (OMG) package is a free software toolbox for the simulation and control optimization of microgrids based on energy conversion by power electronic converters. The main characteristics of the toolbox are the plug-and-play grid design and simulation in OpenModelica as well as the ready-to-go approach of intuitive reinforcement learning (RL) approaches through a Python interface.
-
PlotXY: PlotXY is a visualization and post-processing tool that has recently become Modelica-Mat file compliant, available for Win and Mac. It can read mat files created by Dymola and OpenModelica, make different kinds of plots, on multiple windows, with twin vertical axes, swarm or bar plots, etc.. Has utility functions such as browsing numbers, zooming, labelling, changing scale, adding grids, etc.; allows exporting selected trajectories on ascii files or pdf, dvg, or png files. It can also do post-processing: 1) generate and plot algebraic combinations of trajectories taken from files (sums, products etc.) as well as the integral of a trajectory, 2) compute and show the harmonic spectrum (bar diagrams based on the Fourier coefficients) of a trajectory, with various export capabilities.
-
PySimulator: Python based environment that provides a graphical user interface for simulating different model types via plugins (Modelica models via Dymola, OpenModelica or SimulationX plugins, and FMUs), plotting result variables and applying simulation result analysis tools like Fast Fourier Transform. Additionally advanced tools for linear system analysis are provided that can be applied to the automatically linearized models. Furthermore, rudimentary regression testing between the plugins is provided (Beta status; developed by DLR-SR, OSMC, ITI).
-
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.