The FunctionalModels 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 FunctionalModels.Lib.
Normal usage is:
using FunctionalModels
using FunctionalModels.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 FunctionalModels.Lib include:
| Flow/through variable | Node/across variable | Node helper type | |
|---|---|---|---|
| Electrical systems | Current | Voltage | ElectricalNode | 
| Heat transfer | HeatFlow | Temperature | HeatPort | 
| Mechanical rotation | Torque | Angle | Flange | 
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
FunctionalModels.Lib.Signal — TypeSignal is an alias for Any used to indicate a signal value or variable. 
ElectricalNode
FunctionalModels.Lib.ElectricalNode — TypeElectricalNode is an alias for Any used to indicate a node voltage value or variable. 
HeatPort
FunctionalModels.Lib.HeatPort — TypeHeatPort is an alias for Any used to indicate a value or variable for a temperature port. 
Flange
FunctionalModels.Lib.Flange — TypeFlange is an alias for Any used to indicate a value or variable for a flange port (an angle). 
Current
FunctionalModels.Lib.Current — FunctionCurrent(x = 0.0; name = :i) creates an Unknown with a default name of :i. 
Voltage
FunctionalModels.Lib.Voltage — FunctionVoltage(x = 0.0; name = :i) creates an Unknown with a default name of :v. 
HeatFlow
FunctionalModels.Lib.HeatFlow — FunctionHeatFlow(x = 0.0; name = :i) creates an Unknown with a default name of :hf. 
Temperature
FunctionalModels.Lib.Temperature — FunctionTemperature(x = 0.0; name = :i) creates an Unknown with a default name of :T. 
Torque
FunctionalModels.Lib.Torque — FunctionTorque(x = 0.0; name = :i) creates an Unknown with a default name of :torque. 
Angle
FunctionalModels.Lib.Angle — FunctionAngle(x = 0.0; name = :i) creates an Unknown with a default name of :angle. 
AngularVelocity
FunctionalModels.Lib.AngularVelocity — FunctionAngularVelocity(x = 0.0; name = :i) creates an Unknown with a default name of :angvelocity. 
AngularAcceleration
FunctionalModels.Lib.AngularAcceleration — FunctionAngularAcceleration(x = 0.0; name = :i) creates an Unknown with a default name of :angacceleration.