Free library from the Modelica Association to model mechanical (1D/3D), electrical (analog, digital, machines), magnetic, thermal, fluid, control systems and hierarchical state machines. Also numerical functions and functions for strings, files and streams are included.
Package Modelica is a free library that is developed together with the Modelica language from the Modelica Association. It is also called Modelica Standard Library. It provides model components and standard component interfaces from many engineering domains. Each model comes with documentation included. The generous license conditions allow usage in commercial products.
Note, the usage of a Modelica library requires a Modelica simulation environment, see the tools page, and that such an environment usually already includes the Modelica standard library. It is possible that the demo version of the commercial tools will not allow to simulate non-trivial examples from the library.
CMake is recommended as build system, which usually consists of three steps for configuration, build and installation. For example,
git clone https://github.com/modelica/ModelicaStandardLibrary
cd ModelicaStandardLibrary
cmake -S ./Modelica/Resources -B .
cmake --build .
cmake --install .The following Modelica Standard Library specific options for building with CMake are available.
MODELICA_BUILD_TESTING:BOOL=ONThis flag enables the testsuite for CTest.MODELICA_BUILD_ZLIB:BOOL=ONThis flag enables the build of zlib dependency from source.MODELICA_COPY_TABLE_DATA:BOOL=ONThis flag avoids an undesired memory optimization of shallow-copying the passed table arrays.MODELICA_DEBUG_TIME_EVENTS:BOOL=OFFThis flag enables tracing of time events.MODELICA_DUMMY_FUNCTION_USERTAB:BOOL=OFFThis flag adds a dummy function "usertab".MODELICA_INSTALL_EXTC:BOOL=OFFThis flag also installs the ModelicaExternalC target.MODELICA_SHARE_TABLE_DATA:BOOL=ONThis flag enables the memory optimization of avoiding redundant copies of table arrays read from file.
Modelica Standard Library v4.1.0 (2025-05-23)
Browse the Releases page in order to get access to older releases of the Modelica Standard Library.
This Modelica package is free software and the use is completely at your own risk; it can be redistributed and/or modified under the terms of the 3-Clause BSD License.
The development is organised by the Modelica Association Project - Libraries (MAP-LIB). See also the contribution guide and the MAP-LIB Project Rules for more information.
You may report any issues by using the Issue Tracker.
