ProductsAbaqus/Standard Coding methodsThere are two methods for coding this routine. By default, the subroutine operates in a degree of freedom mode. In this mode each call to this subroutine allows one individual degree of freedom to be constrained. Alternatively, you can specify that the subroutine operate in a nodal mode. In this mode each call to this subroutine allows a set of constraints to be imposed all at once; that is, on multiple degrees of freedom of the dependent node. In either case, the routine will be called for each user-subroutine-defined multi-point constraint or set of constraints. See General multi-point constraints for details. Constraints that involve rotational degrees of freedomIn geometrically nonlinear analyses Abaqus/Standard compounds three-dimensional rotations based on a finite-rotation formulation and not by simple addition of the individual rotation components (see Conventions and Rotation variables). An incremental rotation involving one component usually results in changes in all three total rotation components. Therefore, any general constraint that involves large three-dimensional rotations should be implemented using the nodal mode of user subroutine MPC. The single degree of freedom version of user subroutine MPC can be used for geometrically linear problems, geometrically nonlinear problems with planar rotations, and constraints that do not involve rotation components. Constraints that involve degrees of freedom that are not active in the modelThe degrees of freedom involved in user MPCs must appear on some element or Abaqus/StandardMPC type in the model: user MPCs cannot use degrees of freedom that have not been introduced somewhere on an element. For example, a mesh that uses only continuum (solid) elements cannot have user MPCs that involve rotational degrees of freedom. The simplest way to overcome this limitation is to introduce an element somewhere in the model that uses the required degrees of freedom but does not affect the solution in any other way. Alternatively, if the degrees of freedom are rotations, they can be activated by the use of a library BEAM-type MPC somewhere in the model. Use with nodal coordinate systemsWhen a local coordinate system (Transformed coordinate systems) and a user MPC are both used at a node, the variables at the node are first transformed before the MPC is imposed. Therefore, user-supplied MPCs must be based on the transformed degrees of freedom. The local-to-global transformation matrices TI for the individual nodes: uIglobal=TI⋅uIlocal are passed in for information. Degree of freedom version of user subroutine MPCThis version of user subroutine MPC allows for one individual degree of freedom to be constrained and, thus, eliminated at a time. The constraint can be quite general and nonlinear of the form: f(u1,u2,u3,…,uN,geometry,temperature,field variables)=0. The first degree of freedom in this function, u1, is the degree of freedom that will be eliminated to impose the constraint. u2, u3, etc. are any other degrees of freedom that are involved in the constraint. Since u1 will be eliminated to impose the constraint, it cannot be used in subsequent kinematic constraints (multi-point constraints, linear equation constraints, or boundary conditions). Therefore, the user MPCs are imposed in the order given in the input. You must provide, at all times, two items of information in user subroutine MPC:
User subroutine interfaceSUBROUTINE MPC(UE,A,JDOF,MDOF,N,JTYPE,X,U,UINIT,MAXDOF, * LMPC,KSTEP,KINC,TIME,NT,NF,TEMP,FIELD,LTRAN,TRAN) C INCLUDE 'ABA_PARAM.INC' C DIMENSION A(N),JDOF(N),X(6,N),U(MAXDOF,N),UINIT(MAXDOF,N), * TIME(2),TEMP(NT,N),FIELD(NF,NT,N),LTRAN(N),TRAN(3,3,N) user coding to define UE, A, JDOF, and, optionally, LMPC RETURN END Variables to be defined
Variables that can be updated
Variables passed in for information
Example: Nonlinear single degree of freedom MPCAn example of a nonlinear single degree of freedom MPC is a geometrically nonlinear two-dimensional slider involving nodes a, b, and c. The constraint forces node a to be on the straight line connecting nodes b and c (see Figure 1). Figure 1. Nonlinear MPC example:
two-dimensional slider.
![]() The constraint equation can be written in the form where , , and are the current locations of a, b, and c. The derivatives are readily obtained as Depending on the orientation of the segment we choose either or as the degree of freedom to be eliminated. If , we choose as the dependent degree of freedom. If , we choose as the dependent degree of freedom. Moreover, if points b and c are coincident, the constraint is not applied. To prevent the choice of either or as the dependent degree of freedom from changing during the course of an iteration, the orientation of the segment is tested based on the geometry at the beginning of the iteration. The dependent degree of freedom is allowed to change from increment to increment. Suppose the above multi-point constraint is defined as type 1, with nodes a, a, b, b, c, c. The user subroutine MPC could be coded as follows: SUBROUTINE MPC(UE,A,JDOF,MDOF,N,JTYPE,X,U,UINIT,MAXDOF, * LMPC,KSTEP,KINC,TIME,NT,NF,TEMP,FIELD,LTRAN,TRAN) C INCLUDE 'ABA_PARAM.INC' C DIMENSION A(N),JDOF(N),X(6,N),U(MAXDOF,N),UINIT(MAXDOF,N), * TIME(2),TEMP(NT,N),FIELD(NF,NT,N),LTRAN(N),TRAN(3,3,N) PARAMETER( PRECIS = 1.D-15 ) C IF (JTYPE .EQ. 1) THEN DYBC0 = X(2,5) + UINIT(2,5) - X(2,3) - UINIT(2,3) DXBC0 = X(1,3) + UINIT(1,3) - X(1,5) - UINIT(1,5) DYBC = X(2,5) + U(2,5) - X(2,3) - U(2,3) DXBC = X(1,3) + U(1,3) - X(1,5) - U(1,5) A(3) = X(2,1) + U(2,1) - X(2,5) - U(2,5) A(4) = X(1,5) + U(1,5) - X(1,1) - U(1,1) A(5) = X(2,3) + U(2,3) - X(2,1) - U(2,1) A(6) = X(1,1) + U(1,1) - X(1,3) - U(1,3) JDOF(3) = 1 JDOF(4) = 2 JDOF(5) = 1 JDOF(6) = 2 IF (ABS(DYBC0).LE.PRECIS .AND. ABS(DXBC0).LE.PRECIS) THEN C C POINTS B AND C HAVE COLLAPSED. DO NOT APPLY CONSTRAINT. C LMPC = 0 ELSE IF (ABS(DXBC0) .LT. ABS(DYBC0)) THEN C C MAKE U_A DEPENDENT DOF. C JDOF(1) = 1 JDOF(2) = 2 A(1) = DYBC A(2) = DXBC UE = A(5)A(2)/A(1) + X(1,3) + U(1,3) - X(1,1) ELSE C C MAKE V_A DEPENDENT DOF. C JDOF(1) = 2 JDOF(2) = 1 A(1) = DXBC A(2) = DYBC UE = -A(6)A(2)/A(1) + X(2,3) + U(2,3) - X(2,1) END IF END IF C RETURN END Nodal version of user subroutine MPCThe nodal version of user subroutine MPC allows for multiple degrees of freedom of a node to be eliminated simultaneously. The set of constraints can be quite general and nonlinear, of the form NDEP is the number of dependent degrees of freedom that are involved in the constraint and should have a value between 1 and MDOF, which is the number of active degrees of freedom per node in the analysis. N is the number of nodes involved in the constraint. The scalar constraint functions can also be considered as a vector function , and the first set of degrees of freedom in the vector function will be eliminated to impose the constraint. The sets , , etc. are the independent degrees of freedom at nodes 2, 3, etc. involved in the constraint. The set must be composed of NDEP degrees of freedom at the first node of the MPC definition. For example, if the dependent degrees of freedom are the x-displacement, the z-displacement, and the y-rotation at the first node, . , etc. can be composed of any number of degrees of freedom, depending on which ones play a role in the constraint, and need not be of the same size; for example, and . The dependent node can also reappear as an independent node in the MPC. However, since the dependent degrees of freedom of this node will be eliminated, they cannot be used as independent degrees of freedom in this MPC. For example, if the rotations at node a are constrained by the MPC, the displacements of node a can still be used as independent degrees of freedom in the MPC, but the rotations themselves cannot. Similarly, the degrees of freedom that will be eliminated to impose the constraint cannot be used in subsequent kinematic constraints (multi-point constraints, linear equation constraints, or boundary conditions). The MPCs are imposed in the order given in the input for this purpose. The nodal version of user subroutine MPC was designed with the application of nonlinear constraints involving large three-dimensional rotations in mind. Due to the incremental nature of the solution procedure in Abaqus/Standard, a linearized set of constraints where , , etc. is applied during each iteration. This linearized set of constraints is used for the calculation of equilibrium. For finite rotations the linearized equation is given in terms of the linearized rotations , , , … , yielding Since the linearized rotation field, , is not the variation of the total rotation vector, (see Rotation variables), you cannot obtain the linearized constraint equation by simply taking derivatives of the vector function, , with respect to the rotational degrees of freedom involved. The formulation of the linearized constraint in is equivalent to the formulation of a geometrically linear constraint in the deformed configuration and is generally easier to formulate than the constraint in terms of . For an exact formulation of the constraint, the dependent components of the total rotation vector must be defined exactly (see Rotation variables). You must provide, at all times, two items of information in subroutine MPC:
User subroutine interfaceSUBROUTINE MPC(UE,A,JDOF,MDOF,N,JTYPE,X,U,UINIT,MAXDOF, * LMPC,KSTEP,KINC,TIME,NT,NF,TEMP,FIELD,LTRAN,TRAN) C INCLUDE 'ABA_PARAM.INC' C DIMENSION UE(MDOF),A(MDOF,MDOF,N),JDOF(MDOF,N),X(6,N), * U(MAXDOF,N),UINIT(MAXDOF,N),TIME(2),TEMP(NT,N), * FIELD(NF,NT,N),LTRAN(N),TRAN(3,3,N) user coding to define JDOF, UE, A and, optionally, LMPC RETURN END Variables to be defined
Variables that can be updated
Variables passed in for information
Example: Nonlinear MPCAs an example of a nonlinear MPC, consider the insertion of a rigid beam in a large-displacement, planar (two-dimensional) problem. This MPC is the two-dimensional version of library BEAM-type MPC. It can be implemented as a set of three different single degree of freedom MPCs or as a single nodal MPC. Here, the second method will be worked out because it is simpler and requires less data input. Let a and b (see Figure 2) be the ends of the beam, with a the dependent end. Figure 2. Nonlinear MPC example: rigid
beam.
![]() The rigid beam will then define both components of displacement and the rotation at a in terms of the displacements and rotation at end b according to the set of equations: where and , and are the current locations of a and b, and are the rotations at a and b about the z-axis, L is the length of the link, and is the original orientation of the link. In terms of the original positions and of a and b, and where and . Thus, the constraint equations can be expressed as In light of the above formulation, the nontrivial portions of the matrices A and JDOF are and Since degree of freedom 6 () appears in this constraint, there must be an element in the mesh that uses that degree of freedom—a B21 beam element, for example. If the above multi-point constraint is defined as type 1 with nodes a and b, the user subroutine MPC could be coded as follows: SUBROUTINE MPC(UE,A,JDOF,MDOF,N,JTYPE,X,U,UINIT,MAXDOF,LMPC, * KSTEP,KINC,TIME,NT,NF,TEMP,FIELD,LTRAN,TRAN) C INCLUDE 'ABA_PARAM.INC' C DIMENSION UE(MDOF),A(MDOF,MDOF,N),JDOF(MDOF,N),X(6,N), * U(MAXDOF,N),UINIT(MAXDOF,N),TIME(2),TEMP(NT,N), * FIELD(NF,NT,N),LTRAN(N),TRAN(3,3,N) C IF (JTYPE .EQ. 1) THEN COSFIB = COS(U(6,2)) SINFIB = SIN(U(6,2)) ALX = X(1,1) - X(1,2) ALY = X(2,1) - X(2,2) C UE(1) = U(1,2) + ALX*(COSFIB-1.) - ALY*SINFIB UE(2) = U(2,2) + ALY*(COSFIB-1.) + ALX*SINFIB UE(3) = U(6,2) C A(1,1,1) = 1. A(2,2,1) = 1. A(3,3,1) = 1. A(1,1,2) = -1. A(1,3,2) = ALX*SINFIB + ALY*COSFIB A(2,2,2) = -1. A(2,3,2) = -ALX*COSFIB + ALY*SINFIB A(3,3,2) = -1. C JDOF(1,1) = 1 JDOF(2,1) = 2 JDOF(3,1) = 6 JDOF(1,2) = 1 JDOF(2,2) = 2 JDOF(3,2) = 6 END IF C RETURN END Example: Nonlinear MPC involving finite rotationsAs an example of a nonlinear MPC involving finite rotations, consider a two-dimensional constant velocity joint that might be part of a robotics application. Let a, b, c (see Figure 3) be the nodes making up the joint, with a the dependent node. Figure 3. Nonlinear MPC example: constant
velocity joint.
![]() The joint is operated by prescribing an axial rotation at c and an out-of-plane rotation at b. The compounding of these two prescribed rotation fields will determine the total rotation at a. We can formally write this constraint as follows: where denotes the rotation product. The formulation of the linearized constraint can be readily achieved from geometrically linear considerations in the deformed state. In geometrically linear problems compound rotations are obtained simply as the linear superposition of individual rotation vectors. Consider the geometry depicted in Figure 3 and assume that the infinitesimal rotations and are applied at c and b, respectively. The rotation at a will simply be the sum of the vector to the vector rotated by an angle about the z-axis. Thus, the linearized constraint can be written directly as In light of this formulation, the nontrivial portions of the matrices JDOF and A are and Since degrees of freedom 4 (), 5(), and 6() appear in this constraint, there must be an element in the mesh that uses these degrees of freedom—a B31 beam element, for example. The MPC subroutine has been coded with just this information. In this case Abaqus/Standard updates the dependent rotation field, , based on the linearized constraint equations. Although the constraint is not satisfied exactly, good results are obtained as long as the rotation increments are kept small enough. A more rigorous derivation of the linearized constraint and the exact nonlinear recovery of the dependent degrees of freedom is presented in Rotation variables. If the above multi-point constraint is defined as type 1 with nodes a, b, and c, user subroutine MPC could be coded as follows: SUBROUTINE MPC(UE,A,JDOF,MDOF,N,JTYPE,X,U,UINIT,MAXDOF,LMPC, * KSTEP,KINC,TIME,NT,NF,TEMP,FIELD,LTRAN,TRAN) C INCLUDE 'ABA_PARAM.INC' C DIMENSION UE(MDOF),A(MDOF,MDOF,N),JDOF(MDOF,N),X(6,N), * U(MAXDOF,N),UINIT(MAXDOF,N),TIME(2),TEMP(NT,N), * FIELD(NF,NT,N),LTRAN(N),TRAN(3,3,N) C IF (JTYPE .EQ. 1) THEN A(1,1,1) = 1. A(2,2,1) = 1. A(3,3,1) = 1. A(3,1,2) = -1. A(1,1,3) = -COS(U(6,2)) A(2,1,3) = -SIN(U(6,2)) C JDOF(1,1) = 4 JDOF(2,1) = 5 JDOF(3,1) = 6 JDOF(1,2) = 6 JDOF(1,3) = 4 END IF C RETURN END |