Modeling with Modelica
Learn about Modeling with Modelica language and Modelica blocks.
Modelica Language
Modelica is an equation-based language that is especially well-suited for modeling the behavior of physical components.
The Modelica language is specified and maintained by the Modelica Association.
For an introduction to Modelica, see the Extended Definitions for Advanced Users and visit www.modelica.org.
Modelica Standard Library
The Modelica Association produces the MSL, Modelica Standard Library, which is an open source library covering many domains. The MSL is a reference library and serves as a basis for all other libraries.
- MSL versions evolve with the versions of the Modelica Language specification.
- The Activate current version supports the MSL version 3.2.3.
Modelica Compiler and Libraries in Activate
Beyond relying on the powerful semantics of Activate to mix both signal and physical blocks, the application of Modelica blocks within Activate relies upon block libraries and a compiler. The Activate Block libraries are based on the Modelica Standard library and other libraries. The compiler converts the Modelica code into code handled by Activate.
Modelica Compiler and FMU
- Activate includes the Modelica Compiler, which takes as input a Modelica block (an assembly of the Modelica code of all the blocks of the model) and produces an FMU (Functional Mock-up Unit).
- The Modelica compiler is powered by Maplesoft™ .
C/C++ Compiler
The use of Modelica blocks involves the creation of the FMU, which, in turn, requires the use of a C/C++ compiler.If the error message,
Unsupported Visual C++ Target Option, is displayed, Activate is
unable to detect a C++ compiler installed on your system. To correct the error,
install a supported Microsoft Visual Studio C++ compiler. To view the compiler
installed on your system, from the OML command window,
enter vssGetCompilerName()
.
Modelica Custom Block
Define components and Modelica blocks with the MoCustomComponent block.
Importing Modelica Libraries
Import Modelica blocks for use in Activate models.
Imported libraries must be compliant with the MSL 3.2.3. In addition, libraries must be valid Modelica packages, <package>.mo, and include the standard Modelica folder structure.