12.1.3 Calculation of principal stresses and strains and their directions: FPRIN

Product: ABAQUS/Standard  

This example illustrates the use of a FORTRAN program to read stress and strain records from an ABAQUS results file and to calculate principal stress and strain values and their directions.

General description

This program shows how to retrieve integration point and nodal averaged stress and strain components from an ABAQUS results file and then compute principal values and directions using the ABAQUS utility routine SPRIND. Usage of this utility routine is documented in the input file provided for this problem, and further details about the interface to this subroutine are discussed in Obtaining stress invariants, principal stress/strain values and directions, and rotating tensors, Section 2.1.9 of the ABAQUS User Subroutines Reference Manual. The results file created by the FJOIN program in Joining data from multiple results files and converting file format: FJOIN, Section 12.1.2, is used here to verify that the records that have been put together are retrievable. The previously generated results file was named fjoinxxx.fin. To use it as an input file for postprocessing program FPRIN, the file extension must be changed. This program will assume that the results file has the default .fil extension, which corresponds to FORTRAN unit 8.

Programming details

The user should first review the general discussion on programming concepts and ABAQUS FORTRAN interfaces in User postprocessing of ABAQUS results files: overview, Section 12.1.1, and the detailed discussion of postprocessing given in Chapter 5, File Output Format,” of the ABAQUS Analysis User's Manual.

When running program FPRIN (this program is named fprin.f on the ABAQUS release media), the user will be prompted for the file name that initializes FNAME. Other variables, such as LOUTF, NRU, LRUNIT(1,NRU), and LRUNIT(2,NRU), are initialized inside the program. INITPF and DBRNU are then called to complete the neccesary initializations and file connections. Data processing starts with a double DO-loop over all the records to be read, one-by-one, via a call to DBFILE. Each record is identified by its record key, which is stored in the second entry of the record. When records 1922 and 2000 are processed by program FPRIN, the heading and the current step and increment numbers are written out so as to provide a way to recognize the beginning of data in each analysis. Record type 1 is then examined to determine the output location of stress and strain, the number of direct and shear stress and strain components, and either the element number or the node number for which the records are written. The stress and strain records (11 and 21, respectively) will be filtered out for processing by the ABAQUS utility routineSPRIND. When a stress or strain record is passed into SPRIND, principal stresses or strains and the corresponding principal directions are calculated and returned in an unsorted order.

Program compilation and linking

Before program execution, the FORTRAN program has to be compiled and linked. Both operations, as well as the inclusion of the aba_param.inc file, are performed by a single execution of the abaqus make utility:

abaqus make job=fprin
This may have to be repeated until all FORTRAN errors are corrected. After successful compilation, the program's object code is automatically linked with the ABAQUS object codes stored in the shared program library and interface library in order to build the executable program. Refer to Chapter 4, Customizing the ABAQUS environment,” of the ABAQUS Installation and Licensing Guide to see which compile and link commands are used for a particular computer.

Program execution

Before the program is executed, a results file must have been created. In this example the results file fjoinxxx.fin created by the FJOIN program discussed in Joining data from multiple results files and converting file format: FJOIN, Section 12.1.2, is used. This file must be renamed to fjoinxxx.fil since FORTRAN unit 8 (which is associated with the .fil file extension) is used in the program to read the file. When the program is executed using the command abaqus fprin, the prompt

Enter the name of the input file (w/o .fil):
will appear. Enter fjoinxxx to define FNAME. The program processes the data and produces a file named pvalue.dat, which contains information about principal stresses and strains and their directions.

Results and discussion

The computed principal stress and strain values and their directions are tabulated below.

Analysis FilePrincipal ComponentStress × 105Strain × 10–3Dir-1Dir-2Dir-3
fjoin002.inp110.71425.01.00.00.0
210.71425.00.01.00.0
30.00.00.00.01.0
fjoin003.inp1–2.8846–12.50.707–0.7070.0
22.884612.50.7070.7070.0
30.00.00.00.01.0
fjoin004.inp10.0–7.51.00.00.0
27.525.00.01.00.0
30.00.00.00.01.0

Input file

fprin.f

Postprocessing program.