modelBodyShape
Information
Attribution Notice
This model is a modification of the BodyShape block in the Mechanics.MultiBody.Parts package
of the Modelica Standard Library
Copyright © 1998-2016, Modelica Association and DLR.
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.
The following shapes can be defined via parameter shapeType, e.g., shapeType="cone":
A BodyShape component has potential states. For details of these states and of the "Advanced" menu parameters, see model MultiBody.Parts.Body.
Copyright © 2018
ATA ENGINEERING, INC.
ALL RIGHTS RESERVED
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | animation | true | = true, if animation shall be enabled (show shape between frame_a and frame_b and optionally a sphere at the center of mass) |
| Boolean | animateSphere | true | = true, if mass shall be animated as sphere provided animation=true |
| SI.Position[3] | r | Vector from frame_a to frame_b resolved in frame_a | |
| SI.Position[3] | r_CM | Vector from frame_a to center of mass, resolved in frame_a | |
| SI.Mass | m | Mass of body | |
| Inertia tensor (resolved in center of mass, parallel to frame_a) | |||
| SI.Inertia | I_11 | 0.001 | (1,1) element of inertia tensor |
| SI.Inertia | I_22 | 0.001 | (2,2) element of inertia tensor |
| SI.Inertia | I_33 | 0.001 | (3,3) element of inertia tensor |
| SI.Inertia | I_21 | 0 | (2,1) element of inertia tensor |
| SI.Inertia | I_31 | 0 | (3,1) element of inertia tensor |
| SI.Inertia | I_32 | 0 | (3,2) element of inertia tensor |
| Initialization | |||
| SI.Angle[3] | angles_start | {0, 0, 0} | Initial values of angles to rotate frame_a around 'sequence_start' axes into frame_b |
| Types.RotationSequence | sequence_start | {1, 2, 3} | Sequence of rotations to rotate frame_a into frame_b at initial time |
| Animation › if animation = true | |||
| Types.ShapeType | shapeType | "cylinder" | Type of shape |
| SI.Position[3] | r_shape | {0, 0, 0} | Vector from frame_a to shape origin, resolved in frame_a |
| Types.Axis | lengthDirection | to_unit1(r - r_shape) | Vector in length direction of shape, resolved in frame_a |
| Types.Axis | widthDirection | {0, 1, 0} | Vector in width direction of shape, resolved in frame_a |
| SI.Length | length | Modelica.Math.Vectors.length(r - r_shape) | Length of shape |
| SI.Distance | width | length/world.defaultWidthFraction | Width of shape |
| SI.Distance | height | width | Height of shape |
| Types.ShapeExtra | extra | 0.0 | Additional parameter depending on shapeType (see docu of Visualizers.Advanced.Shape) |
| Animation › if animation = true and animateSphere = true | |||
| SI.Diameter | sphereDiameter | 2*width | Diameter of sphere |
| Advanced | |||
| Boolean | enforceStates | false | = true, if absolute variables of body object shall be used as states (StateSelect.always) |
| Boolean | useQuaternions | true | = true, if quaternions shall be used as potential states otherwise use 3 angles as potential states |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Mechanics.MultiBody.Interfaces.Frame_a | frame_a | Coordinate system fixed to the component with one cut-force and cut-torque | |
| Modelica.Mechanics.MultiBody.Interfaces.Frame_b | frame_b | Coordinate system fixed to the component with one cut-force and cut-torque |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Position[3] | r_0 | Position vector from origin of world frame to origin of frame_a | |
| SI.Velocity[3] | v_0 | Absolute velocity of frame_a, resolved in world frame (= der(r_0)) | |
| SI.Acceleration[3] | a_0 | Absolute acceleration of frame_a resolved in world frame (= der(v_0)) | |
| Types.Color | color | Modelica.Mechanics.MultiBody.Types.Defaults.BodyColor | Color of shape |
| Types.Color | sphereColor | color | Color of sphere of mass |
| Types.SpecularCoefficient | specularCoefficient | world.defaultSpecularCoefficient | Reflection of ambient light (= 0: light is completely absorbed) |
| Modelica.Mechanics.MultiBody.Parts.FixedTranslation | frameTranslation | ||
| Parts.Utilities.Body | body |