Model Element |
|||||||||||||||||||
Class NameGcon Description |
|||||||||||||||||||
The GCON element is used to specify a user defined general constraint. Your constraint equations may involve position as well as velocity measures of the system. Although MotionSolve provides a large set of constraints to choose from (see JOINT), there are situations that require non-standard constraints. For example, the constraint that a wheel rolls without slipping is a non-holonomic constraint that can be modeled using the GCON element. |
|||||||||||||||||||
Attribute Summary
Usage |
|||||||||||||||||||
Gcon (function=userString, optional_attributes) |
|||||||||||||||||||
Attribute Description |
|||||||||||||||||||
function |
String An expression (that will be set to zero) defining the general constraint. OR The list of parameters that are passed from the data file to the user defined subroutine, GCOSUB. The function attribute is mandatory |
||||||||||||||||||
i |
Reference to an existing Marker object Specifies the marker that extracts the reaction force from the general constraint. The i attribute is optional. When it is not specified, you cannot obtain any reaction forces from the GCON. |
||||||||||||||||||
id |
Integer Specifies the element identification number. This number must be unique among all the GCON objects in the model. This attribute is optional. MotionSolve will automatically create an ID when one is not specified. Range of values: id > 0 |
||||||||||||||||||
label |
String Specifies the name of the GCON object. This attribute is optional. When not specified, MotionSolve will create a label for you. |
||||||||||||||||||
routine |
String or a pointer to a Python function Specifies an alternative name for the user subroutine. The attribute routine is optional. When function is specified, but routine is not, routine defaults to GCOSUB. |
||||||||||||||||||
active |
Bool Select one from True or False.
The attribute active is optional. When not specified, active defaults to True. |
||||||||||||||||||
Comments
|
|||||||||||||||||||
Example
|
|||||||||||||||||||
# Get the ids of the I and J markers iid = imrkr.id jid = jmrkr.id
# Create the expression strings strx = “dx({i},{j})”.format(i=iid, j=jid) stry = “dy({i},{j})”.format(i=iid, j=jid) strz = “dz({i},{j})”.format(i=iid, j=jid)
# Define the 3 GCONS: DX(I,J)=0, DY(I,J)=0, DZ(I,J)=0 gx = Gcon (function=strx, i=imrkr, label=”X-Constraint”) gy = Gcon (function stry, i-imrkr, label=”Y-Constraint”) gz = Gcon (function=strz, i=imrkr, label=”Z-Constraint”) |