modelBodyShape

Rigid body with mass, inertia tensor, different shapes for animation, and two frame connectors (12 potential states)

Information

Rigid body with mass and inertia tensor and two frame connectors. All parameter vectors have to be resolved in frame_a. The inertia tensor has to be defined with respect to a coordinate system that is parallel to frame_a with the origin at the center of mass of the body. The coordinate system frame_b is always parallel to frame_a.

By default, this component is visualized by any shape that can be defined with Modelica.Mechanics.MultiBody.Visualizers.FixedShape. This shape is placed between frame_a and frame_b (default: length(shape) = Frames.length(r)). Additionally a sphere may be visualized that has its center at the center of mass. Note, that the animation may be switched off via parameter animation = false.

Parts.BodyShape

The following shapes can be defined via parameter shapeType, e.g., shapeType="cone":

Visualizers.FixedShape

A BodyShape component has potential states. For details of these states and of the "Advanced" menu parameters, see model MultiBody.Parts.Body.

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled (show shape between frame_a and frame_b and optionally a sphere at the center of mass)
BooleananimateSpheretrue= true, if mass shall be animated as sphere provided animation=true
SI.Position[3]rVector from frame_a to frame_b resolved in frame_a
SI.Position[3]r_CMVector from frame_a to center of mass, resolved in frame_a
SI.MassmMass of rigid body
Inertia tensor (resolved in center of mass, parallel to frame_a)
SI.InertiaI_110.001Element (1,1) of inertia tensor
SI.InertiaI_220.001Element (2,2) of inertia tensor
SI.InertiaI_330.001Element (3,3) of inertia tensor
SI.InertiaI_210Element (2,1) of inertia tensor
SI.InertiaI_310Element (3,1) of inertia tensor
SI.InertiaI_320Element (3,2) of inertia tensor
Initialization
Booleanangles_fixedfalse= true, if angles_start are used as initial values, else as guess values
SI.Angle[3]angles_start{0, 0, 0}Initial values of angles to rotate world frame around 'sequence_start' axes into frame_a
Types.RotationSequencesequence_start{1, 2, 3}Sequence of rotations to rotate world frame into frame_a at initial time
Booleanw_0_fixedfalse= true, if w_0_start are used as initial values, else as guess values
SI.AngularVelocity[3]w_0_start{0, 0, 0}Initial or guess values of angular velocity of frame_a resolved in world frame
Booleanz_0_fixedfalse= true, if z_0_start are used as initial values, else as guess values
SI.AngularAcceleration[3]z_0_start{0, 0, 0}Initial values of angular acceleration z_0 = der(w_0)
Animation › if animation = true
Types.ShapeTypeshapeType"cylinder"Type of shape
SI.Position[3]r_shape{0, 0, 0}Vector from frame_a to shape origin, resolved in frame_a
Types.AxislengthDirectionto_unit1(r - r_shape)Vector in length direction of shape, resolved in frame_a
Types.AxiswidthDirection{0, 1, 0}Vector in width direction of shape, resolved in frame_a
SI.LengthlengthModelica.Math.Vectors.length(r - r_shape)Length of shape
SI.Distancewidthlength/world.defaultWidthFractionWidth of shape
SI.DistanceheightwidthHeight of shape
Types.ShapeExtraextra0.0Additional parameter depending on shapeType (see docu of Visualizers.Advanced.Shape)
Animation › if animation = true and animateSphere = true
SI.DiametersphereDiameter2*widthDiameter of sphere
Advanced
BooleanenforceStatesfalse= true, if absolute variables of body object shall be used as states (StateSelect.always)
BooleanuseQuaternionstrue= true, if quaternions shall be used as potential states otherwise use 3 angles as potential states
Types.RotationSequencesequence_angleStates{1, 2, 3}Sequence of rotations to rotate world frame into frame_a around the 3 angles used as potential states

Connectors

TypeNameDefaultDescription
Interfaces.Frame_aframe_aCoordinate system fixed to the component with one cut-force and cut-torque
Interfaces.Frame_bframe_bCoordinate system fixed to the component with one cut-force and cut-torque

Components

TypeNameDefaultDescription
SI.Position[3]r_0Position vector from origin of world frame to origin of frame_a
SI.Velocity[3]v_0Absolute velocity of frame_a, resolved in world frame (= der(r_0))
SI.Acceleration[3]a_0Absolute acceleration of frame_a resolved in world frame (= der(v_0))
Types.ColorcolorModelica.Mechanics.MultiBody.Types.Defaults.BodyColorColor of shape
Types.ColorsphereColorcolorColor of sphere of mass
Types.SpecularCoefficientspecularCoefficientworld.defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)
FixedTranslationframeTranslation
Bodybody