<!-- source-page: 211 -->

V(K1) Time rate of change of the variables (velocities, rates of rotation). Defined for implicit dynamics only (LFLAGS(1) 11 or 12).

A(K1) Accelerations of the variables. Defined for implicit dynamics only (LFLAGS(1) 11 or 12).

# JDLTYP

An array containing the integers used to define distributed load types for the element. Loads of type Un are identified by the integer value n in JDLTYP; loads of type UnNU are identified by the negative integer value in JDLTYP. JDLTYP(K1,K2) is the identifier of the K1th distributed load in the K2th load case. For general nonlinear steps K2 is always 1.

# ADLMAG

For general nonlinear steps ADLMAG(K1,1) is the total load magnitude of the K1th distributed load at the end of the current increment for distributed loads of type Un. For distributed loads of type UnNU, the load magnitude is defined in UELMAT; therefore, the corresponding entries in ADLMAG are zero. For linear perturbation steps ADLMAG(K1,1) contains the total load magnitude of the K1th distributed load of type Un applied in the base state. Base state loading of type UnNU must be dealt with inside UELMAT. ADLMAG(K1,2), ADLMAG(K1,3), etc. are currently not used.

# DDLMAG

For general nonlinear steps DDLMAG contains the increments in the magnitudes of the distributed loads that are currently active on this element for distributed loads of type Un. DDLMAG(K1,1) is the increment of magnitude of the load for the current time increment. The increment of load magnitude is needed to compute the external work contribution. For distributed loads of type UnNU the load magnitude is defined in UELMAT; therefore, the corresponding entries in DDLMAG are zero. For linear perturbation steps DDLMAG(K1,K2) contains the perturbation in the magnitudes of the distributed loads that are currently active on this element for distributed loads of type Un. K1 denotes the K1th perturbation load active on the element. K2 is always 1, except for steady-state dynamics, where K2=1 for real loads and K2=2 for imaginary loads. Perturbation loads of type UnNU must be dealt with inside UELMAT.

# PREDEF

An array containing the values of predefined field variables, such as temperature in an uncoupled stress/displacement analysis, at the nodes of the element (“Predefined fields,” Section 34.6.1 of the Abaqus Analysis User’s Guide).

The first index of the array, K1, is either 1 or 2, with 1 indicating the value of the field variable at the end of the increment and 2 indicating the increment in the field variable. The second index, K2, indicates the variable: the temperature corresponds to index 1, and the predefined field variables correspond to indices 2 and above. In cases where temperature is not defined, the predefined field variables begin with index 1. The third index, K3, indicates the local node number on the element.

<!-- source-page: 212 -->

<table><tr><td>PREDEF (K1,1,K3)</td><td>Temperature.</td></tr><tr><td>PREDEF (K1,2,K3)</td><td>First predefined field variable.</td></tr><tr><td>PREDEF (K1,3,K3)</td><td>Second predefined field variable.</td></tr><tr><td>Etc.</td><td>Any other predefined field variable.</td></tr><tr><td>PREDEF (K1,K2,K3)</td><td>Total or incremental value of the K2th predefined field variable at the K3th node of the element.</td></tr><tr><td>PREDEF (1,K2,K3)</td><td>Values of the variables at the end of the current increment.</td></tr><tr><td>PREDEF (2,K2,K3)</td><td>Incremental values corresponding to the current time increment.</td></tr></table>

# PARAMS

An array containing the parameters associated with the solution procedure. The entries in this array depend on the solution procedure currently being used when UELMAT is called, as indicated by the entries in the LFLAGS array (see below).

For implicit dynamics (LFLAGS(1) = 11 or 12) PARAMS contains the integration operator values, as:

<table><tr><td>PARAMS (1)</td><td> $\alpha$ </td></tr><tr><td>PARAMS (2)</td><td> $\beta$ </td></tr><tr><td>PARAMS (3)</td><td> $\gamma$ </td></tr></table>

# LFLAGS

An array containing the flags that define the current solution procedure and requirements for element calculations. Detailed requirements for the various Abaqus/Standard procedures are defined earlier in this section.

LFLAGS(1) Defines the procedure type. See “Results file output format,” Section 5.1.2 of the Abaqus Analysis User’s Guide, for the key used for each procedure.

LFLAGS(2)=0 Small-displacement analysis.

LFLAGS(2)=1 Large-displacement analysis (nonlinear geometric effects included in the step; see “General and linear perturbation procedures,” Section 6.1.3 of the Abaqus Analysis User’s Guide).

LFLAGS(3)=1 Normal implicit time incrementation procedure. User subroutine UELMAT must define the residual vector in RHS and the Jacobian matrix in AMATRX.

<!-- source-page: 213 -->

$\begin{array} { r l } { \mathtt { L F L A G S \ ( 3 ) } = 2 \qquad } & { \mathtt { D e f i n e \ t h e \ c u r r e n t \ s t i f f n e s s \ m a t r i x \ ( a M A T R X } } \\ & { = K ^ { N M } = - \partial F ^ { N } / \partial u ^ { M } \ \mathrm { o r } \ - \partial G ^ { N } / \partial u ^ { M } \ \mathrm { o n l y } . } \end{array}$

$\begin{array} { r l } { \mathtt { L F L A G S } \left( 3 \right) = 3 \qquad } & { \mathrm { D e f n e ~ t h e ~ c u r r e n t ~ d a m p i n g ~ m a t r i x ~ ( a M a T R X } } \\ & { = C ^ { N M } = - \partial F ^ { N } / \partial \dot { u } ^ { M } \ \mathrm { o r } \ - \partial G ^ { N } / \partial \dot { u } ^ { M } \ \mathrm { o n l y } . } \end{array}$

LFLAGS(3)=4 Define the current mass matrix $( \tt { a M A T R X } = M ^ { N M } = \tt { \frac { \partial } { \partial } }$ $- \partial F ^ { N } / \partial \ddot { u } ^ { M } )$ only. Abaqus/Standard always requests an initial mass matrix at the start of the analysis.

LFLAGS(3)=5 Define the current residual or load vector $( \mathtt { R H S } = F ^ { N } )$ only.

LFLAGS(3)=6 Define the current mass matrix and the residual vector for the initial acceleration calculation (or the calculation of accelerations after impact).

LFLAGS(3)=100 Define perturbation quantities for output.

LFLAGS(4)=0 The step is a general step.

LFLAGS(4)=1 The step is a linear perturbation step.

LFLAGS(5)=0 The current approximations to $u ^ { M }$ , etc. were based on Newton corrections.

LFLAGS(5)=1 The current approximations were found by extrapolation from the previous increment.

# TIME(1)

Current value of step time or frequency.

# TIME(2)

Current value of total time.

# Scalar parameters:

# DTIME

Time increment.

# PERIOD

Time period of the current step.

# NDOFEL

Number of degrees of freedom in the element.

# MLVARX

Dimensioning parameter used when several displacement or right-hand-side vectors are used.

<!-- source-page: 214 -->

# NRHS

Number of load vectors. NRHS is 1 in most nonlinear problems: it is 2 for the modified Riks static procedure (“Static stress analysis,” Section 6.2.2 of the Abaqus Analysis User’s Guide), and it is greater than 1 in some linear analysis procedures and during substructure generation.

# NSVARS

User-defined number of solution-dependent state variables associated with the element (“Defining the number of solution-dependent variables that must be stored within the element” in “User-defined elements,” Section 32.17.1 of the Abaqus Analysis User’s Guide).

# NPROPS

User-defined number of real property values associated with the element (“Defining the element properties” in “User-defined elements,” Section 32.17.1 of the Abaqus Analysis User’s Guide).

# NJPROP

User-defined number of integer property values associated with the element (“Defining the element properties” in “User-defined elements,” Section 32.17.1 of the Abaqus Analysis User’s Guide).

# MCRD

MCRD is defined as the maximum of the user-defined maximum number of coordinates needed at any node point (“Defining the maximum number of coordinates needed at any nodal point” in “User-defined elements,” Section 32.17.1 of the Abaqus Analysis User’s Guide) and the value of the largest active degree of freedom of the user element that is less than or equal to 3. For example, if you specify that the maximum number of coordinates is 1 and the active degrees of freedom of the user element are 2, 3, and 6, MCRD will be 3. If you specify that the maximum number of coordinates is 2 and the active degrees of freedom of the user element are 11 and 12, MCRD will be 2.

# NNODE

User-defined number of nodes on the element (“Defining the number of nodes associated with the element” in “User-defined elements,” Section 32.17.1 of the Abaqus Analysis User’s Guide).

# JTYPE

Integer defining the element type. This is the user-defined integer value n in element type Un (“Assigning an element type key to a user-defined element” in “User-defined elements,” Section 32.17.1 of the Abaqus Analysis User’s Guide).

# KSTEP

Current step number.

# KINC

Current increment number.

# JELEM

User-assigned element number.

<!-- source-page: 215 -->

# NDLOAD

Identification number of the distributed load or flux currently active on this element.

# MDLOAD

Total number of distributed loads and/or fluxes defined on this element.

# NPREDF

Number of predefined field variables, including temperature. For user elements Abaqus/Standard uses one value for each field variable per node.

# MATERIALLIB

A variable that must be passed to the utility routines performing material point computations.

# UELMAT conventions

The solution variables (displacement, velocity, etc.) are arranged on a node/degree of freedom basis. The degrees of freedom of the first node are first, followed by the degrees of freedom of the second node, etc.

# Usage with general nonlinear procedures

The values of $u ^ { N }$ (and, in direct-integration dynamic steps, $\dot { u } ^ { N }$ and $\ddot { u } ^ { N } )$ enter user subroutine UELMAT as their latest approximations at the end of the time increment; that is, at time $t + \Delta t$ .

The values of $H ^ { \alpha }$ enter the subroutine as their values at the beginning of the time increment; that is, at time t. It is your responsibility to define suitable time integration schemes to update $H ^ { \alpha }$ . To ensure accurate, stable integration of internal state variables, you can control the time incrementation via PNEWDT.

The values of $\cdot _ { p ^ { \beta } }$ enter the subroutine as the values of the total load magnitude for the th distributed load at the end of the increment. Increments in the load magnitudes are also available.

In the following descriptions of the user element’s requirements, it will be assumed that LFLAGS(3)=1 unless otherwise stated.

# Static analysis (LFLAGS(1)=1,2)

• $F ^ { N } = F ^ { N } ( u ^ { M } , H ^ { \alpha } , p ^ { \beta } , t )$   
• Automatic convergence checks are applied to the force residuals corresponding to degrees of freedom 1–7.   
• You must define AMATRX $= K ^ { N M } = - \partial F ^ { N } / \partial u ^ { M }$ and $\mathbf { R H S } = F ^ { N }$ and update the state variables, $H ^ { \alpha }$ .

# Direct-integration dynamic analysis (LFLAGS(1)=11, 12)

• Automatic convergence checks are applied to the force residuals corresponding to degrees of freedom 1–7.

<!-- source-page: 216 -->

• LFLAGS(3)=1: Normal time increment. Either the Hilber-Hughes-Taylor or the backward Euler time integration scheme will be used. With set to zero for the backward Euler, both schemes imply

$$
F ^ {N} = - M ^ {N M} \ddot {u} _ {t + \Delta t} + (1 + \alpha) G ^ {N} - \alpha G _ {t} ^ {N},
$$

where $M ^ { N M } = M ^ { N M } ( u ^ { M } , \dot { u } ^ { M } , H ^ { \alpha } , p ^ { \beta } , t , . . . )$ and $G ^ { N } = G ^ { N } ( u ^ { M } , \dot { u } ^ { M } , H ^ { \alpha } , p ^ { \beta } , t , . . . )$ ; that is, the highest time derivative of $u ^ { M }$ in $M ^ { N M }$ and $G ^ { N }$ is $\dot { u } ^ { M }$ , so that

$$
- \frac {\partial F ^ {N}}{\partial \ddot {u} ^ {M} {} _ {t + \Delta t}} = M ^ {N M}.
$$

Therefore, you must store $G _ { t } ^ { N }$ as an internal state vector. If half-increment residual calculations are required, you must also store $G _ { t ^ { - } } ^ { N }$ as an internal state vector, where indicates the time at the beginning of the previous increment. For $\alpha = 0 , F ^ { N } = - M ^ { N M } \ddot { u } _ { t + \Delta t } + G ^ { N } { } _ { t + \Delta t }$ and $G _ { t } ^ { N }$ is not needed. You must define $\mathtt { A M A T R X } = M ^ { N M } \left( d \ddot { u } / d u \right) + \left( 1 + \alpha \right) C ^ { N M } \left( d \dot { u } / d u \right) + \left( 1 + \alpha \right) K ^ { N M }$ where $C ^ { N M } = - \partial G ^ { N } { } _ { t + \Delta t } / \partial \dot { u } ^ { M }$ and $K ^ { N M } = - \partial G ^ { N } { } _ { t + \Delta t } / \partial u ^ { M }$ . $\mathbf { R H S } = \mathbf { \nabla } F ^ { N }$ must also be defined and the state variables, $H ^ { \alpha }$ , updated. Although the value of given in the dynamic step definition is passed into UELMAT, the value of can vary from element to element. For example, can be set to zero for some elements in the model where numerical dissipation is not desired.

• LFLAGS(3)=5: Half-increment residual $( F _ { 1 / 2 } ^ { N } )$ calculation. Abaqus/Standard will adjust the time increment so that $| F _ { 1 / 2 } ^ { N } | ~ < ~ t o l e r a n c e$ (where is specified in the dynamic step definition). The half-increment residual is defined as

$$
F _ {1 / 2} ^ {N} = - M ^ {N M} \ddot {u} _ {t + \Delta t / 2} + (1 + \alpha) G _ {t + \Delta t / 2} ^ {N} - \frac {\alpha}{2} (G _ {t} ^ {N} + G _ {t -} ^ {N}),
$$

where indicates the time at the beginning of the previous increment ( is a parameter of the Hilber-Hughes-Taylor time integration operator and will be set to zero if the backward Euler time integration operator is used). You must define $\mathbf { R H S } = F _ { 1 / 2 } ^ { N }$ . To evaluate $M ^ { N M }$ and ${ G ^ { N } } _ { t + \Delta t / 2 } , \mathrm { y o u }$ must calculate ${ H ^ { \alpha } } _ { t + \Delta t / 2 }$ . These half-increment values will not be saved. DTIME will still contain $\Delta t \left( { \mathrm { n o t } } \Delta t / 2 \right)$ . The values contained in U, V, A, and DU are half-increment values.

• LFLAGS(3)=4: Velocity jump calculation. Abaqus/Standard solves $- M ^ { N M } \Delta \dot { u } ^ { M } = 0$ for $\Delta \dot { u } ^ { M }$ , so you must define AMATRX . $\tt A M A T R X = M ^ { N M }$   
• LFLAGS(3)=6: Initial acceleration calculation. Abaqus/Standard solves $- M ^ { N M } \ddot { u } ^ { M } + G ^ { N } = 0$ for $\ddot { u } ^ { M }$ , so you must define $\mathtt { A M A T R X } = M ^ { N M }$ and $\mathbf { R } \mathbf { \bar { H } } \mathbf { S } = G ^ { N }$ .

# Quasi-static analysis (LFLAGS(1)=21)

• The requirements are identical to those of static analysis.

# Steady-state heat transfer analysis (LFLAGS(1)=31)

• The requirements are identical to those of static analysis, except that the automatic convergence checks are applied to the heat flux residuals corresponding to degrees of freedom 11, 12, …

<!-- source-page: 217 -->

# Transient heat transfer analysis $\left( \phantom { - } \theta _ { m a x } \right) \left( \tt L F L A G S \left( 1 \right) = 3 2 , \phantom { - } 3 3 \right)$

• Automatic convergence checks are applied to the heat flux residuals corresponding to degrees of freedom 11, 12, …   
• The backward difference scheme is always used for time integration; that is, Abaqus/Standard assumes that $\dot { u } _ { t + \Delta t } = \Delta u / \Delta t$ , where $\Delta u = u _ { t + \Delta t } - u _ { t }$ and so $d \dot { u } / d u = 1 / \Delta t$ always. For degrees of freedom 11, 12, …, $\lvert \Delta u \rvert$ will be compared against the user-prescribed maximum allowable nodal temperature change in an increment, $\Delta \theta _ { m a x }$ , for controlling the time integration accuracy.   
• You need to define AMATRX $= K ^ { N M } + ( 1 / \Delta t ) \ C ^ { N M }$ , where $C ^ { N M }$ is the heat capacity matrix and $\mathbf { R } \mathbf { \bar { H } } \mathbf { S } = F ^ { N }$ , and must update the state variables, $H ^ { \alpha }$ .

# Usage with linear perturbation procedures

“General and linear perturbation procedures,” Section 6.1.3 of the Abaqus Analysis User’s Guide, describes the linear perturbation capabilities in Abaqus/Standard. Here, base state values of variables will be denoted by $u ^ { M } , H ^ { \alpha }$ , etc. Perturbation values will be denoted by $\tilde { u } ^ { M } , \tilde { H } ^ { \alpha }$ , etc.

Abaqus/Standard will not call user subroutine UELMAT for the following procedures: eigenvalue buckling prediction, response spectrum, transient modal dynamic, steady-state dynamic (modal and direct), and random response.

# Static analysis (LFLAGS(1)=1, 2)

• Abaqus/Standard will solve $K ^ { N M } \tilde { u } ^ { M } = \tilde { P } ^ { N }$ for $\tilde { u } ^ { M }$ , where $K ^ { N M }$ is the base state stiffness matrix and the perturbation load vector, $\tilde { P } ^ { N }$ , is a linear function of the perturbation loads, $\tilde { p } ;$ that is, $\tilde { P } ^ { N } =$ $\left( { \partial F } / { \partial \tilde { p } } \right) \tilde { p } .$ .   
• $\mathtt { L F L A G S } \left( 3 \right) = 1$ : You must define AMATRX $K ^ { N M }$ and $\mathbf { R } \mathbf { \tilde { H } S } = \mathbf { \tilde { \rho } } \tilde { P } ^ { N }$ .   
• $\mathtt { L F L A G S } \left( 3 \right) = 1 0 0 $ : You must compute perturbations of the internal variables, $\tilde { H } ^ { \alpha }$ , and define RHS $= \tilde { P } ^ { N } - K ^ { N M } \tilde { u } ^ { M } $ for output purposes.

# Eigenfrequency extraction analysis (LFLAGS(1)=41)

$\bullet F ^ { N } = - M ^ { N M } \ddot { \tilde { u } } + G ^ { N } ( u ^ { M } + \tilde { u } ^ { M } , \ldots ) = - M ^ { N M } \ddot { \tilde { u } } + \left( \partial G ^ { N } / \partial u ^ { M } \right) \tilde { u } ^ { M } .$   
• Abaqus/Standard will solve $\begin{array} { r l r } { K ^ { N M } \phi _ { i } ^ { M } } & { { } = } & { \omega _ { i } ^ { 2 } M ^ { N M } \phi _ { i } ^ { M } } \end{array}$ for $\phi _ { i } ^ { N }$ and $\omega _ { i }$ , where $\begin{array} { r l } { K ^ { N M } } & { { } = } \end{array}$ $- \partial \bar { F ^ { N } } / \partial u ^ { M }$ is the base state stiffness matrix and $M ^ { N M } = - \partial F ^ { \dot { N } \dot { M } } / \partial \ddot { u } ^ { M }$ is the base state mass matrix.   
• LFLAGS(3)=2: Define $\mathbf { a } \mathbf { M } \mathbf { A } \mathbf { T } \mathbf { R } \mathbf { X } = K ^ { N M }$ .   
• LFLAGS(3)=4: Define $\mathtt { A M A T R X } = M ^ { N M }$ .

# Example: Structural user element with Abaqus isotropic linearly elastic material

Both a structural and a heat transfer user element have been created to demonstrate the usage of subroutine UELMAT. These user-defined elements are applied in a number of analyses. The following excerpt

<!-- source-page: 218 -->

illustrates how the linearly elastic isotropic material available in Abaqus can be accessed from user subroutine UELMAT:

```txt
...
*USER ELEMENT, TYPE=U1, NODES=4, COORDINATES=2, VAR=16,
    INTEGRATION=4, TENSOR=PSTRAIN
    1,2
*ELEMENT, TYPE=U1, ELSET=SOLID
    1, 1,2,3,4
...
*UEL PROPERTY, ELSET=SOLID, MATERIAL=MAT
...
*MATERIAL, NAME=MAT
*ELASTIC
7.00E+010, 0.33
```

The user element defined above is a 4-node, fully integrated plane strain element, similar to the Abaqus CPE4 element.

The next excerpt shows the listing of the user subroutine. Inside the subroutine, a loop over the integration points is performed. For each integration point the utility routine MATERIAL\_LIB\_MECH is called, which returns stress and Jacobian at the integration point. These quantities are used to compute the right-hand-side vector and the element Jacobian.

```csv
c*****
subroutine uelmat(rhs,amatrix,svars,energy,ndofel,nrhs,
1 nsvars,props,nprops,coords,mcrd,nnode,u,du,
2 v,a,jtype,time,dtime,kstep,kinc,jelem,params,
3 ndload,jdltyp,adlmag,predef,npredf,lflags,mlvarx,
4 ddlmag,mdload,pnewdt,jprops,njpro,period,
5 materiallib)
c
include 'aba_param.inc'
c
dimension rhs(mlvarx,*, amatrix(ndofel, ndofel), props(*),
1 svars(*), energy(*), coords(mcrd, nnode), u(ndofel),
2 du(mlvarx,*, v(ndofel), a(ndofel), time(2), params(*),
3 jdltyp(mdload,*, adlmag(mdload,*, ddlmag(mdload,*),
4 predef(2, npredf, nnode), lflags(*), jprops(*)
parameter (zero=0.d0, dmone=-1.0d0, one=1.d0, four=4.0d0,
1 fourth=0.25d0, gaussCoord=0.577350269d0)
parameter (ndim=2, ndof=2, nshr=1, nnodemax=4,
1 ntens=4, ninpt=4, nsvint=4)
c 
```

<!-- source-page: 219 -->

```fortran
c ndim ... number of spatial dimensions
c ndof ... number of degrees of freedom per node
c nshr ... number of shear stress component
c ntens ... total number of stress tensor components
c (=ndi+nshr)
c ninpt ... number of integration points
c nsvint... number of state variables per integration pt
c (strain)
c
    dimension stiff(ndof*nnodemax,ndof*nnodemax),
    1 force(ndof*nnodemax), shape(nnodemax), dshape(ndim,nnodemax),
    2 xjac(ndim,ndim),xjaci(ndim,ndim), bmat(nnodemax*ndim),
    3 statevLocal(nsvint),stress(ntens), ddsdde(ntens, ntens),
    4 stran(ntens), dstran(ntens), wght(ninpt)
c
    dimension predef_loc(npredf), dpredef_loc(npredf),
    1 defGrad(3,3),utmp(3),xdu(3),stiff_p(3,3),force_p(3)
    dimension coord24(2,4),coords_ip(3)
    data coord24 /dmone, dmone,
    2 one, dmone,
    3 one, one,
    4 dmone, one/
c
    data wght /one, one, one, one/
c
c**************************
c
c U1 = first-order, plane strain, full integration
c
c State variables: each integration point has nsvint SDVs
c
c isvinc=(npt-1)*nsvint ... integration point counter
c statev(1+isvinc ) ... strain
c
c**************************
if (lflags(3).eq.4) then
    do i=1, ndofel
    do j=1, ndofel
    amatrix(i,j) = zero
    end do
    amatrix(i,i) = one
    end do 
```

<!-- source-page: 220 -->

```matlab
goto 999
end if
c
c PRELIMINARIES
c
pnewdtLocal = pnewdt
if(jtype .ne. 1) then
    write(7,*)'Incorrect element type'
    call xit
endif
if(nvars .lt. ninpt*nsvint) then
    write(7,*)'Increase the number of SDVs to', ninpt*nsvint
    call xit
endif
thickness = 0.1d0
c
c INITIALIZE RHS AND LHS
c
do k1=1, ndof*nnode
    rhs(k1, 1)= zero
    do k2=1, ndof*nnode
    amatrix(k1, k2)= zero
    end do
end do
c
c LOOP OVER INTEGRATION POINTS
c
do kintk = 1, ninpt
c
c EVALUATE SHAPE FUNCTIONS AND THEIR DERIVATIVES
c
c determine (g,h)
c
g = coord24(1,kintk)*gaussCoord
h = coord24(2,kintk)*gaussCoord
c
c shape functions
    shape(1) = (one - g)*(one - h)/four;
    shape(2) = (one + g)*(one - h)/four;
    shape(3) = (one + g)*(one + h)/four;
    shape(4) = (one - g)*(one + h)/four;
c 
```
