Model Element |
Class NameCoupler Description |
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. Attribute Summary |
Name |
Property |
Modifiable by command? |
id |
Int () |
|
label |
Str () |
|
Types |
"T R" |
|
joints |
Reference ("Joint", count=3) |
|
type |
EnumString (Types, count=3) |
|
scales |
Double ([1,0,0], count=3) |
|
function |
Function ("COUSUB", xxfunc="COUXX", xx2func="COUXX2") |
|
routine |
Routine () |
|
script |
Script () |
|
active |
Bool () |
✓ |
Usage |
|||||
#1: Linear coupler specified in the input deck Coupler (joints=list, scales=list, optional__attattributes)
#2: Nonlinear coupler specified in a user-written subroutine in compiled DLL Coupler (joints=list, function=userString, routine=string, optional_attributes)
#3: Nonlinear coupler specified in a Python function Coupler (joints=list, function=userString, routine=functionPointer, optional_attributes) |
|||||
Attribute Description |
|||||
#1: Linear coupler specified in the input deck |
|||||
joints |
List of references to joint objects. joints specifies a list of joints (j1, j2, and so on) whose internal degrees of freedom are to be coupled with a COUPLER. The list must contain at least two joints. A maximum of three joint freedoms may be coupled. This attribute is required. Only revolute, translational, and cylindrical joints may participate in a COUPLER. |
||||
scales |
List of doubles. Defined as the scale factors to be used when 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. This attribute is optional. Note The attribute scales is exclusive to the attribute function. scales may not be defined when function is defined and vice versa. However, one of the two must be specified. |
||||
#2: Nonlinear coupler specified in a user-written subroutine in compiled DLL |
|||||
joints |
List of references to joint objects. joints specifies a list of joints (j1, j2, and so on) whose internal degrees of freedom are to be coupled with a COUPLER. The list must contain at least two joints. A maximum of three joint freedoms may be coupled. This attribute is required. Only revolute, translational, and cylindrical joints may participate in a COUPLER. |
||||
function
|
The list of parameters that are passed from the data file to the user defined subroutine. This attribute is optional. Note: The attribute function is exclusive to the attribute scales. function may not be defined when scales is and vice versa. However, one of the two must be specified. |
||||
routine |
String Specifies an alternative name for the user subroutine. The name consists of two pieces of information, separated by “∷”. The first is the pathname to the shared library containing the function that computes the response of the user-defined Variable. The second is the name of the function in the shared library that does the computation. For example: routine=”/staff/Altair/engine.dll∷myCoupler”
The attribute routine is optional. When not specified, routine defaults to COUSUB. |
||||
#3: Nonlinear coupler specified in a Python function |
|||||
joints |
List of references to joint objects. joints specifies a list of joints (j1, j2, etc.) whose internal degrees of freedoms are to be coupled with a COUPLER. The list must contain at least two joints. A maximum of 3 joint freedoms may be coupled. This attribute is required. Only revolute, translational, and cylindrical joints may participate in a COUPLER. |
||||
function
|
The list of parameters that are passed from the data file to the user defined subroutine. This attribute is optional. Note The attribute function is exclusive to the attribute scales. function may not be defined when scales is, and vice versa. However, one of the two must be specified. |
||||
routine |
Pointer to a callable function in Python. For example: routine=myCousub
The attribute routine is optional. When not specified, routine defaults to COUSUB. |
||||
Optional attributes – Available to all variants |
|||||
type
|
List containing the string "T” or “R”. type defines a list that describes the freedom type that is being used for each of the joints. "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. This attribute is optional, unless one of the joints is a cylindrical joint. In this case, the length of the types list must be the same as the length of the joints list. |
||||
label |
string The name of the COUPLER element. This attribute is optional. When not specified, MotionSolve creates a label for you. |
||||
id |
Integer Specifies the element identification number for the COUPLER. This number must be unique among all the COUPLER objects in the model. This attribute is optional. MotionSolve automatically creates an ID when one is not specified. Range of values: id > 0 |
||||
active |
Bool Select one from True or False.
The attribute active is optional. When not specified, active defaults to True. |
||||
Comments
|
|||||
Examples |
|||||
|
|||||
jt1 = Joint (label=”Joint-1”, i=i1, j=j1, type="REVOLUTE") jt2 = Joint (label=”Joint-2”, i=i2, j=j2, type="TRANSLATIONAL") Coupler (label="Coupler-0", joints=[jt1, jt2], type=[“R”, “T”], scales=[1, 2.5]) |
|||||
|
|||||
jt1 = Joint (label=”Joint-1”, i=i1, j=j1, type="REVOLUTE") jt2 = Joint (label=”Joint-2”, i=i2, j=j2, type="TRANSLATIONAL") jt3 = Joint (label=”Joint-3”, i=i3, j=j3, type="CYLINDRICAL") Coupler (id=2, label="Coupler-2", joints=[jt1, jt2, jt3], type=[“R”, “T”, “R”], scales=[1, 2.5, 3.7]) |
|||||
|
|||||
trans1 = Joint (label=”Joint-2”, i=i2, j=j2, type="TRANSLATIONAL") trans2 = Joint (label=”Joint-2”, i=i2, j=j2, type="TRANSLATIONAL") Coupler (label="Coupler-3", joints=[trans1, trans2], type=[“T”, “T”], function=user(1,2,3)) |