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).
Name | Description |
---|---|
Examples … | Examples that demonstrate the usage of the MultiBody library |
Forces … | Components that exert forces and/or torques between frames |
Frames … | Functions to transform rotational frame quantities |
Icons … | Icons for MultiBody package |
Interfaces … | Connectors and partial models for 3-dim. mechanical components |
Joints … | Components that constrain the motion between two frames |
Parts … | Rigid components such as bodies with mass and inertia and massless rods |
Sensors … | Sensors to measure variables |
Types … | Constants and types with choices, especially to build menus |
UsersGuide … | User's Guide of MultiBody Library |
Visualizers … | 3-dimensional visual objects used for animation |
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.
Type | Name | Default | Description |
---|---|---|---|
Boolean | enableAnimation | true | = true, if animation of all components is enabled |
Boolean | animateWorld | true | = true, if world coordinate system shall be visualized |
Boolean | animateGravity | true | = true, if gravity field shall be visualized (acceleration vector or field center) |
Boolean | animateGround | false | = true, if ground plane shall be visualized |
AxisLabel | label1 | "x" | Label of horizontal axis in icon |
AxisLabel | label2 | "y" | Label of vertical axis in icon |
GravityTypes | gravityType | GravityTypes.UniformGravity | Type of gravity field |
Acceleration | g | Modelica.Constants.g_n | Constant gravity acceleration |
Axis | n[3] | {0, -1, 0} | Direction of gravity resolved in world frame (gravity = g*n/length(n)) |
Real | mue | 3.986004418e+14 | Gravity field constant (default = field constant of earth) |
Boolean | driveTrainMechanics3D | true | = true, if 3-dim. mechanical effects of Parts.Mounting1D/Rotor1D/BevelGear1D shall be taken into account |
Distance | axisLength | 0.5 * nominalLength | Length of world axes arrows |
Distance | axisDiameter | axisLength / defaultFrameDiameterFraction | Diameter of world axes arrows |
Boolean | axisShowLabels | true | = true, if labels shall be shown |
Position | gravityArrowTail[3] | {0, 0, 0} | Position vector from origin of world frame to arrow tail, resolved in world frame |
Length | gravityArrowLength | 0.5 * axisLength | Length of gravity arrow |
Diameter | gravityArrowDiameter | gravityArrowLength / defaultWidthFraction | Diameter of gravity arrow |
Diameter | gravitySphereDiameter | 1.2742e+7 | Diameter of sphere representing gravity center (default = mean diameter of earth) |
Axis | groundAxis_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) |
Length | groundLength_u | 2 | Length of ground plane along groundAxis_u |
Length | groundLength_v | groundLength_u | Length of ground plane perpendicular to groundAxis_u |
Length | nominalLength | 1 | "Nominal" length of multi-body system |
Length | defaultAxisLength | 0.2 * nominalLength | Default for length of a frame axis (but not world frame) |
Length | defaultJointLength | 0.1 * nominalLength | Default for the fixed length of a shape representing a joint |
Length | defaultJointWidth | 0.05 * nominalLength | Default for the fixed width of a shape representing a joint |
Length | defaultForceLength | 0.1 * nominalLength | Default for the fixed length of a shape representing a force (e.g., damper) |
Length | defaultForceWidth | 0.05 * nominalLength | Default for the fixed width of a shape representing a force (e.g., spring, bushing) |
Length | defaultBodyDiameter | 0.111111111111111 * nominalLength | Default for diameter of sphere representing the center of mass of a body |
Real | defaultWidthFraction | 20 | Default for shape width as a fraction of shape length (e.g., for Parts.FixedTranslation) |
Length | defaultArrowDiameter | 0.025 * nominalLength | Default for arrow diameter (e.g., of forces, torques, sensors) |
Real | defaultFrameDiameterFraction | 40 | Default for arrow diameter of a coordinate system as a fraction of axis length |
Real | defaultSpecularCoefficient | 0.7 | Default reflection of ambient light (= 0: light is completely absorbed) |
Real | defaultN_to_m | 1000 | Default scaling of force arrows (length = force/defaultN_to_m) |
Real | defaultNm_to_m | 1000 | Default scaling of torque arrows (length = torque/defaultNm_to_m) |
Type | Name | Description |
---|---|---|
Frame_b | frame_b | Coordinate system fixed in the origin of the world frame |
Generated 2018-12-12 12:12:55 EST by MapleSim.