A joint has two mechanical cuts which may move relative to each other. In every cut a coordinate system is rigidly attached, called frame_a and frame_b, correspondingly. It is a massless element in which no energy is stored. Mathematically, a joint transforms the kinematic properties of frame_a to frame_b and at the same time transforms the force and torque acting on frame_b to frame_a.
A general multibody system with closed kinematic loops is handeled by dividing the joints into two distinct sets: Tree-Joints and Cut-Joints. After removal of all of the Cut-Joints, the resulting system must have a tree-structure. Class TreeJoint is used as a superclass for Tree-Joints.
The relative motion between the two cut-frames of a Tree-Joint is described by f (0 <= f <= 6) generalized minimal-coordinates q and their first and second derivatives qd, qdd. In subclasses of class TreeJoint the relative kinematic quantities are given as functions of q, qd, qdd, according to the specific joint type. In class TreeJoint the relationships are provided between the kinematic and dynamic quantities of frame_a and frame_b and of the relative quantities.
In order to speedup the generation of the equations, the common equations of TreeJoint classes are not stored in model TreeJoint, but in the specific submodel. This has the advantage that special joint properties (like S_rel=identity(3), i.e., the relative transformation matrix is a unit matrix) are already utilized and the Modelica translator does not have to waste time and space to find this out by symbolic formula transformation. The common equations which could be stored in the TreeJoint model are given as a comment below.