JuliaCon 2023

Intro to modeling with ModelingToolkitStandardLibrary
2023-07-27 , 32-D463 (Star)

ModelingToolkitStandardLibrary is a library of components to model the world and beyond. We will demonstrate how various Mechanical, Electrical, Magnetic, and Thermal components can be used as basic building blocks to simulate complex models. We will talk about design choices, vision, and future plans for the package.


Component-based acausal modeling is a system for quickly generating large-scale, efficient models by composing elements with known physics. All that one has to do is to define components that represent objects, such as transistors, air conditioning units, or pipes, and connect them to generate accurate physical models of real-world phenomena. However, these models can easily require hundreds of components. How can one avoid the tedious task of having to understand and write the physics of so many things?

The answer is ModelingToolkit’s system for component-based modeling. With ModelingToolkit, you can compose components and it will generate the resulting set of equations as simulatable differential equations amenable to simulation with the DifferentialEquations.jl environment. To aid in the use of modeling standard systems, we introduce a new component to the ModelingToolkit and SciML ecosystem called the ModelingToolkitStandardLibrary. The ModelingToolkitStandardLibrary is a standard library of pre-built components modeled with ModelingToolkit. We want this package to serve two purposes; as a starting place for anyone who wants to get started with modeling, and as a performant dependency for power users.

MTKStdLib is structured to provide extendable basic blocks. This talk intends to walk users through the process of composing custom models using these components. We will speak about the internal structure, best practices, and known gotchas.
We will briefly talk about all the signals and shapes we support, the utility and math blocks we provide; the thermal ports, thermal circuit components like convective and thermal- resistors, and inductors, HeatCapacitors; the magnetic component: FluxTubes; the rotational library; and the electrical circuit components.

This talk should leave users supercharged to use MTK and the standard library to model the world and beyond.

I received my MSc and PhD 2019 from the Dept. Automatic Control in Lund, Sweden, working within the fields of control, machine learning and robotics. I have since spent a year with the Acoustic Research Laboratory at NUS and subsequently made the transition to industry, working with dynamic modeling, control and programming-language design in a robotics context. I am now working with JuliaHub on software tools for acausal modeling, simulation, optimization and control in the Julia programming language.

This speaker also appears in: