WOLFRAM SYSTEMMODELER LINK PACKAGE SYMBOL

WSMCreateModel


creates the Modelica model of the systems model sys.


creates a model for the system equations eqns with independent variable t.


creates a model with type specifications tspecs for variables and parameters.


creates a component model extending the specification given by .

DetailsDetails

  • returns WSMModelData["newmodel"].
  • inserts into .
  • Possible systems models sys include TransferFunctionModel and StateSpaceModel. »
  • Possible equations eqns include ordinary differential equations (ODE), differential algebraic equations (DAE), initial value equations, and event specifications given by WhenEvent. »
  • Parameters in eqns and sys are taken to be variables that do not explicitly depend on t.
  • Type specifications tspecs for variables and parameters , where each has the form:
  • paritypeiparameter type
    varitypeivariable type
  • The types can be basic Reals, Integers, and Booleans, or any Modelica type including units. »
  • WSMNames["Modelica.SIunits.*","type"] can be used to find built-in standard units.
  • Modelica models are typically built by combining many models into a larger system. The interaction between these models is described by the Modelica concept connector. »
  • A connector consists of effort and flow variables. When connecting multiple connectors, flow variables are summed to , while effort variables are set equal.
  • As an example, an electrical circuit connector, commonly called a pin, consists of a voltage variable v and a current variable i.
  • Connecting pins and sums the flow variables, in this case currents i, to , and sets the efforts, in this case voltages v, equal:
  • All flow variables are positive in the direction flowing into a component.
  • Effort and flow variables for different domains include:
  • DomainEffort VariablesFlow Variables
    electrical circuitsvoltagecurrent
    magnetic circuitsmagnetic potentialmagnetic flux
    translational mechanicspositionforce
    rotational mechanicsangletorque
    3D mechanicsposition vector, orientation objectcut force vector, cut torque vector
    fluid flow systemspressure, specific enthalpymass flow rate, enthalpy flow rate
    heat transfer systemstemperatureheat flow rate
    block diagramsreal, integer, Boolean-
  • Possible connectors for a domain are usually defined in an package. For example, WSMNames["Modelica.Electrical.Analog.Interfaces.*","connector"] can be used to find connectors for the built-in electrical library.
  • The specification can be used to specify that a variable refers to a connector of type .
  • Variables in a connector c can be referred to in eqns with , where the character is input as \[UpPointer].
  • The variables defined by a connector conn can be listed with WSMModelData[conn,"SystemVariables"].
  • Libraries often contain partial models, called interfaces, for building new component models. These interfaces usually consist of connectors and equations describing the basic relationships between them.
  • With , combines eqns with the existing model defined in Modelica. »
  • corresponds to using the keyword in Modelica.
  • A model can extend multiple models using .
  • Partial models to build on are usually defined in an package. For example, WSMNames["Modelica.Electrical.Analog.Interfaces.*","model"|"block"] can be used to find partial models for the built-in electrical library.
  • The shortest unique or can be used where WSMNames["*.type"] gives a unique match. »
  • The following options can be given:
  • WSMInitialValuesAutomaticstart values
    WSMParameterValuesAutomaticparameter values
  • WSMInitialValues corresponds to the start property in the Modelica model.