MultibodyComponents
Documentation for MultibodyComponents.

Welcome to MultibodyComponents, a library of multibody-mechanics components implemented in the Dyad language. The package lets you model, analyse and simulate mechanical systems — robotics, biomechanics, aerospace, vehicle dynamics — with the symbolic, acausal modelling style that Dyad provides.
MultibodyComponents follows the design of the Modelica Standard Library's multibody package: systems are described as networks of frames attached to bodies and connected through joints, forces and sensors. Components are written in Dyad, which means they compose naturally with other Dyad libraries such as RotationalComponents and TranslationalComponents.
This documentation covers how to set up models, work with orientations and coordinate conventions, generate motion profiles with trajectory planning, and produce 3D animations through the rendering extension. The component reference at the bottom of the sidebar lists everything that is currently implemented.
Example overview
The following animations give a quick overview of simple mechanisms of the kind that can be modelled with this family of multibody libraries. The examples are ordered from simple at the top, to more advanced at the bottom.












Installation
Install MultibodyComponents from the Dyad registry with
import Pkg
Pkg.add("MultibodyComponents")The 3D rendering extension additionally requires a Makie backend (e.g. GLMakie (recommended) or WGLMakie).
Notable differences from Modelica
The torque variable in MultibodyComponents is typically called
taurather thantto not conflict with the often used independent variabletused to denote time.MultibodyComponents occasionally requires the user to specify which component should act as the root of the kinematic tree. This only occurs when bodies are connected directly to force components without a joint parallel to the force component.
In MultibodyComponents, the orientation object of a
Frame3Dis accessed using the functionori.Quaternions in MultibodyComponents follow the order
, i.e., scalar/real part first.
2D and 3D modeling
MultibodyComponents offers components for modeling in both 2D and 3D. 2D modeling, often referred to as planar mechanics, is a subset of 3D modeling where the motion is constrained to a plane, the x,y plane. Planar mechanics is sometimes referred to as 3 degrees of freedom (DOF) modeling, referring to the 2 translational DOF and one rotational DOF that the plane offers. Most components in MultibodyComponents are aimed at 3D modeling (sometimes referred to as 6 DOF modeling), but components for 2D modeling exist in the submodule MultibodyComponents.PlanarMechanics.
1D components from sibling Dyad libraries such as RotationalComponents and TranslationalComponents can be used together with MultibodyComponents in both 2D and 3D, by attaching them to joints that expose the axisflange keyword.