The Modelica library allows quickly to build SysML models for simulation by reusing library elements. It provides model components in many domains that are based on standardized interface definitions. The library components are ready to use and shareable between applications. Find all modelica libraries >>
The Modelica Standard Library brings the main components and standard component interfaces from many engineering domains. It provides the black-boxes of Modelica blocks that contains only ports and parameters. The Modelica Standard Library components are imported to SysML project as follow:
All modelica libraries depend from the Modelica Standard Library because of references between components. That's why the first thing you nee to do before using Modelica libraries in SysML projects, is to import the Modelica Standard Library.
To import Modelica Standard Library
Click Import.
The Modelica Standard Library is imported. See the following figure. All packages with their structure is created in the Containment tree and types are placed in corresponding packages. Note, that file names may do not match with the element names and the file structure may do not correspond to the location in the directory. The package structure is the same as Modelica package structure.
In order to to avoid the import of Modelica Standard Library in each project, you can save it as a project and reuse in other projects. For this, do the following: |
Let's say we need to use OpenHydraulics modelica library components in a project. Both Modelica Standard Library and OpenHydraulics library must be imported since some components from OpenHydraulics library have references to standard library.
To use the Modelica libraries in SysML project
You can create model by dragging Modelica library elements directly on diagram pane. As shown in the figure below, the simple schema is created by dragging Capacitor and Resistor Blocks on IBD diagram pane and displaying all their ports. To complete schema creation, you need to type names c and r for a Part Properties and connect ports.
The figure below shows exported model to Modelica file which already contains references to the Modelica library components.