modelFixedRotation
Fixed translation followed by a fixed rotation of frame_b with respect to frame_a
Information
Component for a fixed translation and fixed rotation of frame_b with respect to frame_a, i.e., the relationship between connectors frame_a and frame_b remains constant. There are several possibilities to define the orientation of frame_b with respect to frame_a:
- Planar rotation along axis 'n' (that is fixed and resolved in frame_a) with a fixed angle 'angle'.
- Vectors n_x and n_y that are directed along the corresponding axes direction of frame_b and are resolved in frame_a (if n_y is not orthogonal to n_x, the y-axis of frame_b is selected such that it is orthogonal to n_x and in the plane of n_x and n_y).
- Sequence of three planar axes rotations. For example, "sequence = {1,2,3}" and "angles = {90, 45, -90}" means to rotate frame_a around the x axis with 90 degrees, around the new y axis with 45 degrees and around the new z axis around -90 degrees to arrive at frame_b. Note, that sequence={1,2,3} is the Cardan angle sequence and sequence = {3,1,3} is the Euler angle sequence.
By default, this component is visualized by a cylinder connecting frame_a and frame_b, as shown in the figure below. In this figure frame_b is rotated along the z-axis of frame_a with 60 degree. Note, that the two visualized frames are not part of the component animation and that the animation may be switched off via parameter animation = false.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | animation | true | = true, if animation shall be enabled |
| SI.Position[3] | r | {0, 0, 0} | Vector from frame_a to frame_b resolved in frame_a |
| Modelica.Mechanics.MultiBody.Types.RotationTypes | rotationType | Modelica.Mechanics.MultiBody.Types.RotationTypes.RotationAxis | Type of rotation description |
| Frames.Orientation | R_rel | if rotationType == Types.RotationTypes.RotationAxis then Frames.planarRotation(Modelica.Math.Vectors.normalizeWithAssert(n), Cv.from_deg(angle), 0) else if rotationType == Types.RotationTypes.TwoAxesVectors then Frames.from_nxy(n_x, n_y) else Frames.axesRotations(sequence, Cv.from_deg(angles), zeros(3)) | Fixed rotation object from frame_a to frame_b |
| if rotationType = RotationAxis | |||
| Modelica.Mechanics.MultiBody.Types.Axis | n | {1, 0, 0} | Axis of rotation in frame_a (= same as in frame_b) |
| Modelica.Units.NonSI.Angle_deg | angle | 0 | Angle to rotate frame_a around axis n into frame_b |
| if rotationType = TwoAxesVectors | |||
| Modelica.Mechanics.MultiBody.Types.Axis | n_x | {1, 0, 0} | Vector along x-axis of frame_b resolved in frame_a |
| Modelica.Mechanics.MultiBody.Types.Axis | n_y | {0, 1, 0} | Vector along y-axis of frame_b resolved in frame_a |
| if rotationType = PlanarRotationSequence | |||
| Modelica.Mechanics.MultiBody.Types.RotationSequence | sequence | {1, 2, 3} | Sequence of rotations |
| Modelica.Units.NonSI.Angle_deg[3] | angles | {0, 0, 0} | Rotation angles around the axes defined in 'sequence' |
| Animation › if animation = true | |||
| Modelica.Mechanics.MultiBody.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 |
| Modelica.Mechanics.MultiBody.Types.Axis | lengthDirection | to_unit1(r - r_shape) | Vector in length direction of shape, resolved in frame_a |
| Modelica.Mechanics.MultiBody.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 |
| Modelica.Mechanics.MultiBody.Types.ShapeExtra | extra | 0.0 | Additional parameter depending on shapeType (see docu of Visualizers.Advanced.Shape) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Interfaces.Frame_a | frame_a | Coordinate system fixed to the component with one cut-force and cut-torque | |
| Interfaces.Frame_b | frame_b | Coordinate system fixed to the component with one cut-force and cut-torque |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Mechanics.MultiBody.Types.Color | color | Modelica.Mechanics.MultiBody.Types.Defaults.RodColor | Color of shape |
| Modelica.Mechanics.MultiBody.Types.SpecularCoefficient | specularCoefficient | world.defaultSpecularCoefficient | Reflection of ambient light (= 0: light is completely absorbed) |
Revisions
Release Notes:
- July 28, 2003
Bug fixed: if rotationType = PlanarRotationSequence, then 'angles' was used with unit [rad] instead of [deg].