BodyShape

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

    BodyShape

Library

Modelica/Mechanics/MultiBody/Parts

Description

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 acoordinate system that is parallel to frame_a with theorigin at the center of mass of the body. The coordinate system frame_bis always parallel to frame_a.

By default, this component is visualized by any shape that can bedefined with Modelica.Mechanics.MultiBody.Visualizers.FixedShape. This shape is placedbetween frame_a and frame_b (default: length(shape) = Frames.length(r)).Additionally a sphere may be visualized that hasits center at the center of mass.Note, thatthe 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 thesestates and of the "Advanced" menu parameters, see modelMultiBody.Parts.Body.

Parameters

BodyShape_0

NameLabelDescriptionData TypeValid Values

mo_animation

animation

= true, if animation shall be enabled (show shape between frame_a and frame_b and optionally a sphere at the center of mass)

Scalar

true
false

mo_animateSphere

animateSphere

= true, if mass shall be animated as sphere provided animation=true

Scalar

true
false

mo_r

r

Vector from frame_a to frame_b resolved in frame_a

Vector of size 3

mo_r_CM

r_CM

Vector from frame_a to center of mass, resolved in frame_a

Vector of size 3

mo_m

m

Mass of rigid body

Scalar

mo_I_11

I_11

(1,1) element of inertia tensor

Scalar

mo_I_22

I_22

(2,2) element of inertia tensor

Scalar

mo_I_33

I_33

(3,3) element of inertia tensor

Scalar

mo_I_21

I_21

(2,1) element of inertia tensor

Scalar

mo_I_31

I_31

(3,1) element of inertia tensor

Scalar

mo_I_32

I_32

(3,2) element of inertia tensor

Scalar

BodyShape_1

NameLabelDescriptionData TypeValid Values

mo_r_0

r_0

r_0

Structure

mo_r_0/fixed

fixed

Cell of vectors of size 3

true
false

mo_r_0/start

start

Cell of vectors of size 3

mo_v_0

v_0

v_0

Structure

mo_v_0/fixed

fixed

Cell of vectors of size 3

true
false

mo_v_0/start

start

Cell of vectors of size 3

mo_a_0

a_0

a_0

Structure

mo_a_0/fixed

fixed

Cell of vectors of size 3

true
false

mo_a_0/start

start

Cell of vectors of size 3

mo_angles_fixed

angles_fixed

= true, if angles_start are used as initial values, else as guess values

Scalar

true
false

mo_angles_start

angles_start

Initial values of angles to rotate frame_a around 'sequence_start' axes into frame_b

Vector of size 3

mo_sequence_start

sequence_start

Sequence of rotations to rotate frame_a into frame_b at initial time

Vector of size 3

mo_w_0_fixed

w_0_fixed

= true, if w_0_start are used as initial values, else as guess values

Scalar

true
false

mo_w_0_start

w_0_start

Initial or guess values of angular velocity of frame_a resolved in world frame

Vector of size 3

mo_z_0_fixed

z_0_fixed

= true, if z_0_start are used as initial values, else as guess values

Scalar

true
false

mo_z_0_start

z_0_start

Initial values of angular acceleration z_0 = der(w_0)

Vector of size 3

BodyShape_2

NameLabelDescriptionData TypeValid Values

mo_shapeType

shapeType

Type of shape

String

mo_r_shape

r_shape

Vector from frame_a to shape origin, resolved in frame_a

Vector of size 3

mo_lengthDirection

lengthDirection

Vector in length direction of shape, resolved in frame_a

Vector of size 3

mo_widthDirection

widthDirection

Vector in width direction of shape, resolved in frame_a

Vector of size 3

mo_length

length

Length of shape

Scalar

mo_width

width

Width of shape

Scalar

mo_height

height

Height of shape

Scalar

mo_extra

extra

Additional parameter depending on shapeType (see docu of Visualizers.Advanced.Shape)

Scalar

mo_color

color

Color of shape

Vector of size 3

mo_specularCoefficient

specularCoefficient

Reflection of ambient light (= 0: light is completely absorbed)

Scalar

mo_sphereDiameter

sphereDiameter

Diameter of sphere

Scalar

mo_sphereColor

sphereColor

Color of sphere of mass

Vector of size 3

BodyShape_3

NameLabelDescriptionData TypeValid Values

mo_enforceStates

enforceStates

= true, if absolute variables of body object shall be used as states (StateSelect.always)

Scalar

true
false

mo_useQuaternions

useQuaternions

= true, if quaternions shall be used as potential states otherwise use 3 angles as potential states

Scalar

true
false

mo_sequence_angleStates

sequence_angleStates

Sequence of rotations to rotate world frame into frame_a around the 3 angles used as potential states

Vector of size 3

BodyShape_4

NameLabelDescriptionData TypeValid Values

mo__nmodifiers

Number of Modifiers

Specifies the number of modifiers

Number

mo__modifiers

Modifiers

Add new modifier

Structure

mo__modifiers/varname

Variable name

Cell of strings

mo__modifiers/attribute

Attribute

Cell of strings

'start'
'fixed'

mo__modifiers/value

Value

Ports

NameTypeDescriptionIO TypeNumber

frame_a

implicit

Coordinate system fixed to the component with one cut-force and cut-torque

input

1

frame_b

implicit

Coordinate system fixed to the component with one cut-force and cut-torque

output

1

See Also