The Modelica Association, a non-profit organization, announced version 3.1 of the Modelica language. The new version features new capabilities for improved modeling of the dynamics of fluid systems and for development and code generation of embedded control systems. Version 3.1 of the open source Modelica Standard Library has also been released. It contains sub-libraries for mechanical, electrical, electronic, thermal, and control systems. New models for thermo-fluid and electro-magnetic systems, as well as heat loss models for electrical circuits have been added. The library has now about 1000 model components and 600 functions.
Modelica is a non-proprietary, object-oriented and acausal, equation based modeling language to conveniently model complex physical systems. Unlike legacy block diagram approaches and other modeling languages, Modelica provides high-level model abstractions and configuration management allowing analysis of changing designs and usage scenarios.
Modelica v3.1 Features
The two basic variable types in a connector – “potential” (or across) variable and “flow” (or through) variable – are not sufficient to describe in a numerically sound way the bi-directional flow of matter, since specific quantities are determined from the upstream side of the flow, and then Boolean iteration variables for the flow direction are present in equation systems. This fundamental problem is addressed in Modelica 3.1 by introducing a third type of connector variable, called stream variable, declared with the prefix stream. A new Modelica library with stream variables is available as Modelica_Fluid.
Mapping of Models to Execution Environments
New language elements are introduced to define the partitioning of models in parts and mapping these parts to tasks and sub-tasks on target machines. This allows a convenient definition of, e.g., Model-in-the-Loop, Software-in-the-Loop, Hardware-in-the-Loop Simulation, or production code for a target machine, from the same logical system architecture, by inheriting from the model that represents the logical system architecture and by setting configuration options. To support this concept, a free library Modelica_EmbeddedSystems is currently under development to provide a convenient user interface to the newly introduced (low level) language elements. One fundamental difference to other approaches in the embedded systems area is that the model partitioning is not defined by a block hierarchy, but by just marking the boundaries of the parts. This allows a more flexible and more convenient definition.
Overloading of operators like “+” or “*” is defined to allow convenient usage of user-defined data structures like complex numbers, polynomials, or transfer functions. One fundamental difference to operator overloading in other languages is that only scalar operations for one data type need to be overloaded. All other needed operations, like operations between different data types or on arrays of the new data type, can be automatically constructed by the Modelica tool. Therefore, the typical “explosion” of the number of overloaded functions does not occur here. To allow future refinements while minimizing the risk that semantics of existing models are changed, the design is conservative and restrictive. This is reached by basing the overloading on disjoint sets of matching functions and not on a priority match as it is often done in other languages.
The usage of expandable connectors (which are usually used to model signal buses) is considerably improved: (1) There is much better support for arrays. (2) All potential bus variables can be included in the bus. The semantics is that only bus variables that are referenced in a model are utilized during code generation.
Improved Resource Handling
Modelica specific URIs (Uniform Resource Identifier) can be used for links in html-documentation and for the Bitmap annotation. Example: The file name of an image might be given as “Modelica://Modelica.Mechanics/Images/body.png”. The meaning is that image “body.png” shall be used that is stored in the directory of package Modelica.Mechanics under directory “Images”. This allows to store resources in a package on persistent storage, like a file or a data base system, and to reference resources via package and resource names. It is planned that in a future release of Modelica, all types of resources, including maps, tables, and object libraries, can be referenced in this way.
The open-standard Modelica has already made dramatic improvements to the way complex interacting systems are engineered within the automotive, aerospace, robotics and power plant industries. For most automotive OEMs Modelica tools are fundamental in the model based product development of energy efficient vehicles. Using Modelica enables them to speed up development by evaluating and improving variants earlier in the design process. This improvement is achieved by simulation of the entire product behavior in the whole operating range using Modelica dynamic system models.
More info: Modelica Association