General Utility Routines
The following utility routines are available for use in coding user subroutines in Abaqus:
-
GETENVVAR or VGETENVVAR can be called from any Abaqus/Standard or Abaqus/Explicit user subroutine, respectively, to obtain the value of an environment variable (Obtaining Abaqus Environment Variables).
-
GETJOBNAME or VGETJOBNAME can be called from any Abaqus/Standard or Abaqus/Explicit user subroutine, respectively, to obtain the name of the current analysis job (Obtaining the Abaqus Job Name).
-
GETOUTDIR or VGETOUTDIR can be called from any Abaqus/Standard or Abaqus/Explicit user subroutine, respectively, to obtain the name of the directory where analysis job output is being placed (Obtaining the Abaqus Output Directory Name).
-
GETNUMCPUS can be called from any Abaqus/Standard user subroutine to obtain the number of MPI processes; VGETNUMCPUS can be called from any Abaqus/Explicit user subroutine in a domain-parallel run to obtain the number of processes used for the parallel run (Obtaining Parallel Processes Information).
-
GETRANK can be called from any Abaqus/Standard user subroutine to obtain the rank of the MPI process from which the function is called; VGETRANK can be called from any Abaqus/Explicit user subroutine in a domain-parallel run to obtain the individual process rank (Obtaining Parallel Processes Information).
-
GETNUMTHREADS can be called from any Abaqus user subroutine to obtain the number of threads in a process (Obtaining Parallel Processes Information).
-
get_thread_id can be called from any Abaqus user subroutine to retrieve the ID that Abaqus assigned to that thread (Obtaining Parallel Processes Information).
- GETCOMMUNICATOR and get_communicator can be called from any Abaqus user subroutine to return a communicator that Abaqus defines for its worker processes (Obtaining Parallel Processes Information).
-
GETPARTINFO or VGETPARTINFO can be called from any Abaqus/Standard or Abaqus/Explicit user subroutine, respectively, to retrieve the part instance name and local node or element number corresponding to an internal node or element number. GETINTERNAL or VGETINTERNAL can be called from any Abaqus/Standard or Abaqus/Explicit user subroutine, respectively, to retrieve the internal node or element number corresponding to a given part instance name and local number (Obtaining Part Information.)
- GETPHYSICALCONSTANT can be called from any Abaqus/Standard user subroutine to obtain values of physical constants defined in an Abaqus/Standard analysis.
-
GETVRM provides access to material point information for Abaqus/Standard user subroutines UVARM, UDMGINI, or USDFLD (Obtaining Material Point Information in an Abaqus/Standard Analysis).
-
VGETVRM provides access to selected output variables at material points for Abaqus/Explicit user subroutine VUSDFLD (Obtaining Material Point Information in an Abaqus/Explicit Analysis).
-
GETVRMAVGATNODE provides access to material point information, extrapolated to and averaged at a node, for Abaqus/Standard user subroutine UMESHMOTION (Obtaining Material Point Information Averaged at a Node).
-
GETVRN provides access to node point information for Abaqus/Standard user subroutine UMESHMOTION (Obtaining Node Point Information).
-
GETNODETOELEMCONN can be called from user subroutine UMESHMOTION to retrieve a list of elements connected to a specific node. This element list can then be used with utility routine GETVRMAVGATNODE (Obtaining Node to Element Connectivity).
-
SINV determines the first and second stress invariants for a given stress tensor in Abaqus/Standard (Obtaining Stress Invariants, Principal Stress/Strain Values and Directions, and Rotating Tensors in an Abaqus/Standard Analysis).
-
SPRINC or VSPRINC determines the principal values for a given stress or strain tensor in Abaqus/Standard or Abaqus/Explicit, respectively (Obtaining Stress Invariants, Principal Stress/Strain Values and Directions, and Rotating Tensors in an Abaqus/Standard Analysis and Obtaining Principal Stress/Strain Values and Directions in an Abaqus/Explicit Analysis).
-
SPRIND or VSPRIND determines both the principal values and principal directions for a given stress or strain tensor in Abaqus/Standard or Abaqus/Explicit, respectively (Obtaining Stress Invariants, Principal Stress/Strain Values and Directions, and Rotating Tensors in an Abaqus/Standard Analysis and Obtaining Principal Stress/Strain Values and Directions in an Abaqus/Explicit Analysis).
-
ROTSIG can be called from Abaqus/Standard user subroutine UMAT to perform the rotation of tensors when large-strain calculations are performed (Obtaining Stress Invariants, Principal Stress/Strain Values and Directions, and Rotating Tensors in an Abaqus/Standard Analysis).
-
GETWAVE determines wave kinematic data associated with the applied wave theory in an Abaqus/Aqua analysis (Obtaining Wave Kinematic Data in an Abaqus/Aqua Analysis).
-
GETWAVEVEL, GETWINDVEL, and GETCURRVEL are used to obtain the wave, wind, and steady current velocity components, respectively, for a given point in an Abaqus/Aqua analysis (Obtaining Wave Kinematic Data in an Abaqus/Aqua Analysis).
-
STDB_ABQERR or XPLB_ABQERR can be called from any Abaqus/Standard or Abaqus/Explicit user subroutine, respectively, to print an informational, warning, or error message to the message file in Abaqus/Standard or the status file in Abaqus/Explicit (Printing Messages to the Message or Status File).
-
XIT or XPLB_EXIT can be called from any Abaqus/Standard or Abaqus/Explicit user subroutine, respectively, to terminate an analysis (Terminating an Analysis).
-
IGETSENSORID or IVGETSENSORID can be called from Abaqus/Standard user subroutine UAMP or Abaqus/Explicit user subroutine VUAMP, respectively, to obtain the ID of a user-defined sensor. GETSENSORVALUE or VGETSENSORVALUE can be called from Abaqus/Standard user subroutine UAMP or Abaqus/Explicit user subroutine VUAMP, respectively, to obtain the value of a user-defined sensor (Obtaining Sensor Information).
-
MATERIAL_LIB_MECH can be called from Abaqus/Standard user subroutine UELMAT to access the Abaqus material library (Accessing Abaqus Materials).
-
MATERIAL_LIB_HT can be called from Abaqus/Standard user subroutine UELMAT to access the Abaqus thermal material library (Accessing Abaqus Thermal Materials).
-
setTableCollection, getParameterTable, getParameterTableRow, getPropertyTable, vGetPropertyTable, vGetPropertyTablePtr, queryTableCollectionSize, queryTableCollectionNames, queryTableCollection, queryParameterTable, and queryPropertyTable can be used to activate the table collection and access data from parameter tables and interpolate data that were defined in property tables (Accessing Abaqus Table Collections).
-
getEventSeriesSliceProperties, getEventSeriesSliceLG, and getEventSeriesSliceLGLocationPath can be used to access event series data from Abaqus/Standard user subroutines (Accessing Abaqus Event Series Data).
-
MutexInit, MutexLock, and MutexUnlock can be used to create and manipulate mutexes (Ensuring Thread Safety).
-
Dynamically allocatable arrays can be used to accumulate and store data. All basic types are supported. In addition, Abaqus provides arrays of type
Real
that change precision automatically (Allocatable Arrays).-
Real arrays will run in single precision when Abaqus/Explicit runs in single precision and will run in double precision when Abaqus/Explicit runs in double precision.
-
Arrays of structures can be used to store data of any user-defined type, including Fortran and C/C++ structures and classes with arbitrary sizes and number of fields.
-
-
Thread-local arrays can be used to allocate storage local to a thread. SMALocalIntArrayCreate and SMALocalFloatArrayCreate can be used to create or resize a local array. SMALocalIntArrayAccess and SMALocalFloatArrayAccess can be used to locate an existing local array. SMALocalIntArrayDelete and SMALocalFloatArrayDelete can be used to delete a local array. SMALocalIntArraySize and SMALocalFloatArraySize can be used to get the size of the array (Allocatable Arrays).
-
Global arrays can also be used to allocate storage shared among all threads. SMAIntArrayCreate and SMAFloatArrayCreate can be used to create or resize a global array. SMAIntArrayAccess and SMAFloatArrayAccess can be used to locate an existing global array. SMAIntArrayDelete and SMAFloatArrayDelete can be used to delete a global array. SMAIntArraySize and SMAFloatArraySize can be used to get the size of the global array (Allocatable Arrays).
-
Utility routine SETALLUSER can be called from within Abaqus/Standard user subroutines used in heat transfer analyses to define a user value that is accumulated incrementally during the analysis (Setting a User-Defined Value).