*CouplerPair()

Creates a coupler pair.

Syntax

*CouplerPair(coupler_name,"coupler_label",2JOINT|3JOINT joint_1, joint_2, [joint_3] TRANS|ROT, TRANS|ROT, [TRANS|ROT])

Arguments

coupler_name
The variable name of the coupler pair.
Data type: varname
coupler_label
The descriptive label of the coupler pair.
Data type: label
2JOINT|3JOINT
Set to 3JOINT for a three joint coupler, otherwise, set to 2JOINT.
joint_1
The first joint or joint pair constrained by the coupler pair.
Data type: JointPair
joint_2
The second joint or joint pair constrained by the coupler pair.
Data type: JointPair
joint_3
The third joint constrained by the coupler pair. Required if *SetCouplerType() is 3JOINT .
Data type: JointPair
TRANS|ROT
See Comments .
TRANS|ROT
See Comments .
TRANS|ROT
Required if *SetCouplerType() is 3JOINT. See Comments.

Example

*BeginMDL( the_model, "Model", "11.0.0.130-HWDesktop" )
 *BodyPair( b_0, "Body 0", p_0, , , , , false, false )
 *PointPair( p_0, "Point 0" )
 *SetPoint( p_0, LEFT, , -50 )
 *SetBodyInertia( b_0, LEFT )
 *Set( b_0.usecm, true )
 *SetOrientation( b_0.cm.l, TWOAXES, ZX, DXDYDZ, , , , DXDYDZ )
 *PointPair( p_1, "Point 1" )
 *SetPoint( p_1, LEFT, 50, -50 )
 *BodyPair( b_1, "Body 1", p_1, , , , , false, false )
 *Set( b_1.usecm, true )
 *RevJointPair( j_0, "Joint 0", b_0, B_Ground, p_0, VECTOR, V_Global_Y )
 *TransJointPair( j_1, "Joint 1", b_1, B_Ground, p_1, POINT, p_0 )
 *CouplerPair( c_0, "Coupler 0", 2JOINT, j_0, j_1, TRANS, TRANS )
 *SetCoupler( c_0, LEFT )
 *SetCoupler( c_0, , -5 , -5 )
*EndMDL()

Context

*BeginMdl()

*DefineAnalysis()

*DefineAssembly()

*DefineSystem()

Properties

Table 1.
Property Returns Data Type Description
j1 JointPair The first joint pair constrained by the coupler pair.
j2 JointPair The second joint pair constrained by the coupler pair.
j3 JointPair. The third joint pair constrained by the coupler pair.
l Coupler Left coupler.
label string The descriptive label of the coupler pair.
r Coupler Right coupler.
state boolean Control state (TRUE or FALSE).
varname string The variable name of the coupler pair.
ratio real The coupler ratio between first joint and the second joint.
ratio2 real The coupler ratio between first joint (j1) and the third joint (j3).
usr_sub string User expression passed to the solver dll in the case of a user defined coupler.
use_local_dll boolean Valid values are "true" or "false". True switches the flag on to use a local function instead of default.
local_func_type string Keyword to set the type of function to be used. Valid choices are: DLL, PYTHON, and MATLAB.
local_dll string String containing the path to the local function file.
local_funcname string The function name or subroutine name called by the entity. The default name is "COUSUB".
local_der1_funcname string The function name or subroutine name for the first derivative. The default name is "COUXX". See ^Comments^ (below).
local_der2_funcname string The function name or subroutine name for the second derivative. The default name is "COUXX2". See ^Comments^ (below).

Comments

A coupler pair can constrain a revolute, translational, or cylindrical joint pair. When a coupler pair contains a cylindrical joint pair, either of its two degrees of freedom (translational or rotational) may be constrained by specifying the TRANS or ROT flag. The TRANS or ROT flag for the seventh, eighth, and ninth arguments applies to the first joint pair, second joint pair, and third joint pair, respectively. Therefore, TRANS or ROT argument needs to be specified for cylindrical joints only.

The individual couplers of a *CouplerPair()can be referred to as coupler_name.l (left coupler) and coupler_name.r (right coupler).Symmetry is not applicable for a user-defined coupler pair. The local dll flag and function name needs to be set individually for the left and the right side, as shown in example above.

The function names for the first order and second order derivatives cannot be set using the MotionView graphical user interface. Use the general *Set statement to set the function names.