SysML Plugin TWRT Documentation
On this page
The «ModelicaBlock», «ModelicaParameter» and «ModelicaPort» stereotypes are created to specify which SysML properties (including ports) of its blocks correspond to Modelica library reusable component. The semantics of these elements are given by the corresponding elements in the Modelica libraries. For more details, read the OMG SysPhS specification.
The figure below shows how the «ModelicaBlock», «ModelicaParameter» and «ModelicaPort» stereotypes are defined in the SysML profile.
Apply «ModelicaBlock» stereotype for a Block to reference its Part Properties with an equivalent component in the Modelica library. The value of the name tag must be a fully qualified name (e.g. Modelica.Electrical.Analog.Basic.Capacitor) of the corresponding component in the Modelica library. How to reference Block properties with Modelica library component >>
Apply «ModelicaParameter» stereotype for a Value Property to reference it with an equivalent parameter of a Modelica library. The stereotyped Value Property must be owned by a Block stereotyped by «ModelicaBlock». The value of the name tag is the name of the corresponding parameter, and the value attribute gives the value of this parameter. If the value is empty, the value of the parameter must be given using initial values of the stereotyped property.
In the following image, after the «ModelicaParameter» stereotype is applied for the r Value Property, its name tag value is referenced with the parameter R in the Modelica library. How to reference Value Property with Modelica library parameter >>
Apply «ModelicaPort» stereotype for a port to reference it with an equivalent port in the Modelica library. The stereotyped port must be owned by a Block with «ModelicaBlock» stereotype applied. The value of the name tag gives the name of the corresponding port in the Modelica library. How to reference port with Modelica library port >>
To reference SysML elements with Modelica library components
The figure below shows a comparison between exported model without and with references to the Modelica library components. How to export your model to Modelica file >>