Skip to content
LIBRARY

MultibodyComponents

Documentation for MultibodyComponents.

animated logo

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.

Furuta
springdamper
wheels
three_springs
space
free_body
flexible_rope
mounted_chain
quadrotor
fourbar2
fourbar
robot

Installation

Install MultibodyComponents from the Dyad registry with

julia
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 tau rather than t to not conflict with the often used independent variable t used 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 Frame3D is accessed using the function ori.

  • Quaternions in MultibodyComponents follow the order [w,i,j,k], 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.