11.5. How to Create Constraint Equations

Several methods are available for creating constraint equations, including CE (the direct method), and other commands such as CEINTF, CERIG, and RBE3.

You can also use the internal multipoint constraint (MPC) feature of certain contact elements (CONTA172, CONTA174, CONTA175, and CONTA177) to model contact assemblies and kinematic constraints. By this method, the program builds MPC equations internally based on the contact kinematics. For more infomration, see Multipoint Constraints and Assemblies in the Contact Technology Guide.

11.5.1. The Direct Method

Use the CE command to create constraint equations directly.

The following example illustrates a typical application of a constraint equation, in which moment transfer capability is created for a connection between a beam element and plane elements:

Figure 11.1: Establishing Relationships Between Rotational and Translational Degree of Freedom

Establishing Relationships Between Rotational and Translational Degree of Freedom

In this example, node 2 acts as a hinge if no constraint equations are used. To transfer moment between the beam and the plane-stress elements, you can use the following equation:

ROTZ2 = (UY3 - UY1)/10

This equation would be rewritten in the required format and entered into the program as:

0 = UY3 - UY1 - 10*ROTZ2

CE,1,0,3,UY,1,1,UY,-1,2,ROTZ,-10

The first unique degree of freedom in the equation is eliminated in terms of all other degrees of freedom in the equation. A unique degree of freedom is one which is not specified in any other constraint equation, coupled node set, specified displacement set, or master degree-of-freedom set. You should make the first term of the equation be the degree of freedom to be eliminated. Although you may, in theory, specify the same degree of freedom in more than one equation, you must be careful to avoid over-specification. You must also take care to ensure that each node and degree of freedom exists in the model. (Remember that for a degree of freedom to be present at a node, that node must be connected to an element which supplies the necessary degree of freedom.)

11.5.1.1. Periodic Conditions

Often in field analysis, it is desirable to take advantage of antisymmetric or periodic field variation to limit the model size. For static magnetic analyses, this can be accomplished by using Mechanical APDL cyclic symmetry capabilities. See Magnetic Cyclic Symmetry Analysis for more information. For harmonic or transient magnetic analyses, use the constraint equation method explained here.

A periodic condition is a boundary for which neither the flux-parallel nor flux-normal conditions hold, but rather the potential at one point is of equal magnitude but of opposite sign to that of a point in another location. This condition arises in the analysis of symmetry sectors of motors, for example, where the potentials one pole pitch apart are equal but opposite in sign. In Figure 11.2: Example of Specifying a Periodic Condition, suppose node 129 in the outlined symmetry sector is to be constrained as described above with node 363 on the opposite pole pitch.

Figure 11.2: Example of Specifying a Periodic Condition

Example of Specifying a Periodic Condition

The constraint equation would read:

A129 = - A363

0 = A129 + A363

The CE command used to input this constraint equation would appear as follows:

CE,1,0,129,MAG,1,363,MAG,1

To automatically apply groups of periodic boundary conditions (CP and CE commands) for 2D magnetic analyses, use the PERBC2D command macro (refer to Electric and Magnetic Macros in the Low-Frequency Electromagnetic Analysis Guide for a discussion of this modeling aid):


Note:  Periodic boundary conditions can also be represented in a structural analysis (for example, in a turbine blade model) using CP commands on nodes rotated into the cylindrical coordinate system.


11.5.2. Modifying Constraint Equations

Use the CECMOD command to change the constant term of a constraint equation in either PREP7 or SOLUTION.

If you need to change any of the other terms of a constraint equation, you must use the CE command in PREP7, before you start your solution.

11.5.3. Direct vs. Automatic Constraint Equation Generation

An example that appeared earlier in this chapter illustrated how you can use the CE command to create constraint equations directly, one at a time.

Three other operations, described below, automatically generate multiple constraint equations for you.

11.5.3.1. Creating a Rigid Region

The CERIG command defines a "rigid region" by writing constraint equations to define rigid lines linking a designated retained (or "independent") node to a number of removed (or "dependent") nodes.

By setting Ldof to ALL on the CERIG command (default), this operation will generate three equations for each pair of constrained nodes in 2D space. These equations define the three rigid body motions in global Cartesian space (UX, UY, ROTZ). In order to create a rigid region on a 2D model, you must make sure that the X-Y plane is the rigid plane and that UX, UY, and ROTZ degrees of freedom are available at each constrained node. This operation will similarly generate six equations for each pair of constrained nodes in 3D space. All six degrees of freedom (UX, UY, UZ, ROTX, ROTY, and ROTZ) must be available at each constrained node.

Entering other labels in the Ldof field will create different effects. If this field is set to UXYZ, the program will write two constraint equations in 2D (X, Y) space and three constraint equations in 3D (X, Y, Z) space. These equations will be written in terms of the dependent nodes' translational degrees of freedom, and in terms of the independent node's translational and rotational degrees of freedom. Similarly, the RXYZ label allows you to generate a partial set of equations that omit the dependent nodes' translational degrees of freedom. The other available Ldof labels will generate other types of constraint equations.

In general, your dependent nodes need have only the degrees of freedom called for by Ldof, but your independent node must have all applicable translational and rotational degrees of freedom (that is, UX, UY, ROTZ for 2D and UX, UY, UZ, ROTX, ROTY, ROTZ for 3D). For models that are made up of elements having no rotational degree of freedom, you might consider adding a dummy beam element to provide rotational degrees of freedom at the independent node.

11.5.3.2. Tying Dissimilarly Meshed Regions Together

You can tie dissimilarly meshed regions together via the CEINTF command, or you can use contact elements with the internal multipoint constraint (MPC) algorithm.

11.5.3.2.1. Using the CEINTF Command

You can generate constraint equations connecting the selected nodes of one region to the selected elements of another region via the CEINTF command. This operation ties together regions with dissimilar mesh patterns. At the interface location between two regions, select the nodes from the denser mesh region, A, and select the elements from the sparser mesh region, B. The degrees of freedom of region A nodes are interpolated with the corresponding degrees of freedom of the nodes on the region B elements, using the shape functions of the region B elements. Constraint equations are then written that relate region A and B nodes at the interface. Mechanical APDL allows two tolerances on the location of these nodes. Nodes which are outside the element by more than the first tolerance are not accepted as being on the interface. Nodes that are closer than the second tolerance to an element surface are moved to that surface.

Certain limitations affect the CEINTF command: stress or thermal flux might not be continuous across the interface. Nodes in the interface region must not have specified displacements.

11.5.3.2.2. Using Contact Elements

To learn more about tying dissimilarly meshed regions together via contact elements and the internal MPC algorithm, see Multipoint Constraints and Assemblies.

11.5.3.3. Generating Sets of Constraint Equations from Existing Sets

You can issue the CESGEN command to generate sets of constraint equations from existing sets. All node numbers within the existing sets are then incremented to generate the additional sets. The labels and coefficients of the additional sets remain the same as those of the original sets.

11.5.4. Listing, Deleting, and Selecting Constraint Equations

You can perform these other operations to manage constraint equations:

  • Use CELIST to list constraint equations.

  • Use CEDELE to delete constraint equations.

  • Use CESEL to select constraint equations.

11.5.5. Program Modification of Constraint Equations

During the solution, the user-defined constraint equations (CEs) may be modified as follows:

  • CEs that are applied to degrees of freedom which are not active (for example, a CE relating rotational DOFs on nodes with only translational DOFs) are deleted.

  • CEs for which all degrees of freedom are constrained (D command) are deleted.

  • CEs that have degrees of freedom in another equation have their terms reordered so that they all have a common retained degree of freedom.

  • CEs which are chained together are merged into a single CE.

  • CEs which are internal to the solution process are generated by MPC contact and by cyclic symmetry. These CEs cannot be listed or deleted.

11.5.6. Troubleshooting Problems with Constraint Equations

Overconstrained problems for which there is no unique degree of freedom that can be solved typically generate an error message similar to one of the following:

  • Constraint equation set is defective.

  • Constraint equation is circular.

  • Constraint equation has no unique degree of freedom.

  • Contact overconstraint may occur.

In addition to CE-specific error messages, you may also notice "small (or zero) pivot" messages from the solver. Such overconstraints may be caused by one of the following conditions:

  • Duplicate CEs are specified for the same degrees of freedom.

    Work-around:  Delete any duplicate specifications, or issue an NUMMRG,CE command to compress them out.

  • Degrees of freedom in a CE are also present in a coupled (CP) set.

    Work-around:  Delete the CP set and include the degree of freedom in the CE to obtain the desired response.

  • CEs are chained together in such a way that they form a "circular" set.

    Typically, this condition occurs when you define CEINTF and/or MPC contact on adjacent surfaces.

    Work-around:  Perform the CEINTF operation, or specify the contact region encompassing both surfaces simultaneously rather than individually.