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 and a spherical joint at frame_b that are connected together with a rigid rod, see default animation figure (the arrows are not part of the default animation):

model Joints.UniversalSpherical

This joint aggregation has no mass and no inertia and introduces the constraint that 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 according to the most often occurring case. In a future release, axis 2 might be explicitly definable via a parameter. However, the treatment is much more complicated 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 parallel to other. Therefore, if possible n1_a should be selected in such a way that it is perpendicular to rRod_ia in the initial configuration (i.e., the distance to the singularity is as large as possible).

An additional frame_ia is present. It is fixed in the connecting rod at the origin of frame_a. The placement of frame_ia on the rod is implicitly defined by the universal joint (frame_a and frame_ia coincide when the angles of the two revolute joints of the universal joint are zero) and by parameter vector rRod_ia, the position vector from 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 the MultiBody system in a reference configuration where all frames of all components are parallel to other (alternatively, at least frame_a and frame_ia of the UniversalSpherical joint should be parallel to other when defining an instance of this component). 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 resolved in frame_a (or the world frame, if all frames are parallel to other).

This joint aggregation can be used in cases where in reality a rod with spherical joints at end are present. Such a system has an additional degree of freedom to rotate the rod along its axis. In practice this rotation is usually of no interest and is mathematically removed by replacing one of the spherical joints by a universal joint. Still, in most cases the Joints.SphericalSpherical joint aggregation can be used instead of the UniversalSpherical joint since the rod is animated and its mass properties are approximated by a point mass in the middle of the rod. The SphericalSpherical joint has 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 from the 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

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_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

mo_specularCoefficient

specularCoefficient

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

Scalar

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_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

mo_checkTotalPower

checkTotalPower

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

Scalar

true
false

UniversalSpherical_3

NameLabelDescriptionData TypeValid Values

mo_f_rod

f_rod

f_rod

Structure

mo_f_rod/fixed

fixed

Cell of scalars

true
false

mo_f_rod/start

start

Cell of scalars

mo_totalPower

totalPower

totalPower

Structure

mo_totalPower/fixed

fixed

Cell of scalars

true
false

mo_totalPower/start

start

Cell of scalars

mo_f_b_a1

f_b_a1

f_b_a1

Structure

mo_f_b_a1/fixed

fixed

Cell of vectors of size 3

true
false

mo_f_b_a1/start

start

Cell of vectors of size 3

mo_eRod_a

eRod_a

eRod_a

Structure

mo_eRod_a/fixed

fixed

Cell of vectors of size 3

true
false

mo_eRod_a/start

start

Cell of vectors 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

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