Constraint: User
Model ElementThe Constraint_UserConstr element is used to specify a user defined constraint. Your constraint equations may involve the configuration as well as velocity of the system.
Description
Although MotionSolve provides a large set of constraints to choose from (see Constraint: 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 Constraint_UserConstr element.
Format
< Constraint_UserConstr
id = "integer"
[ label = "string" ]
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 = "string"
usrsub_param_string = "USER([[par_1[,...][,par_n]])
"
[ usrsub_fnc_name = "custom_fnc_name" > ]
}
</Constraint_UserConstr>
Attributes
- id
- Element identification number, (integer>0). This number is unique among all Constraint_UserConstr elements.
- label
- The name of the Constraint_UserConstr element.
- usrsub_dll_name
- Specifies the path and name of the DLL or shared library containing a user subroutine. MotionSolve uses this information to load the user subroutine in the DLL at run time.
- usrsub_param_string
- The list of parameters that are passed from the data file to the user defined subroutine, UCOSUB. This attribute is common to all types of user subroutines and scripts.
- usrsub_fnc_name
- Specifies an alternative name for the user subroutine UCOSUB.
- 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 (example: "PYTHON"). See User-Written Subroutines for a choice of valid interpreted languages.
Comments
- Those constraints that can be written as equations independent of any velocity terms are called holonomic and the rest are called non-holonomic constraints. The latter are restricted to be linear functions of velocity terms.
- Constraints may be defined in terms of the
position and velocity of either a marker or a part as follows.
- Constraint equations can be defined in terms of the position, direction cosines matrix, and velocity of any marker in the model.
- Constraint equations can also be defined in terms of the position, direction cosines matrix, and velocity of the principal coordinate system of any part in the model. The principal coordinate system is located at the part center of mass and is aligned with the principal axes of inertia. In general, the principal coordinate system is different from the center of mass coordinate system. The two are identical only in the special case when all off-diagonal terms in the moment of inertia matrix are zero.