HyperWorks Solvers

Constraint: Coupler

Constraint: Coupler

Previous topic Next topic Expand/collapse all hidden text  

Constraint: Coupler

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  
hmtoggle_plus1greyXML Format

Model Element

Description

Constraint_Coupler defines an algebraic relationship between the degrees of freedom of two or three joints.

This constraint element may be used to model idealized spur gears, rack and pinion gears, and differentials as simple constraints that relate the displacements in a set of joints.

Format

<Constraint_Coupler

    id                     = "integer"

  [ label                  = "string" ]

    joint1_id              = "integer"

    freedom_1              = { "T" | "R" }

    joint2_id              = "integer"

    freedom_2              = { "T" | "R" }

[

    joint3_id              = "integer"

    freedom_3              = { "T" | "R" }

]

 

{

       coefficients        = "double, double [, double]"

    |

       usrsub_dll_name     = "valid_path_name"

       usrsub_param_string = "USER( [[par_1][, ...][, par_n]] )"

       usrsub_fnc_name     = "custom_fnc_name" >

    |

       script_name         = valid_path_name

       interpreter         = "PYTHON" | "MATLAB"

       usrsub_param_string = "USER( [[par_1 [, ...][,par_n]] )"

       usrsub_fnc_name     = "custom_fnc_name" >

}

</Constraint_Coupler>

Attributes

id

Element identification number (integer>0).  This is a number that is unique among all Constraint_Coupler elements.

label

The name of the Constraint_Coupler element.

joint1_id

Specifies the ID of the first joint whose degree of freedom is used to define the constraint relationship.  See Comment 1 below for more information on this.

freedom_1

Defines the freedom type that is being used for the first joint.  For translational and revolute joints, the freedom type is obvious.  For cylindrical joints, the freedom type needs to be specified.

"T" indicates that the translational degree of freedom in the joint is to be used.

"R" indicates that the rotational degree of freedom in the joint is to be used.

joint2_id

Specifies the ID of the second joint whose degree of freedom is used to define the constraint relationship.  See Comment 1 below for more information on this.

freedom_2

Defines the freedom type that is being used for the second joint.  For translational and revolute joints, the choice is obvious.  For cylindrical joints, the freedom type needs to be specified.

"T" indicates that the translational degree of freedom in the joint is to be used.

"R" indicates that the rotational degree of freedom in the joint is to be used.

joint3_id

Specifies the ID of the third joint whose degree of freedom is used to define the constraint relationship.  See Comment 1 below for more information on this. joint3_id is an optional parameter.  If not specified, the software assumes that only two joint degrees of freedom are specified.

freedom_3

Defines the freedom type that is being used for the third joint.  For translational and revolute joints, the choice is obvious.  For cylindrical joints, the freedom type needs to be specified.

"T" indicates that the translational degree of freedom in the joint is to be used.

"R" indicates that the rotational degree of freedom in the joint is to be used.

coefficients

This defines the scale factors to be used in defining the constraint associated with a coupler.  See Comment 1 for more information.

When only two joints are used to specify the coupler constraint, ratio is given two real values.  When three joints are used, ratio must be provided with three real values.

usrsub_param_string

The list of parameters that are passed from the data file to the user defined subroutines COUSUB, COUXX, and COUXX2. Use this keyword only when type = USERSUB is selected.  This attribute is common to all types of user subroutines and scripts.

usrsub_dll_name

Specifies the path and name of the DLL or shared library containing user subroutine.  MotionSolve uses this information to load the user subroutines COUSUB, COUXX, and COUXX2 in the DLL at run time.  Use this keyword only when type = USERSUB is selected.

usrsub_fnc_name

Specifies an alternative name for the user subroutine COUSUB.

script_name

Specifies the path and name of the user written script that contains the routine specified by usrsub_fnc_name.

interpreter

Specifies the interpreted language that the user script is written in.  Valid choices are MATLAB or PYTHON.

Comments

1.Constraint_Coupler defines an algebraic constraint.  The constraint can be linear or nonlinear.  The linear form of the constraint is:

S1*M1 + s2*M2 [ + s3*M3 ] = 0... (3)

In equation (3) above, M1, M2 and M3 are coordinate measures of the selected degree of freedom in the selected joints.  If Ik and Jk are the I and J markers of Constraint_Joint k, then Mk means the following:

Revolute joint: AZ(Ik,Jk)
Translational joint: DZ(Ik,Jk,Jk)
Cylindrical joint: DZ(Ik,Jk,Jk) if FREEDOM_K = "T" AZ(Ik,Jk) if FREEDOM_K = "R"

When equation (3) contains only two joints, s1 and s2 need to be specified.  These are the first and second values specified for ratio.

When equation (5) contains three joints, s1, s2 and s3 need to be specified.  S1 is the first value specified for ratio. S2 is the second value specified for ratio. S3 is the third value specified for ratio.

2.Constraint_Coupler may also be used to specify nonlinear relationships.  In this case, the kinematic relationship may be expressed as:

G1(M1) + G2(M2) [ + G3(M3) ] = 0... (4)

The user defined subroutine COUSUB is used to specify equation (4).  In addition to the above, MotionSolve also requires you to provide the first partial of (4) with respect to M1, M2, and M3.  This data is provided to MotionSolve in the user defined subroutine COUXX. Similarly, the second partials are to be returned in a third user defined subroutine COUXX2. M1, M2, and M3 are passed in as arguments to the user defined subroutines.

3.When a nonlinear Constraint_Coupler is defined, equation (4) (defined in the user defined subroutine COUSUB) is required to be twice differentiable.

Example

The image below shows a right angle bevel gear pair.  Bevel gear 1, with a pitch radius R1, is connected to Ground with Revolute Joint 1.  It is allowed to rotate about a fixed axis.  Bevel gear C, with a pitch radius R2 is connected to Ground with Revolute Joint 2, and is allowed to rotate about a fixed axis.

We are interested in defining the overall effect of the bevel gear set, for example, the coupling of the rotations in the two revolute joints.  We are not interested in the tooth forces that occur at the contact between the two gears.  We also assume that the gear mating is perfect and that there is no backlash, no tooth deflection, no eccentricity, or other manufacturing defects.

Assume that the rotation of Gear A is θ1 and that the rotation of Gear C is θ2. Then the two rotations can be related by the algebraic relationship:

R1*θ1 + R2*θ2 = 0... (1)

If R1 = 10mm and R2 = 15mm, then a Constraint_Coupler may be defined to capture the effect of equation 2 above as follows:

cc_ex1

A typical use of Constraint_Coupler

<Constraint_Coupler

    id              = "1"

    joint1_id       = "1"

    freedom_1       = "R"

    joint2_id       = "2"

    freedom_1       = "R"

    coefficients    = "10.0,15.0"

</Constraint_Coupler >

The second example demonstrates the use of Constraint_Coupler to model a rack and pinion system.  The figure below depicts a rack and pinion steering system.  The pinion gear P is connected to the housing (not shown) by Revolute Joint 41.  This joint allows pinion rotation about a fixed axis that is perpendicular to the plane of the paper.  The rack R slides from left-to-right on Translational Joint 51.

cc_ex2

A rack and pinion system modeled as a Constraint_Coupler

Assume that the radius of the pinion gear is 30mm and the system length units are in millimeters.  The Constraint_Coupler that defines this scenario may be written as:

<Constraint_Coupler

    id              = "2"

    joint1_id       = "51"

    freedom_1       = "T"

    joint2_id       = "41"

    freedom_2       = "R"

    coefficients    = "1.0,30.0"

</Constraint_Coupler >

The image below demonstrates a third example of a Constraint_Coupler. In this case, the translations in two joints are coupled.  The image is a schematic of a hydraulic jack often used in auto repair shops.  The hydraulic press consists of two cylinders of very different diameters D1 and D2 connected to each other.  Two pistons enclose the volume and an incompressible fluid fills the enclosed volume of the press.

The cylinder on the left has a smaller diameter than the cylinder on the right, D2 >> D1.  A car, to be repaired, is placed on a platform that is rigidly connected to the piston on the right.

cc_ex3

A hydraulic jack modeled with a Constraint_Coupler

The area of the cylinder on the left A1 = πD12/4.

The area of the cylinder on the right A2 = πD22/4.

Assume a force F1 is applied on the left cylinder, causing it to move by a distance L1.  We are interested in calculating the displacement of the car L2 and the lifting force F2.

Since the fluid is incompressible, movement of the left piston causes a volume = L1*A1 to be displaced.  This must cause the piston on the right to move up so that fluid volume is preserved.  The volume of the right cylinder increases by L2*A2.

The incompressibility condition leads to:

L1*A1 + L2*A2 = 0... (2)

MotionSolve uses the principle of virtual work to automatically calculate the relationship between F1 and F2, given the kinematic relationship in (2).

Assume that:

D1 = 5.08mm, for example A1 = 20.1885 mm2
D2 = 50.8mm, for example A2 = 2018.85 mm2
The piston on the left is on Translational Joint 123
The piston on the right is on Translational Joint 456

The Constraint_Coupler statement that describes equation (4) is:

<Constraint_Coupler

    id              = "5"

    joint1_id       = "123"

    freedom_1       = "T"

    joint2_id       = "456"

    freedom_2       = "T"

    coefficients    = "20.1885,2018.85"

</Constraint_Coupler >

hmtoggle_plus1greyPython Example

Model Element

Description

COUPLER defines an algebraic relationship between the degrees of freedom of two or three joints.  This may be used to model idealized spur gears, rack and pinion gears, and differentials as simple constraints that relate the displacements in a set of joints.

Declaration

def COUPLER(id, LABEL="", JOINTS=[0, 0, 0], TYPE=[' ', ' ', ' '], SCALES=[0.0, 0.0, 0.0], FUNCTION="", ROUTINE="", INTERPRETER="", SCRIPT=""):

Attributes

id

Element identification number (integer>0).  This number is unique among all of the COUPLER elements.

LABEL

The name of the COUPLER element.

JOINTS

Specifies the list of ID's of the first, second, and third joints, respectively, whose degree of freedom is used to define the constraint relationship.

TYPE

 

 

Defines the freedom type that is being used for the respective joints.  For translational and revolute joints, the choice is obvious.  For cylindrical joints, the freedom type needs to be specified.

"T" indicates that the translational degree of freedom in the joint is to be used.

"R" indicates that the rotational degree of freedom in the joint is to be used.

SCALES

This defines the scale factors to be used in defining the constraint associated with a coupler.

When only two joints are used to specify the coupler constraint, the ratio is given two real values.

When three joints are used, the ratio must be provided with three real values.

FUNCTION

 

The list of parameters that are passed from the data file to the user defined subroutine.  This attribute is common to all types of user subroutines and scripts.  The name of the user subroutine depends on the type of the element.

ROUTINE
 

Specifies an alternative name for the user subroutine.

INTERPRETER

 

Specifies the interpreted language that the user script is written in.  Valid choices are MATLAB or PYTHON.

SCRIPT

Specifies the path and name of the user written script that contains the routine.

Comments

See Constraint_Coupler

Example

The first example below demonstrates the COUPLER connecting a revolute and translational joint.

COUPLER(1, LABEL="Coupler 0", JOINTS=[1,2], TYPE=['R','T'], SCALES=[1,2.5])

The second example below demonstrates the COUPLER connecting a revolute, translational, and cylindrical joint.

COUPLER(2, LABEL="Coupler 2", JOINTS=[1,2,3], TYPE=['R','T','R'], SCALES=[1,2.5,3.7])

See Also:

Constraint_Gear

Model Statements

Command Statements

Functions

Notation and Syntax

The following MDL Model statements:

*Coupler()

*CouplerPair()

*SetCoupler() - asymmetric coupler pair

*SetCoupler() - asymmetric coupler with user subroutine

*SetCoupler() - single coupler

*SetCoupler() - single coupler with user subroutine

*SetCoupler() - symmetric coupler pair