SystemModeler Archive (.sma)

Background & Context

    • System model files that include model dependencies.
    • File format created by Wolfram Research, Inc.
    • Imported result data is represented as a SystemModel.

Import & Export

  • Import["file.sma","SMA"] imports the specified SystemModeler archive and makes it available as a SystemModel.
  • Export["file.sma",model,"SMA"] saves the SystemModel model and its dependencies in a single file.


  • Export option:
  • "IncludedLibraries"Automaticlibraries to include in file
  • Possible values for "IncludedLibraries" are:
  • Automaticautomatically decide what to include
    Noneinclude no dependencies
    Allinclude all dependencies
    "User"include dependencies not shipped with the system
    {lib1,lib2,}include the explicit libraries libi


open allclose all

Basic Examples  (2)

Import a total model from an archive:

Examine the model's equations:

Simulate the model:

Export a model with dependencies:

Import the model again:

Simulate for 10 seconds and plot the first stored plot in the model:

Clean up by deleting the new file and model:

Export Options  (1)

"IncludedLibraries"  (1)

Export a model without any dependencies:

The resulting file size is typically small:

Including all dependencies, including system libraries, typically results in a large file:

Introduced in 2018