Wolfram Computation Meets Knowledge



WSMModelData is being phased out in favor of SystemModel, which was introduced experimentally in Version 11.3.


gives a diagram representation of the model "mmodel", usable as input to other functions.


gives the specified "property" for the model "mmodel".


  • WSMModelData["mmodel","Properties"] gives a list of possible properties.
  • Properties related to the whole model: »
  • "Description"top-level description of model
    "Diagram"diagram view of model
    "Icon"icon view of model
    "ModelicaText"show Modelica model code
    "ModelName"fully qualified path of model
    "LocalPlotNames"names of plots saved locally in model
    "PlotNames"names of plots, including inherited
    "SourceFile"file where the model is saved
    "Summary"model summary data
  • "ModelicaText" creates a cell with style "Program" containing the textual form of "mmodel".
  • With a text-based interface, "ModelicaText" returns the textual form of "mmodel" as a string.
  • WSMModelData[{"mmodel","c1","c2",}, "Diagram"] shows the diagram for component "c1.c2...ci" in "mmodel".
  • WSMModelData["mmodel",{property,options}] accepts the following options for property "Diagram" and "Icon":
  • FrameTrueshow frame
    FrameTicksFalseshow frame ticks
    GridLinesNonewhat grid lines to show
    PlotRangeAutomaticplot range in mm
    PlotRangePaddingAutomaticpadding in mm
  • GridLines->Inherited inherits the grid defined in the model diagram. »
  • PlotRange->Automatic specifies a plot range that encloses the primitives drawn in the diagram.
  • PlotRange->Inherited inherits the page size specified in the model diagram. »
  • Properties related to equations and variables: »
  • "SystemEquations"differential and algebraic equations
    "InitialEquations"initial value equations
    "StateVariables"differentiated variables
    "AlgebraicVariables"non-differentiated variables
    "SystemVariables"state and algebraic variables
    "InputVariables"variables specified as inputs
    "OutputVariables"variables specified as outputs
    "DiscreteVariables"variables changing only at events
  • "SystemEquations" gives equations depending on t.
  • WSMModelData["mmodel","SystemEquations",t] gives equations depending on t.
  • WSMModelData[] contains Missing[type,content] for any parts of equations that cannot be represented.
  • "InputVariables" are distinct from "SystemVariables", and "OutputVariables" are a subset of "SystemVariables".
  • "DiscreteVariables" are a subset of "SystemVariables", and are given in a form suitable as a setting for the DiscreteVariables option to NDSolve.
  • Properties related to values: »
  • "ParameterValues"parameter rules {p1->val1,}
    "InitialValues"initial value rules {v1->val1,}
    "GroupedInitialValues"initial values grouped by state, input, and output
  • For variable and parameter lists, WSMModelData["mmodel",{prop,patt}] returns the elements of prop whose Modelica form match the string pattern patt.
  • Properties related to the structure of the model:
  • "BaseClasses"classes the model extends
    "Components"model components
    "Connections"model connections
    "Connectors"model connector components
    "LocalComponents"components defined locally in model
  • Properties related to relations with other models:
  • "ExtendingClasses"classes that build upon this model
    "InstantiatingClasses"classes that use this model as a component
  • The shortest unique model name mmodel can be used where WSMNames["*.mmodel"] gives a unique match.
  • The following options can be given:
  • MethodAutomaticmethods for equation processing
  • Possible settings for "opti" in Method->{"opt1"->val1} include:
  • "Elimination"Alleliminate simple equations
    "ReduceIndex"Truereduced index of DAEs in balanced models
    "StartTime"0simulation start time


open allclose all

Basic Examples  (4)

Load Wolfram SystemModeler Link:

Click for copyable input

Show a model represented by a diagram:

Click for copyable input

Use the diagram representation as input:

Click for copyable input

Show a summary of a model:

Click for copyable input

Get the differential equations for a model:

Click for copyable input

Scope  (30)

Options  (3)

Applications  (4)

Properties & Relations  (3)

See Also

WSMLinearize  WSMSimulate  WSMConnectComponents  WSMCreateModel