What is Modelica?

The Modelica Language is a non-proprietary, object-oriented, equation based language to conveniently model complex physical systems containing, for example, mechanical, electrical, electronic, hydraulic, thermal, control, electric power or process-oriented subcomponents.

Modelica file import

The modeling tools support MO file format, meaning that you must have your Modelica model in this format to import it. Following the Modelica file import, the Modelica Import Options dialog opens. It allows selecting features you want to update from the Modelica file, create, delete, or change the context-specific initial values. Blocks or Interface Blocks, introduced as property types, are created under the same owner as an imported context. The primitive type, if it was set, is also created for a Block or Interface Block.  You can also create properties, connectors, and ports. Note that the imported Connectors are identified by the connector ends.

To import the Modelica file into the model

  1. Select a Block.
  2. In the top-left corner of the modeling tool, click File > Import From Modelica File.
  3. Select the Modelica (.mo) file on your file system and click Import.
  4. In the Modelica Import Options dialog, specify which features you want to update from the Modelica file. 
  5. Click Import.

An example of Modelica Import

The original Modelica data file for the example model:

The changes made in the Modelica data file are shown in the Modelica Import Options dialog, where you can choose whether to accept those changes or not: