The Sims standard library


NOTE: Many of these components are unfinished or broken. These are mainly components that require events and support of discrete systems.


These components are available with Sims.Lib.

Normal usage is:

using Sims
using Sims.Lib

# modeling...

Library components include models for:

  • Electrical circuits
  • Heat transfer
  • Rotational mechanics

Most of the components mimic those in the Modelica Standard Library.

The main types for Unknowns and signals defined in Sims.Lib include:

Flow/through variableNode/across variableNode helper type
Electrical systemsCurrentVoltageElectricalNode
Heat transferHeatFlowTemperatureHeatPort
Mechanical rotationTorqueAngleFlange

ModelingToolkit does not have variable types, so Signal, ElectricalNode, HeatPort, and Flange are all aliases of Any, mainly to help with documentation of models.

Current, Voltage, HeatFlow, Temperature, Torque, and Angle are all helper functions that create variables with gensym.

Signal

ElectricalNode

HeatPort

Sims.Lib.HeatPortType

HeatPort is an alias for Any used to indicate a value or variable for a temperature port.

source

Flange

Sims.Lib.FlangeType

Flange is an alias for Any used to indicate a value or variable for a flange port (an angle).

source

Discrete

Sims.Lib.DiscreteType

Discrete is an alias for Any used to indicate a value or variable that is Discrete.

source

Current

Voltage

HeatFlow

Temperature

Torque

Sims.Lib.TorqueFunction

Torque(x = 0.0; name = :i) creates an Unknown with a default name of :torque.

source

Angle

Sims.Lib.AngleFunction

Angle(x = 0.0; name = :i) creates an Unknown with a default name of :angle.

source

AngularVelocity

AngularAcceleration