UniversalSpherical

Universal - spherical joint aggregation (1 constraint, no potential states)

    UniversalSpherical

Library

Modelica/Mechanics/MultiBody/Joints

Description

This component consists of a universal joint at frame_a anda spherical joint at frame_b that are connected together witha rigid rod, see default animation figure (the arrows are notpart of the default animation):

model Joints.UniversalSpherical

This joint aggregation has no mass and no inertia and introduces the constraintthat the distance between the origin of frame_a and the origin of frame_b is constant(= Frames.length(rRod_ia)). The universal joint is defined in the following way:

  • The rotation axis of revolute joint 1 is along parameter vector n1_a which is fixed in frame_a.
  • The rotation axis of revolute joint 2 is perpendicular to axis 1 and to the line connecting the universal and the spherical joint.

The definition of axis 2 of the universal joint is performed accordingto the most often occurring case. In a future release, axis 2 mightbe explicitly definable via a parameter. However, the treatment is much morecomplicated and the number of operations is considerably higher,if axis 2 is not orthogonal to axis 1 and to the connecting rod.

Note, there is a singularity when axis 1 and the connecting rod are parallelto other. Therefore, if possible n1_a should be selected in such a way that itis perpendicular to rRod_ia in the initial configuration (i.e., thedistance to the singularity is as large as possible).

An additional frame_ia is present. It is fixed in the connectingrod at the origin of frame_a. The placement of frame_ia on the rodis implicitly defined by the universal joint (frame_a and frame_ia coincidewhen the angles of the two revolute joints of the universal joint are zero)and by parameter vector rRod_ia, the position vectorfrom the origin of frame_a to the origin of frame_b, resolved in frame_ia.

The easiest way to define the parameters of this joint is by moving theMultiBody system in a reference configuration where all framesof all components are parallel to other (alternatively,at least frame_a and frame_ia of the UniversalSpherical jointshould be parallel to other when defining an instance of thiscomponent). Since frame_a and frame_ia are parallel to other,vector rRod_ia from frame_a to frame_b resolved in frame_ia can be resolvedin frame_a (or the world frame, if all frames are parallel to other).

This joint aggregation can be used in cases wherein reality a rod with spherical joints at end are present.Such a system has an additional degree of freedom to rotatethe rod along its axis. In practice this rotation is usuallyof no interest and is mathematically removed by replacing oneof the spherical joints by a universal joint. Still, in mostcases the Joints.SphericalSpherical joint aggregation can be used insteadof the UniversalSpherical jointsince the rod is animated and its mass properties are approximated bya point mass in the middle of the rod. The SphericalSpherical jointhas the advantage that it does not have a singular configuration.

In the public interface of the UniversalSpherical joint, the following(final) parameters are provided:

  parameter Real rodLength(unit="m")  "Length of rod";  parameter Real eRod_ia[3] "Unit vector along rod, resolved in frame_ia";  parameter Real e2_ia  [3] "Unit vector along axis 2, resolved in frame_ia";

This allows a more convenient definition of data which is related to the rod.For example, if a box shall be connected at frame_ia directing fromthe origin of frame_a to the middle of the rod, this might be defined as:

    Modelica.Mechanics.MultiBody.Joints.UniversalSpherical jointUS(rRod_ia={1.2, 1, 0.2});    Modelica.Mechanics.MultiBody.Visualizers.FixedShape    shape(shapeType       = "box",                                              lengthDirection = jointUS.eRod_ia,                                              widthDirection  = jointUS.e2_ia,                                              length          = jointUS.rodLength/2,                                              width           = jointUS.rodLength/10);  equation    connect(jointUS.frame_ia, shape.frame_a);

Parameters

UniversalSpherical_0

NameLabelDescriptionData TypeValid Values

mo_animation

animation

= true, if animation shall be enabled

Scalar

true
false

mo_showUniversalAxes

showUniversalAxes

= true, if universal joint shall be visualized with two cylinders, otherwise with a sphere (provided animation=true)

Scalar

true
false

mo_computeRodLength

computeRodLength

= true, if distance between frame_a and frame_b shall be computed during initialization (see info)

Scalar

true
false

mo_n1_a

n1_a

Axis 1 of universal joint resolved in frame_a (axis 2 is orthogonal to axis 1 and to rod)

Vector of size 3

mo_rRod_ia

rRod_ia

Vector from origin of frame_a to origin of frame_b, resolved in frame_ia (if computeRodLength=true, rRod_ia is only an axis vector along the connecting rod)

Vector of size 3

mo_rodLength

rodLength

Length of rod (distance between origin of frame_a and origin of frame_b)

Scalar

mo_eRod_ia

eRod_ia

Unit vector from origin of frame_a to origin of frame_b, resolved in frame_ia

Vector of size 3

mo_e2_ia

e2_ia

Unit vector in direction of axis 2 of universal joint, resolved in frame_ia (orthogonal to n1_a and eRod_ia; note: frame_ia is parallel to frame_a when the universal joint angles are zero)

Vector of size 3

mo_e3_ia

e3_ia

Unit vector perpendicular to eRod_ia and e2_ia, resolved in frame_ia

Vector of size 3

mo_rRod_0

rRod_0

rRod_0

Structure

mo_rRod_0/fixed

fixed

Cell of vectors of size 3

true
false

mo_rRod_0/start

start

Cell of vectors of size 3

mo_rRod_a

rRod_a

rRod_a

Structure

mo_rRod_a/fixed

fixed

Cell of vectors of size 3

true
false

mo_rRod_a/start

start

Cell of vectors of size 3

mo_length2_n2_a

length2_n2_a

length2_n2_a

Structure

mo_length2_n2_a/fixed

fixed

Cell of scalars

true
false

mo_length2_n2_a/start

start

Cell of scalars

UniversalSpherical_1

NameLabelDescriptionData TypeValid Values

mo_sphereDiameter

sphereDiameter

Diameter of spheres representing the universal and the spherical joint

Scalar

mo_sphereColor

sphereColor

Color of spheres representing the universal and the spherical joint

Vector of size 3

mo_rodShapeType

rodShapeType

Shape type of rod connecting the universal and the spherical joint

String

mo_rodWidth

rodWidth

Width of rod shape in direction of axis 2 of universal joint.

Scalar

mo_rodHeight

rodHeight

Height of rod shape in direction that is orthogonal to rod and to axis 2

Scalar

mo_rodExtra

rodExtra

Additional parameter depending on rodShapeType

Scalar

mo_rodColor

rodColor

Color of rod shape connecting the universal and the spherical joints

Vector of size 3

mo_specularCoefficient

specularCoefficient

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

Scalar

mo_cylinderLength

cylinderLength

Length of cylinders representing the two universal joint axes

Scalar

mo_cylinderDiameter

cylinderDiameter

Diameter of cylinders representing the two universal joint axes

Scalar

mo_cylinderColor

cylinderColor

Color of cylinders representing the two universal joint axes

Vector of size 3

UniversalSpherical_2

NameLabelDescriptionData TypeValid Values

mo_kinematicConstraint

kinematicConstraint

= false, if no constraint shall be defined, due to analytically solving a kinematic loop

Scalar

true
false

mo_checkTotalPower

checkTotalPower

= true, if total power flowing into this component shall be determined (must be zero)

Scalar

true
false

mo_constraintResidue

constraintResidue

Constraint equation of joint in residue form: Either length constraint (= default) or equation to compute rod force (for analytic solution of loops in combination with Internal.RevoluteWithLengthConstraint/PrismaticWithLengthConstraint)

Scalar

UniversalSpherical_3

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

'f_rod'
'totalPower'
'f_b_a1'
'eRod_a'
'f_b_a'
'f_ia_a'
't_ia_a'
'n2_a'
'length_n2_a'
'e2_a'
'e3_a'
'der_rRod_a_L'
'w_rel_ia1'
'R_rel_ia1'
'R_rel_ia2'
'R_rel_ia'

mo__modifiers/attribute

Attribute

Cell of strings

'start'
'fixed'

mo__modifiers/value

Value

Ports

NameTypeDescriptionIO TypeNumber

frame_a

implicit

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

input

1

frame_b

implicit

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

output

1

frame_ia

implicit

Coordinate system at the origin of frame_a, fixed at the rod connecting the universal with the spherical joint

input

2