<!-- source-page: 371 -->

```txt
DIMENSION ARRAY(15),JARRAY(15),JMAC(*),JMATYP(*),COORD(*)
C
C Error counter:
JERROR = 0
C Stress tensor:
CALL GETVRM('S',ARRAY,JARRAY,FLGRAY,JRCD,JMAC,JMATYP,
1 MATLAYO,LACCFLA)
JERROR = JERROR + JRCD
UVAR(1) = ARRAY(1)
UVAR(2) = ARRAY(2)
UVAR(3) = ARRAY(3)
UVAR(4) = ARRAY(4)
UVAR(5) = ARRAY(5)
UVAR(6) = ARRAY(6)
C Kinematic shift tensor:
CALL GETVRM('ALPHA',ARRAY,JARRAY,FLGRAY,JRCD,JMAC,JMATYP,
1 MATLAYO,LACCFLA)
JERROR = JERROR + JRCD
C Calculate the position relative to the center of the
C yield surface:
UVAR(1) = UVAR(1) - ARRAY(1)
UVAR(2) = UVAR(2) - ARRAY(2)
UVAR(3) = UVAR(3) - ARRAY(3)
UVAR(4) = UVAR(4) - ARRAY(4)
UVAR(5) = UVAR(5) - ARRAY(5)
UVAR(6) = UVAR(6) - ARRAY(6)
C If error, write comment to .DAT file:
IF(JERROR.NE.0) THEN
WRITE(6,*) 'REQUEST ERROR IN UVARM FOR ELEMENT NUMBER',
1 NOEL,'INTEGRATION POINT NUMBER ',NPT
ENDIF
RETURN
END 
```

<!-- source-page: 372 -->

<!-- source-page: 373 -->

# 1.1.59 UWAVE: User subroutine to define wave kinematics for an Abaqus/Aqua analysis.

Products: Abaqus/Standard Abaqus/Aqua

# References

• “Abaqus/Aqua analysis,” Section 6.11.1 of the Abaqus Analysis User’s Guide   
• \*WAVE

# Overview

User subroutine UWAVE:

• will be called at each load integration point for which an Abaqus/Aqua load is specified and a userdefined gravity wave is specified;   
• can be used to define the wave kinematics (fluid velocity and acceleration, dynamic pressure, vertical gradient of the dynamic pressure, and the instantaneous fluid surface elevation) as a function of time and space; and   
• for stochastic analysis, can be used to determine when during the analysis the current configuration should be retained as the intermediate configuration upon which the wave kinematics are based.

# User subroutine interface

```prolog
SUBROUTINE UWAVE(V, A, PDYN, DPDYNDZ, SURF, LPDYN
1 LRECOMPUTE, LUPLOCAL, LUPGLOBAL,
2 LSURF, NDIM, XCUR, XINTERMED,
3 GRAV, DENSITY, ELEVB, ELEVS,
4 SEED, NSPECTRUM, FREQWAMP,
5 TIME, DTIME, NOEL, NPT, KSTEP, KINC)
C
INCLUDE 'ABA_PARAM.INC'
C
DIMENSION V(NDIM), A(NDIM), XCUR(NDIM), XINTERMED(NDIM),
1 FREQWAMP(2, NSPECTRUM), TIME(2)
user coding to define V, A, PDYN, DPDYNDZ, SURF
and, if necessary, LUPGLOBAL and LUPLOCAL
RETURN
END 
```

<!-- source-page: 374 -->

# When LSURF=0

# V(NDIM)

The total fluid velocity at the current load integration location. This array is passed into UWAVE as the steady current velocity. The array should be updated as the sum of the steady current velocity and the velocity contribution from the user-defined wave theory.

# A(NDIM)

The fluid acceleration at the current load integration location.

# PDYN

The dynamic pressure contribution to the total pressure. This variable is needed only for buoyancy loads. The total pressure at a location below the instantaneous surface elevation is the sum of the atmospheric pressure, the hydrostatic pressure measured to the mean fluid elevation, and the dynamic pressure. See “Airy wave theory,” Section 6.2.2 of the Abaqus Theory Guide, and “Stokes wave theory,” Section 6.2.3 of the Abaqus Theory Guide, for definitions of the dynamic pressure for Airy and Stokes waves, respectively.

# DPDYNDZ

The gradient of the dynamic pressure in the vertical direction. This variable is needed only for buoyancy loads.

# When LSURF=1

# SURF

The vertical coordinate of the instantaneous fluid surface corresponding to the horizontal position of the load integration point (given in XCUR). If the current location of the load integration point is above the instantaneous surface elevation, no fluid loads will be applied.

# Only in an analysis with stochastic wave kinematics based on an intermediate configuration

# LUPLOCAL

Flag to determine if the intermediate configuration will be updated for this element. This flag can be set only when LRECOMPUTE=1. Return LUPLOCAL as 0 (default) to indicate that the intermediate configuration should not be updated. Return LUPLOCAL as 1 if the intermediate configuration should be updated for this element. The intermediate configuration is stored on an element-by-element basis. Therefore, all integration points for a given element will have their intermediate configuration updated if an update is requested at any one integration point on the element.

# LUPGLOBAL

Flag to determine if the intermediate configuration will be updated for all elements. This flag can be set only when LRECOMPUTE=1. Return LUPGLOBAL as 0 (default) to indicate that the intermediate configuration should not be updated. Return LUPGLOBAL as 1 if the intermediate configuration should be updated for all elements with Abaqus/Aqua loads.

<!-- source-page: 375 -->

# LRECOMPUTE

For stochastic analysis LRECOMPUTE=1 indicates that an update to the intermediate configuration is permitted during this call to user subroutine UWAVE. The local and global update flags must be set accordingly. If the intermediate configuration is to be updated, the local update flag LUPLOCAL or the global update flag LUPGLOBAL must be set to 1. When LRECOMPUTE=1 and the intermediate configuration needs to be updated, the user subroutine should recompute all wave kinematics information based on the new intermediate configuration. For nonstochastic analysis this flag is always set to 0.

# LPDYN

LPDYN=1 indicates that only the dynamic pressure and its gradient need to be calculated (i.e., buoyancy loads). LPDYN=0 indicates that only the fluid velocity and acceleration need to be calculated (i.e., drag or inertia loads).

# LSURF

LSURF=1 indicates that subroutine UWAVE only needs to return the instantaneous fluid surface elevation. When LSURF=1, no velocity, acceleration, or dynamic pressure needs to be calculated. LSURF=0 indicates that the instantaneous fluid surface elevation SURF is not needed.

# NDIM

Two or three, indicating that the analysis is in two or three dimensions. The vertical direction is the global y-direction in two-dimensional analysis and the global z-direction in three-dimensional analysis.

# XCUR(NDIM)

An array containing the current coordinates of the load integration point.

# XINTERMED(NDIM)

An array containing the intermediate configuration coordinates of the load integration point. For nonstochastic analysis this array is not used. In a stochastic analysis the wave field is based upon this configuration. At the beginning of each load increment the LRECOMPUTE flag is set to 1 to prompt you for update action. If the intermediate configuration should be replaced by the current configuration, the flag LUPLOCAL should be set to 1 to update the intermediate configuration for this element only or the flag LUPGLOBAL should be set to 1 to update the intermediate configuration for all elements that have Abaqus/Aqua loading. At the beginning of the analysis the intermediate configuration is the reference configuration.

# GRAV

The user-specified gravitational constant in the fluid variable definition.

# DENSITY

The user-specified fluid mass density in the fluid variable definition.

<!-- source-page: 376 -->

# ELEVB

The user-specified elevation of the seabed in the fluid variable definition.

# ELEVS

The user-specified elevation of the still fluid level in the fluid variable definition.

# SEED

For stochastic analysis the user-specified random number seed in the gravity wave definition.

# NSPECTRUM

For stochastic analysis the number of user-specified frequency versus wave amplitude pairs in the gravity wave definition, used to define the wave spectrum.

# FREQWAMP(1,NSPECTRUM)

For stochastic analysis the frequency values used to define the wave spectrum.

# FREQWAMP(2,NSPECTRUM)

For stochastic analysis the wave amplitude values used to define the wave spectrum.

# TIME(1)

Value of step time at the end of the current increment.

# TIME(2)

Value of total time at the end of the current increment.

# DTIME

Time increment.

# NOEL

Element number.

# NPT

Load integration point number. All line elements use full integration for the application of external loads. For distributed loads applied to the ends of the element, NPT corresponds to the end number of the element.

# KSTEP

Step number.

# KINC

Increment number.

<!-- source-page: 377 -->

# 1.1.60 UXFEMNONLOCALWEIGHT: User subroutine to define the weight function used to compute the average stress/strain to determine the crack propagation direction.

# Product: Abaqus/Standard

# References

• “Modeling discontinuities as an enriched feature using the extended finite element method,” Section 10.7.1 of the Abaqus Analysis User’s Guide   
• “Progressive damage and failure,” Section 24.1.1 of the Abaqus Analysis User’s Guide   
• \*DAMAGE INITIATION

# Overview

User subroutine UXFEMNONLOCALWEIGHT:

• can be used to specify a user-defined weight function; and   
• is currently available only for enriched elements.

# User subroutine interface

```fortran
SUBROUTINE UXFEMNONLOCALWEIGHT (WEIGHT, JELNO, NPT, COORDS, & CRACKTIPCOORD, NNCRD, RADIUS, KSTEP, KINC, TIME)
C
INCLUDE 'ABA_PARAM.INC'
C
DIMENSION TIME(2), COORDS(NNCRD), CRACKTIPCOORD(NNCRD)
user coding to define weight
RETURN
END 
```

# Variable to be defined

weight

A scalar weight function used to compute the average stress/strain at the crack tip.

# Variables passed in for information

JELNO

Element number.

<!-- source-page: 378 -->

# NPT

Integration point number.

# COORDS

An array containing the current coordinates of this integration point.

# CRACKTIPCOORDS

An array containing the current coordinates of the crack tip.

# NNCRD

Dimension of the model.

# RADIUS

Influence radius in which the elements are included for averaging.

# KSTEP

Step number.

# KINC

Increment number.

# TIME(1)

Value of step time at the beginning of the current increment.

# TIME(2)

Value of total time at the beginning of the current increment.

<!-- source-page: 379 -->

# 1.1.61 VOIDRI: User subroutine to define initial void ratios.

# Product: Abaqus/Standard

# References

• “Initial conditions in Abaqus/Standard and Abaqus/Explicit,” Section 34.2.1 of the Abaqus Analysis User’s Guide   
• “Coupled pore fluid diffusion and stress analysis,” Section 6.8.1 of the Abaqus Analysis User’s Guide   
• \*INITIAL CONDITIONS

# Overview

User subroutine VOIDRI:

• will be called to define initial void ratio values at material calculation points of continuum elements (see Part VI, “Elements,” of the Abaqus Analysis User’s Guide) in a porous medium whenever a user-defined initial condition on void ratio is specified; and   
• can be used to define initial void ratio values as functions of material point coordinates and/or element numbers.

# User subroutine interface

```txt
SUBROUTINE VOIDRI (EZERO, COORDS, NOEL)
C
INCLUDE 'ABA_PARAM.INC'
C
DIMENSION COORDS (3)
C
user coding to define EZERO
RETURN
END 
```

# Variable to be defined

# EZERO

Initial void ratio.

<!-- source-page: 380 -->

# Variables passed in for information

# COORDS

An array containing the current coordinates of this point.

# NOEL

Element number.
