*morphconstraintupdateelems

Updates a mesh type morphconstraint for the selected nodes with the option of having those nodes either move along the specified mesh or be bounded by it.

Syntax

*morphconstraintupdateelems ntype nmark etype emark type name p_vec dist ivec color

Type

HyperMesh Tcl Modify Command

Description

This command updates a mesh type morphconstraint for the selected nodes with the option of having those nodes either move along the specified mesh or be bounded by it.

The extended edges option is available for bounded type morphconstraint (type 1, 3, and 5) by adding 8 to the type (9, 11, and 13). This option will extend the edges of the mesh by roughly two element lengths so that the nodes which project close to the edges of the mesh will project on to the extended edges.

The depenetration option is available for bounded type morphconstraint (type 1, 3, and 5) by adding 16 to the type (17, 19, and 21). This option will treat the center of any element attached to the constrained nodes as a constrained node and push the element away from the mesh, if it is within the specified distance.

To enable both extended edges and depenetration for a morphconstraint, add 24 to the type (thus 1, 3, and 5 become 25, 27, and 29).

Inputs

ntype
Must be set to nodes.
nmark
The mark ID for the constrained nodes. Valid values are 1 and 2.
etype
etype
emark
The mark ID for elements to which the nodes are constrained. Valid values are 1 and 2.
type
0 - Moves along mesh
1 - Bounded by mesh
3 - Remains a set distance from mesh
5 - Maintains its original distance from mesh
+8 - Extend edges of mesh
+16 - Depenetration of elements attached to constrained nodes
+24 - Extend edges and enable depenetration
+32 - Enable mesh stretching around constrained nodes
mcon
The ID of morph constraint to update.
p_vec
The ID of the projection vector created using *createvector. Must be set to 1.
dist
Distance between node and mesh (types 1 and 3).
ivec
0 - Mesh normal is used for projection. The nodes will be moved normally to the mesh when constraining them or measuring the distance the nodes are away from the mesh.
1 - Use p_vec for projection. The nodes will be moved along p_vec when constraining them or measuring the distance the nodes are away from the mesh.
color
The color of the constraint. Valid values are 1 through 64.

Examples

To update a morphconstraint for nodes to move along a mesh and projected normally to the mesh:

*createmark nodes 1 1 2 3 4 5
*createmark elems 1 11 12 13 14 15
*createvector 1 1.0 0.0 0.0
*morphconstraintupdateelems nodes 1 elems 1 0 12 1 0.0 0 13

To update a morphconstraint for nodes to be bounded by a mesh at a distance of 5.0 and projected along a vector to the mesh with both depenetration and extended edges:

*createmark nodes 1 1 2 3 4 5
*createmark elems 1 11 12 13 14 15
*createvector 1 1.0 0.0 0.0
*morphconstraintupdateelems nodes 1 elems 1 27 12 1 5.0 1 13

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}