Modelica Model (.mo, .moe)

Background

    Modelica models.
    File format specified by the Modelica Association.

Import and Export

  • Import["file.mo","MO"] imports the specified model and makes it available as a SystemModel.
  • Export["MyModel.mo",model,"MO"] saves the SystemModel model as "MyModel".
  • Export["directory",package,"MO"] saves the SystemModel package in a directory structure in directory.

Examples

open allclose all

Basic Examples  (3)

Import a model:

In[1]:=
Click for copyable input
Out[1]=

Examine the model's equations:

In[2]:=
Click for copyable input
Out[2]=

Simulate the model:

In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=

Create a new model:

In[1]:=
Click for copyable input

Save the model, which renames the model to "DiffEq":

In[2]:=
Click for copyable input
Out[2]=

Show the saved file:

In[3]:=
Click for copyable input

Clean up by deleting the new file and models:

In[4]:=
Click for copyable input

Create a new model inside a new package:

In[1]:=
Click for copyable input

Save the package in a directory structure:

In[2]:=
Click for copyable input
Out[2]=

The package is saved in a directory "MyPackage", where files mirror the model structure:

In[3]:=
Click for copyable input
Out[3]=

Clean up by deleting the new files and model:

In[4]:=
Click for copyable input

Properties & Relations  (1)

Possible Issues  (1)

See Also

SystemModel  SystemModelSimulate  "SMA"

Introduced in 2018
(11.3)