## 3.8. Timing of Calls to User Subroutines

Depending upon the user subroutine, the routine may be called once per problem (for example, EXLOAD), once per specified cycle (for example, EXEDIT), or many times for each cycle and each cell. It is important to understand this calling sequence if you are to be successful in implementing your user subroutines. The calling sequence of the user subroutines may be classified according to type, as outlined in the table below:

Table 3.1: User Subroutine Calling Sequence Types

Type | Timing of calls
--- | ---
1 | Called once, each time a Load or Save is requested
2 | Called at each user specified cycle
3 | Called for user specified material, each cell, each cycle
4 | Called for particular boundary conditions, each cell on boundary, each cycle
5 | Called for each cell, each cycle
6 | Called for each fill (initialization) region, during problem set-up
7 | Called for each EXZONE menu selection: Part/Zoning/Import

For Types 3-7, a current Part (NSUB) is defined, such that variables may be directly referenced through their array name and index (for example, UXN(IJK)). For other types, the user is advised to use the Autodyn utility functions to obtain variables.

The table below provides a description of when the major user subroutines are called.

Table 3.2: User Subroutine Calling Sequence Descriptions

Name | Description | Calling sequence type
--- | --- | ---
SOLVE_EOS_USER_1 | Custom equation of state | 3 – called when EOS specified as user, each cell, each cycle.
SOLVE_STR_USER_1 | Custom strength model | 5 – called for strength models specified as user, each cell, each cycle. Also, called for all other strength models (except None), after standard calculation of yield stress, to allow for further modification of yield stress. Note: For shell elements, called once for each sublayer, for each cell, for each cycle.
SOLVE_FAI_USER_1 | Custom failure criteria | 5 – called when failure model specified as user, each cell, each cycle Also, called for all other failure models (except None), after standard checks for failure, to allow for further modification of failure criteria. Note: For shell elements, called once for each sublayer, for each cell, for each cycle.
SOLVE_ERO_USER_1 | Custom erosion criteria | 3 – called when erosion model specified as user, each cell, each cycle.
EXBULK | Custom bulk modulus for a linear, polynomial, and P-α EOS | 5 – always called for linear, polynomial, and P-α EOS, each cell, each cycle. No other user specification required. Note: For shell elements, called once for each sublayer, for each cell, for each cycle.
EXCOMP | Custom porous compaction curve, P-α equation of state | 3 – called when compaction curve specified with P-α EOS is user, each cell, each cycle.
EXCRCK | Custom tensile crack softening rate | 3 – always called when crack softening specified (Gf≠0.0), each cell, each cycle. No other user specification required.
EXDAM | Custom damage parameter | 3 – always called for brittle damage and Johnson-Holmquist failure models, each cell, each cycle. No other user specification required.
EXEDIT | Custom edits | 2 – called at the end of cycle, as specified under Global /Edit/User.
EXFLOW | Custom Euler flow boundary | 4 – always called for flow in, and flow out with reverse boundary conditions, for each associated boundary cell, each cycle. No other user specification required.
EXLOAD | Loading additional, non-standard data from SAVE files | 1 – always called when Load is selected, after standard loading completed. No other user specification required.
EXORTHO_AXES | Custom initial orthotropic material axes | 6 – always called when performing initialization. No other user specification required.
EXPLRN | Custom plastic return algorithm | 5 – each cell, each cycle, No other user specification required.
EXPOR | Custom variable polygon porosity | 4 – always called for each Euler-Lagrange polygon, each cycle. No other user specification required.
EXSAVE | Saving additional, non-standard data to SAVE files | 2 – called for every Save, through execution of Save command, or specification of Save Edits. No other user specification required.
EXSHR | Custom shear modulus | 5 – always called, each cycle, for every non-hydro strength model cell, all materials. No other user specification required. Note: For shell elements, called once for each sublayer, for each cell, for each cycle.
EXSIE | Custom energy deposition | 5 – always called, each cycle, for every cell, all materials. No other user specification required.
EXSTIF | Custom stiffness matrix, orthotropic-elastic with failure | 3 – called when orthotropic EOS and a strength model specified, each cell, each cycle. Note: For shell elements, called once for each sublayer, for each cell, for each cycle.
EXSTR | Custom stress boundary condition | 4 – called when stress boundary condition specified as user, for each associated boundary cell, each cycle.
EXTAB | Custom tabulated saturation curve for two-phase EOS | 3 – called when two-phase EOS model is specified as user, each cell, each cycle.
EXVAL | Custom initial conditions | 6 – always called when performing a fill initialization, during problem Create/Modify. No other user specification required.
EXVEL | Custom velocity boundary condition | 4 – called when velocity boundary condition specified as user, for each associated boundary cell, each cycle.
EXZONE | Custom nodal coordinates | 7 – called each time EXZONE menu selection is made.

Note: In situations where the extra subroutine is always called, with no user specification required, the default dummy subroutines are programmed to have no effect.

Release 18.2 - © ANSYS, Inc. All rights reserved.