Joints are massles objects, that define the relative movement between two rigid elements. The number of degrees of freedom specifies how many variables are minimally needed to describe the relative position. An object in 3D-space can have up to 6 degrees of freedom.
Joints usually define integrators and the joint variables on positional and velocity level
become state variables of the system. Anyhow the integrators might be removed by the Pantelides algorithm, if the joint is placed in a kinematic loop.
The number of degrees of freedom equals the number of potential state variables.
The state variables have to be reinitialized at a force impulse. Hence, the selection of the reinitialization points must be done manually and is equal to the selection of the state variables that also should be done manually.
It is possible and common to create complex joints out of simple joints. However, one has to pay attention that no singularities occur if two or more joints are connected (directly or through massless elements).
Name | Description |
---|---|
![]() | revolute joint with 1 degree of freedom |
![]() | prismatic joint with 1 degree of freedom |
![]() | spherical joint with all 3 rotational degrees of freedom |
![]() | joint with all 3 translational degrees of freedom |
![]() | joint with all 6 degrees of freedom |
![]() | potential joint with all 6 degrees of freedom |
![]() | element to close kinematik loops manualy |
![]() |
The parameter phi_offset defines an offset value for the revolute angle phi.
The parameter animation toggles the visualization of the element.
The activation of reinitByImpulse determines the state variables to be reinitialized in case of a force impulse. It is coupled by default with the parameter enforceStates. The selection of the reinitialization points must be done manually.
Type | Name | Default | Description |
---|---|---|---|
Boolean | animation | true | animate revolute joint as cylinder |
Position | n[3] | {0,0,1} | direction of revolute axis [m] |
Angle_deg | phi_offset | 0 | phi + phi_offset = angle between frames [deg] |
Initialization | |||
Temp | initType | MB.Types.Init.Free | Type of initialization (defines usage of start values below) |
Angle_deg | phi_start | 0 | initial angle [deg] |
AngularVelocity_deg | w_start | 0 | initial angular velocity [deg/s] |
AngularAcceleration_deg | z_start | 0 | initial angular acceleration [deg/s2] |
Animation | |||
if animation = true | |||
Distance | cylinderLength | world3D.defaultJointLength | Length of cylinder representing the joint axis [m] |
Distance | cylinderDiameter | world3D.defaultJointWidth | Diameter of cylinder representing the joint axis [m] |
Color | cylinderColor[3] | world3D.defaultJointColor | Color of cylinder representing the joint axis |
Advanced | |||
Boolean | enforceStates | false | enforce phi and w as states |
Boolean | reinitByImpulse | enforceStates | reinit velocities by an impulse |
model Revolute "revolute joint with 1 degree of freedom" extends Mechanics3D.Joints.Revolute( redeclare Interfaces.IFrame_a frame_a, redeclare Interfaces.IFrame_b frame_b, redeclare Interfaces.IMech2MBG Mech2MBG1, redeclare Interfaces.MBG2IMech MBG2Mech1); parameter Boolean reinitByImpulse = enforceStates "|Advanced||reinit velocities by an impulse"; protected Real Rrel[3,3]; Real Wm; Real Wa; equation when frame_a.contact then Wa = w; Rrel = planarRotation1.Rrel; end when; if reinitByImpulse then when frame_b.contact then reinit(w,Wa+2*(Wm-Wa)); end when; end if; frame_a.contact = frame_b.contact; frame_a.F + frame_b.F = zeros(3); frame_a.Vm = frame_b.Vm; Rrel*frame_a.T + frame_b.T = zeros(3); frame_b.T*eN = 0; Rrel*frame_a.Wm = -Wm*eN+frame_b.Wm; end Revolute;
The parameter s_offset defines an offset value for the joint length s.
The parameter animation toggles the visualization of the element.
The activation of reinitByImpulse determines the state variables to be reinitialized in case of a force impulse. It is coupled by default with the parameter enforceStates. The selection of the reinitialization points must be done manually.
Type | Name | Default | Description |
---|---|---|---|
Boolean | animation | true | animate prismatic joint as box |
Position | n[3] | {1,0,0} | direction of the joint axis [m] |
Position | s_offset | 0 | Relative distance offset (distance between frame_a and frame_b = s_offset + s) [m] |
Initialization | |||
Temp | initType | MB.Types.Init.Free | Type of initialization (defines usage of start values below) |
Distance | s_start | 0 | initial length [m] |
Velocity | v_start | 0 | initial velocity [m/s] |
Acceleration | a_start | 0 | initial acceleration [m/s2] |
Animation | |||
if animation = true | |||
Distance | boxWidth | world3D.defaultJointWidth | Width of prismatic joint box [m] |
Distance | boxHeight | boxWidth | Height of prismatic joint box [m] |
Color | boxColor[3] | world3D.defaultJointColor | Color of prismatic joint box |
Advanced | |||
Boolean | enforceStates | false | enforce s and v as states |
Boolean | reinitByImpulse | enforceStates | reinit velocities by an impulse |
model Prismatic "prismatic joint with 1 degree of freedom" extends Mechanics3D.Joints.Prismatic( redeclare Interfaces.IFrame_a frame_a, redeclare Interfaces.IFrame_b frame_b, redeclare Interfaces.IMech2MBG Mech2MBG1, redeclare Interfaces.MBG2IMech MBG2Mech1); parameter Boolean reinitByImpulse = enforceStates "|Advanced||reinit velocities by an impulse"; protected Real R[3,3]; Real rs; Real Vm; Real Va; equation when frame_a.contact then R = frame_a.P.R; rs = s; Va = v; end when; if reinitByImpulse then when frame_b.contact then reinit(v,Va+2*(Vm-Va)); end when; end if; frame_a.contact = frame_b.contact; frame_a.F + frame_b.F = zeros(3); (R*frame_b.F)*eN = 0; frame_a.T + frame_b.T + cross(rs*eN,R*frame_b.F) = zeros(3); frame_a.Vm + transpose(R)*cross(frame_a.Wm,rs*eN) + transpose(R)*(Vm*eN) = frame_b.Vm; frame_a.Wm = frame_b.Wm; end Prismatic;
The activation of reinitByImpulse determines the state variables to be reinitialized in case of a force impulse. It is coupled by default with the parameter enforceStates. The selection of the reinitialization points must be done manually.
The orientation can either be expressed by the three cardan angles or by quaternions.
Which of these two variants is used, can be specified by the parameter useQuaternions. If cardan angles are chosen to be used, you can specify the sequence of rotation axis by the parameter sequence_angles.
Type | Name | Default | Description |
---|---|---|---|
Boolean | animation | true | animate spherical joint as sphere |
Initialization | |||
Temp | initType | MB.Types.Init.Free | Type of initialization (defines usage of start values below) |
Angle_deg | phi_start[3] | {0,0,0} | initial cardan angles in degree [deg] |
AngularVelocity_deg | w_start[3] | {0,0,0} | initial angular velocity in deg/s [deg/s] |
AngularAcceleration_deg | z_start[3] | {0,0,0} | initial angular acceleration in deg/s2 [deg/s2] |
if animation = true | |||
Distance | sphereDiameter | world3D.defaultJointLength | Diameter of sphere representing the spherical joint [m] |
Color | sphereColor[3] | world3D.defaultJointColor | Color of sphere representing the spherical joint |
Advanced | |||
Boolean | enforceStates | false | enforce Quaternions or cardan angles and w as states |
Boolean | useQuaternions | true | use Quaternions instead of cardan angles |
RotationSequence | sequence_angles[3] | {1,2,3} | sequence of the cardan angles |
Boolean | reinitByImpulse | enforceStates | reinit velocities by an impulse |
model Spherical "spherical joint with all 3 rotational degrees of freedom" extends Mechanics3D.Joints.Spherical( redeclare Interfaces.IFrame_a frame_a, redeclare Interfaces.IFrame_b frame_b, redeclare Interfaces.IMech2MBG Mech2MBG1, redeclare Interfaces.MBG2IMech MBG2Mech1); parameter Boolean reinitByImpulse = enforceStates "|Advanced||reinit velocities by an impulse"; protected Real Rrel[3,3]; Real Wm[3]; Real Wa[3]; equation when frame_a.contact then Wa = w; Rrel = Rotation1.Rrel; end when; if reinitByImpulse then when frame_b.contact then reinit(w,Wa+2*(Wm-Wa)); end when; end if; frame_a.contact = frame_b.contact; frame_a.F + frame_b.F = zeros(3); frame_a.Vm = frame_b.Vm; Rrel*frame_a.T + frame_b.T = zeros(3); frame_b.T = zeros(3); Rrel*frame_a.Wm = -Wm + frame_b.Wm; end Spherical;
The activation of reinitByImpulse determines the state variables to be reinitialized in case of a force impulse. It is coupled by default with the parameter enforceStates. The selection of the reinitialization points must be done manually.
Type | Name | Default | Description |
---|---|---|---|
Position | r[3] | {0,0,0} | positional shift to inertial frame [m] |
Initialization | |||
Temp | initType | MB.Types.Init.Free | Type of initialization (defines usage of start values below) |
Position | x_start[3] | {0,0,0} | initial position [m] |
Velocity | v_start[3] | {0,0,0} | initial velocity [m/s] |
Acceleration | a_start[3] | {0,0,0} | initial acceleration [m/s2] |
Advanced | |||
Boolean | enforceStates | false | enforce position and velocity as states |
Boolean | reinitByImpulse | enforceStates | reinit velocities by an impulse |
model FreeTranslationalMovement "joint with all 3 translational degrees of freedom" extends Mechanics3D.Joints.FreeTranslationalMovement(redeclare Interfaces.IFrame_b frame_b, redeclare Interfaces.MBG2IMech MBG2Mech1); parameter Boolean reinitByImpulse = enforceStates "|Advanced||reinit velocities by an impulse"; protected Real Va[3]; Real Wa[3]; equation when frame_b.contact then Va = frame_b.P.v; Wa = frame_b.P.w; end when; if reinitByImpulse then when frame_b.contact then reinit(v,Va+2*(frame_b.Vm-Va)); end when; end if; frame_b.F = zeros(3); frame_b.Wm = zeros(3); end FreeTranslationalMovement;
The activation of reinitByImpulse determines the state variables to be reinitialized in case of a force impulse. It is coupled by default with the parameter enforceStates. The selection of the reinitialization points must be done manually.
The orientation can either be expressed by the three cardan angles or by quaternions.
Which of these two variants is used, can be specified by the parameter useQuaternions. If cardan angles are chosen to be used, you can specify the sequence of rotation axis by the parameter sequence_angles.
Type | Name | Default | Description |
---|---|---|---|
Initialization | |||
Temp | initType | MB.Types.Init.Free | Type of initialization (defines usage of start values below) |
Position | x_start[3] | {0,0,0} | initial position [m] |
Velocity | v_start[3] | {0,0,0} | initial velocity [m/s] |
Acceleration | a_start[3] | {0,0,0} | initial acceleration [m/s2] |
Angle_deg | phi_start[3] | {0,0,0} | initial cardan angles in degree [deg] |
AngularVelocity_deg | w_start[3] | {0,0,0} | initial angular velocity in deg/s [deg/s] |
AngularAcceleration_deg | z_start[3] | {0,0,0} | initial angular acceleration in deg/s2 [deg/s2] |
Advanced | |||
Boolean | enforceStates | false | enforce Quaternions or cardan angles and w as states |
Boolean | useQuaternions | true | use Quaternions instead of cardan angles |
RotationSequence | sequence_angles[3] | {1,2,3} | sequence of the cardan angles |
Boolean | reinitByImpulse | enforceStates | reinit velocities by an impulse |
model FreeBodyMovement "joint with all 6 degrees of freedom" extends Mechanics3D.Joints.FreeBodyMovement(redeclare Interfaces.IFrame_b frame_b, redeclare Interfaces.MBG2IMech MBG2Mech1); parameter Boolean reinitByImpulse = enforceStates "|Advanced||reinit velocities by an impulse"; protected Real Va[3]; Real Wa[3]; equation when frame_b.contact then Va = frame_b.P.v; Wa = frame_b.P.w; end when; if reinitByImpulse then when frame_b.contact then reinit(v,Va+2*(frame_b.Vm-Va)); reinit(w,Wa+2*(frame_b.Wm-Wa)); end when; end if; frame_b.F = zeros(3); frame_b.T = zeros(3); end FreeBodyMovement;
The activation of reinitByImpulse determines the state variables to be reinitialized in case of a force impulse. It is coupled by default with the parameter enforceStates. The selection of the reinitialization points must be done manually.
The orientation can either be expressed by the three cardan angles or by quaternions.
Which of these two variants is used, can be specified by the parameter useQuaternions. If cardan angles are chosen to be used, you can specify the sequence of rotation axis by the parameter sequence_angles.
Type | Name | Default | Description |
---|---|---|---|
Initialization | |||
Temp | initType | MB.Types.Init.Free | Type of initialization (defines usage of start values below) |
Position | x_start[3] | {0,0,0} | initial position [m] |
Velocity | v_start[3] | {0,0,0} | initial velocity [m/s] |
Acceleration | a_start[3] | {0,0,0} | initial acceleration [m/s2] |
Angle_deg | phi_start[3] | {0,0,0} | initial cardan angles in degree [deg] |
AngularVelocity_deg | w_start[3] | {0,0,0} | initial angular velocity in deg/s [deg/s] |
AngularAcceleration_deg | z_start[3] | {0,0,0} | initial angular acceleration in deg/s2 [deg/s2] |
Advanced | |||
Boolean | enforceStates | false | enforce Quaternions or cardan angles and w as states |
Boolean | useQuaternions | true | use Quaternions instead of cardan angles |
RotationSequence | sequence_angles[3] | {1,2,3} | sequence of the cardan angles |
Boolean | reinitByImpulse | enforceStates | reinit velocities by an impulse |
model PotentialFBM "potential joint with all 6 degrees of freedom" extends Mechanics3D.Joints.PotentialFBM( redeclare Interfaces.IFrame_b frame_b, redeclare Interfaces.MBG2IMech MBG2Mech1); parameter Boolean reinitByImpulse = enforceStates "|Advanced||reinit velocities by an impulse"; protected Real Va[3]; Real Wa[3]; equation when frame_b.contact then Va = frame_b.P.v; Wa = frame_b.P.w; end when; if reinitByImpulse then when frame_b.contact then reinit(v,Va+2*(frame_b.Vm-Va)); reinit(w,Wa+2*(frame_b.Wm-Wa)); end when; end if; frame_b.F = zeros(3); frame_b.T = zeros(3); end PotentialFBM;
With this element you can cut a kinematic loop. Just insert the element into the loop at the point where you'd like to cut it. Kinematic loops have to be cut manually in impulse mechanical systems.
This element connects its two connectors in a non-redundant way. It must not be used outside a kinematik loop.
model CloseLoop "element to close kinematik loops manualy" extends Mechanics3D.Joints.CloseLoop( redeclare Interfaces.IFrame_a frame_a, redeclare Interfaces.IFrame_b frame_b); equation frame_a.F = frame_b.F; frame_a.T = frame_b.T; frame_a.Vm = frame_b.Vm; frame_a.Wm = frame_b.Wm; end CloseLoop;