General Constraints
Use the General Constraints tool to create a generic expression-based constraint.
MotionView provides several standard constraints such as Joints and Motions, however they may not be suitable to represent all possible modeling scenarios. A GeneralConstraint may be defined using solver expressions in such scenarios. During solution, the solver would impose constraint such that the given expression is equated to zero.
Create General Constraints using the General Constraints Tool
The following are the standard initial steps to create a General Constraint.
- From the Model Browser, select the system to which the general constraint entity is to be added.
- From the Model ribbon, click on the Entities group down arrow to expand a drop-down menu that contains more entities.
- Click on the General Constraints option to invoke the Add General Constraint dialog.
-
Specify a label and variable name.
By default, variables names of entities in MotionView follow a certain convention. For example, all general constraint entities have a variable name starting with “gcon_”. This is the recommended convention to follow when building models in MotionView since it has many advantages in model editing and model manipulation.
-
Click OK to close the window or
Apply to continue creating entities.
Once a general constraint is created, it is displayed in the Entity Editor.
Edit General Constraints
General Constraint references can be edited using Entity Editor.
- Select the General Constraint to be edited. Its properties will appear in the Entity Editor.
-
In the Properties tab, enter a solver expression in the
Expression field.
The expression may involve position, velocity, or any other general measure of the system.
-
Alternatively, activate the User-defined check box to
provide the constraint through a sub-routine.
Property | Description | |
---|---|---|
General | ||
Label | Descriptive label for the entity. | |
Varname | Variable name of the entity. | |
ID | Integer identifier. | |
Active | Active state of the entity. True or False. Entity is deactivated if False. | |
Use Virtual | Make this a virtual constraint. See the comment* below. | |
Properties | ||
Expression | Solver expression that sets the constraint. | |
User Defined | ||
User expr | USER() expression used to call the subroutine. | |
Use local file and function name | Option to use a local subroutine file along with the function. | |
Local file | Name of the subroutine file depending on the Function Type. | |
Function Type | Type of subroutine function. Available choices are DLL/SO, PYTHON, MATLAB, COMPOSE. | |
Function name | Name of function to be called within the subroutine. | |
Use Reaction marker | Use a marker to impose reaction force (ADAMS only). | |
Reaction marker | Marker where the reaction is imposed. | |
Note & Tags | ||
Note | Optional descriptive note. | |
Attachment Candidates | Add tags for the entity to use as possible attachments to Systems/Assemblies/Analyses. |
*Defines whether the constraint is virtual or regular. If Use Virtual is selected, the constraint is implemented as a virtual constraint. Otherwise, the constraint is implemented as a regular algebraic constraint. See Comment 17 in Constraint: Joint for more information about virtual joints.