Sti0806 - Userout
Sti0806 - Userout
Sti0806 - Userout
Sheldon Imaoka
Memo Number: STI0806B
ANSYS Release: 11.0
June 1, 2008
1 Introduction
There are various situations where a user may wish to define specific type
of output to postprocess — this can range from simple evaluation of safety
factors to more involved damage calculations. While APDL, the ANSYS
command language, allows users to manipulate results in any manner one
sees fit, user-programmable features (UPFs) also provide a means for users
to calculate specific output results efficiently at the solution level.
There are two UPFs that let users specify their own output calculations.
userou.F appends the NMISC record of supported elements — these results
can then be listed or plotted via element tables (ETABLE). The benefit of
userou.F is that many elements are supported, and postprocessing of ele-
ment table results is quite straightforward to perform. The drawbacks to
this method are that the number of NMISC records can be limited, depending
on the element type, and only a single value per element is usually output,
which provides less spatial variation than typical nodal quantities.
The alternative is the use of the undocumented userOut.F subroutine.
While this UPF is only applicable to 18x continuum elements — namely,
PLANE182-183, SOLID185-187, and SOLSH190 — quantities are stored as
state variables, so calculations are performed at the integration point level,
not per element as with userou.F. This means that the user can postprocess
averaged or unaveraged results directly with PLxSOL or PRxSOL commands.
Also, because state variables are used, values can be initialized with the
TBDATA command, and these values can be updated during the course of the
analysis. Because of the attractive qualities of userOut.F, this subroutine
will be the focus of the remainder of this memo despite the fact that it
1
Sheldon’s ansys.net Tips User Output Subroutine
3 Procedure
To incorporate the userOut.F subroutine, the user must perform the fol-
lowing actions:
• Define output quantities to be calculated as state variables in userOut.F.
Compile and link userOut.F to create a custom ANSYS executable.2
• Specify the frequency at which state variables will be saved via OUT-
RES,SVAR. Note that the default behavior is not to save any state
variable results.
2
Sheldon’s ansys.net Tips User Output Subroutine
takes the sign of the larger of the maximum and minimum principal stresses.
Based on an input stress ratio, the mean stress is determined, which is used
in conjunction with a user-defined ultimate strength to estimate the stress
amplitude using Goodman theory. Lastly, the biaxiality indication is cal-
culated — this is defined as the ratio of the principal stress with largest
magnitude divided by the next smaller value: a value of 1 reflects biaxial
stress state, a value of of 0 indicates unaxial stress state, while a value of
−1 is pure shear.
In Figure 1, one can see the biaxiality indication from both the ANSYS
Fatigue Module and the sample userOut.F subroutine, and one may notice
that the results compare favorably.3
1
NODAL SOLUTION
STEP=1
SUB =1
TIME=1
SVAR4
DMX =.276E-03
SMN =-.986456 -1
SMX =.94603
-.6
-.2
.2
.6
Y 1
Z X
The ANSYS Fatigue module contains many useful features to aid the
user interested in uniaxial fatigue theory. However, this demonstration sub-
routine may hopefully show that user-defined results can be calculated quite
easily with userOut.F in ANSYS for those wishing to implement their own
damage or fatigue calculations.
3
Because output from userOut.F at ANSYS 11.0 does not currently allow for linear
extrapolation, for comparison purposes, ERESX,NO was used for both models.
3
Sheldon’s ansys.net Tips User Output Subroutine
1 1
ELEMENT SOLUTION ELEMENT SOLUTION
STEP=1 STEP=1
SUB =89 SUB =89
TIME=1 TIME=1
SVAR8 SVAR7
DMX =.028156 DMX =.028156
SMX =.001905 SMN =-.001755
SMX =.697E-03
4
Sheldon’s ansys.net Tips User Output Subroutine
1 1
NODAL SOLUTION NODAL SOLUTION
STEP=2 STEP=3
SUB =122 SUB =113
TIME=2 TIME=3
SVAR11 SVAR11
DMX =2.194 DMX =1.925
SMN =1.112 SMN =.952682
SMX =1.289 SMX =1.13
1.112 1.151 1.191 1.23 1.269 .952682 .992022 1.031 1.071 1.11
1.132 1.171 1.21 1.25 1.289 .972352 1.012 1.051 1.09 1.13
Relative Density (based on total strain) Relative Density (based on total strain)
(a) Relative Density at Max Compression (b) Relative Density after Unloading
While these quantities could be calculated from element tables, the use
of state variables allows these quantities to be output directly, as well as
providing results at the integration points rather than element centroid.
5
Sheldon’s ansys.net Tips User Output Subroutine
7 Conclusion
Although one may also use the userou.F subroutine to store user-calculated
results as NMISC records, this memo introduced the undocumented userOut.F
subroutine to calculate results as state variables for 18x continuum elements.
Although there are many applications of user-defined output, simple exam-
ples of calculating fatigue-related quantities as well as volumetric and devia-
toric inelastic strains have been presented. Please note that the userOut.F
subroutine is undocumented and, hence, unsupported, and the provided
subroutines have not been extensively tested, so users are cautioned against
using these for any production purposes without validating the content
themselves; the supplied subroutines are only provided for demonstrative
purposes.
References
[1] Sheldon Imaoka. User Creep Subroutine. ansys.net Tips and Tricks,
http://ansys.net/collection/1061, October 2007.
• STI0806B (June 19, 2008): forgot to mention that this is currently (at
ANSYS 11.0) an undocumented feature, so users know that it is not
officially supported.
6
Sheldon’s ansys.net Tips General Information
Sheldon’s ansys.net Tips and Tricks are available at the following URL:
http://ansys.net/sheldon tips/
Please remember that, with each release of ANSYS, new features and tech-
niques may be introduced, so please refer to the ANSYS documentation as
well as your local ANSYS support office to verify that these tips are the
most up-to-date method of performing tasks.
Disclaimer: the author has made attempts to ensure that the informa-
tion contained in this memo is accurate. However, the author assumes no
liability for any use (or misuse) of the information presented in this docu-
ment or accompanying files. Please refer to ansys.net for the latest version
of this document. Also, this memo and any accompanying input files are
not official ANSYS, Inc. documentation.
ANSYS Training
The XANSYS mailing list is a forum for exchanging ideas, providing and
receiving assistance from other users, and general discussions related to
ANSYS and Workbench. (Note that it is recommended to contact your
local ANSYS support office for technical support.) You can obtain more
information by visiting the following URL: http://www.xansys.org/