Package Modelica.​Mechanics.​MultiBody
Library to model 3-dimensional mechanical systems


Library MultiBody is a free Modelica package providing 3-dimensional mechanical components to model in a convenient way mechanical systems, such as robots, mechanisms, vehicles. Typical animations generated with this library are shown in the next figure:

For an introduction, have especially a look at:

Copyright © 1998-2018, Modelica Association and contributors

Extends from Modelica.​Icons.​Package (Icon for standard packages).

Package Contents

ExamplesExamples that demonstrate the usage of the MultiBody library
ForcesComponents that exert forces and/or torques between frames
FramesFunctions to transform rotational frame quantities
IconsIcons for MultiBody package
InterfacesConnectors and partial models for 3-dim. mechanical components
JointsComponents that constrain the motion between two frames
PartsRigid components such as bodies with mass and inertia and massless rods
SensorsSensors to measure variables
TypesConstants and types with choices, especially to build menus
UsersGuideUser's Guide of MultiBody Library
Visualizers3-dimensional visual objects used for animation
WorldWorld coordinate system + gravity field + default animation definition

Model Modelica.​Mechanics.​MultiBody.​World
World coordinate system + gravity field + default animation definition


Model World represents a global coordinate system fixed in ground. This model serves several purposes:

Since the gravity field function is required from all bodies with mass and the default settings of animation properties are required from nearly every component, exactly one instance of model World needs to be present in every model on the top level. The basic declaration needs to be:

inner Modelica.Mechanics.MultiBody.World world

Note, it must be an inner declaration with instance name world in order that this world object can be accessed from all objects in the model. When dragging the "World" object from the package browser into the diagram layer, this declaration is automatically generated (this is defined via annotations in model World).

All vectors and tensors of a mechanical system are resolved in a frame that is local to the corresponding component. Usually, if all relative joint coordinates vanish, the local frames of all components are parallel to each other, as well as to the world frame (this holds as long as a Parts.FixedRotation, component is not used). In this "reference configuration" it is therefore alternatively possible to resolve all vectors in the world frame, since all frames are parallel to each other. This is often very convenient. In order to give some visual support in such a situation, in the icon of a World instance two axes of the world frame are shown and the labels of these axes can be set via parameters.


BooleanenableAnimationtrue= true, if animation of all components is enabled
BooleananimateWorldtrue= true, if world coordinate system shall be visualized
BooleananimateGravitytrue= true, if gravity field shall be visualized (acceleration vector or field center)
BooleananimateGroundfalse= true, if ground plane shall be visualized
AxisLabellabel1"x"Label of horizontal axis in icon
AxisLabellabel2"y"Label of vertical axis in icon
GravityTypesgravityTypeGravityTypes.​UniformGravityType of gravity field
AccelerationgModelica.​Constants.​g_nConstant gravity acceleration
Axisn[3]{0, -1, 0}Direction of gravity resolved in world frame (gravity = g*n/length(n))
Realmue3.986004418e+14Gravity field constant (default = field constant of earth)
BooleandriveTrainMechanics3Dtrue= true, if 3-dim. mechanical effects of Parts.Mounting1D/Rotor1D/BevelGear1D shall be taken into account
DistanceaxisLength0.5 * nominalLengthLength of world axes arrows
DistanceaxisDiameteraxisLength / defaultFrameDiameterFractionDiameter of world axes arrows
BooleanaxisShowLabelstrue= true, if labels shall be shown
PositiongravityArrowTail[3]{0, 0, 0}Position vector from origin of world frame to arrow tail, resolved in world frame
LengthgravityArrowLength0.5 * axisLengthLength of gravity arrow
DiametergravityArrowDiametergravityArrowLength / defaultWidthFractionDiameter of gravity arrow
DiametergravitySphereDiameter1.2742e+7Diameter of sphere representing gravity center (default = mean diameter of earth)
AxisgroundAxis_u[3]if 0.99 <= abs(n[1]) then {0, 1, 0} else {1, 0, 0}Vector along 1st axis (called u) of ground plane, resolved in world frame (should be perpendicular to gravity direction)
LengthgroundLength_u2Length of ground plane along groundAxis_u
LengthgroundLength_vgroundLength_uLength of ground plane perpendicular to groundAxis_u
LengthnominalLength1"Nominal" length of multi-body system
LengthdefaultAxisLength0.2 * nominalLengthDefault for length of a frame axis (but not world frame)
LengthdefaultJointLength0.1 * nominalLengthDefault for the fixed length of a shape representing a joint
LengthdefaultJointWidth0.05 * nominalLengthDefault for the fixed width of a shape representing a joint
LengthdefaultForceLength0.1 * nominalLengthDefault for the fixed length of a shape representing a force (e.g., damper)
LengthdefaultForceWidth0.05 * nominalLengthDefault for the fixed width of a shape representing a force (e.g., spring, bushing)
LengthdefaultBodyDiameter0.111111111111111 * nominalLengthDefault for diameter of sphere representing the center of mass of a body
RealdefaultWidthFraction20Default for shape width as a fraction of shape length (e.g., for Parts.FixedTranslation)
LengthdefaultArrowDiameter0.025 * nominalLengthDefault for arrow diameter (e.g., of forces, torques, sensors)
RealdefaultFrameDiameterFraction40Default for arrow diameter of a coordinate system as a fraction of axis length
RealdefaultSpecularCoefficient0.7Default reflection of ambient light (= 0: light is completely absorbed)
RealdefaultN_to_m1000Default scaling of force arrows (length = force/defaultN_to_m)
RealdefaultNm_to_m1000Default scaling of torque arrows (length = torque/defaultNm_to_m)


Frame_bframe_bCoordinate system fixed in the origin of the world frame

Generated 2018-12-12 12:12:55 EST by MapleSim.