Products: ABAQUS/Standard ABAQUS/Explicit
The ABAQUS results (.fil) file is written using internal data management routines to minimize I/O cost. A postprocessing program must use these same ABAQUS data management routines to read the results file. The following utility routines must be called to obtain data from the ABAQUS results file:
INITPF
DBRNU
DBFILE
POSFIL
INITPF
DBFILW
To read both floating point and integer variables in the records, the following coding can be used in the postprocessing program:
INCLUDE 'aba_param.inc' DIMENSION ARRAY(513), JRRAY(NPRECD,513) EQUIVALENCE (ARRAY(1),JRRAY(1,1))With this technique, for example, the record key is available after each call to DBFILE with LOP=0 as
KEY = JRRAY (1,2)The use of aba_param.inc eliminates the need to have different versions of the code for single and double precision. The file aba_param.inc defines an appropriate IMPLICIT REAL statement and sets the value of NPRECD to 1 or 2, depending upon whether the machine uses single or double precision. The file aba_param.inc is referenced from the site subdirectory of the ABAQUS installation when the postprocessing program is compiled and linked using ABAQUS/Make (explained below).
The postprocessing program must be linked using the make parameter when running the ABAQUS execution procedure (see Execution procedure for ABAQUS/Make, Section 3.2.13). To link properly, the postprocessing program cannot contain a FORTRAN PROGRAM statement. Instead, the program must begin with a FORTRAN SUBROUTINE with the name ABQMAIN.
Compiling, linking, and running a postprocessing program consists of two steps. For example, if the name of the postprocessing program is postproc.f, use the following command to compile and link postproc.f:
abaqus make job=postprocThe program must then be run using the command:
abaqus postproc
Subroutine INITPF must be called before any results file is accessed. This subroutine contains FORTRAN OPEN statements for all FORTRAN units assigned to results files through the call to INITPF; therefore, your code must not contain any OPEN statements for these units. ABAQUS constructs a file name for a given unit based on information supplied as LRUNIT(1,K1) and FNAME, as discussed in Utility routines for accessing the results file, Section 5.1.4.
Subroutine DBRNU must also be called before reading the first results file and then again each time you need to change to reading another results file. This subroutine simply establishes the FORTRAN unit number of the results file being read; no information is returned. DBRNU can be called before or after INITPF but must be called before DBFILE.
Subroutine DBFILE is used to read each record from the results file. This subroutine will return one record at a time in the format described in Results file output format, Section 5.1.2.
The following program reads all the von Mises stresses in the results file and obtains the maximum value. Then, it prints this value along with the element, section point, and integration point numbers where it occurred.
In this example FORTRAN unit 8 is used to read the results file, and the name of the results file is assumed to be TEST.fil. The results file is assumed to be a binary file, and only one results file will be read. Thus, LRUNIT is dimensioned as LRUNIT(2,1); and in the call to the INITPF routine NRU is set to 1, LRUNIT(1,1) is set to 8, and LRUNIT(2,1) is set to 2. A new results file will not be written, so LOUTF is set to zero.
SUBROUTINE ABQMAIN C Calculate the maximum von Mises stress and its location C INCLUDE 'aba_param.inc' CHARACTER*80 FNAME DIMENSION ARRAY(513),JRRAY(NPRECD,513),LRUNIT(2,1) EQUIVALENCE (ARRAY(1),JRRAY(1,1)) C C File initialization C FNAME='TEST' NRU=1 LRUNIT(1,1)=8 LRUNIT(2,1)=2 LOUTF=0 CALL INITPF(FNAME,NRU,LRUNIT,LOUTF) JUNIT=8 CALL DBRNU(JUNIT) C C Loop on all records in results file C STRESS=0. DO 100 K1=1,99999 C CALL DBFILE(0,ARRAY,JRCD) IF(JRCD.NE.0)GO TO 110 KEY=JRRAY(1,2) C IF(KEY.EQ.1) THEN C C Element header record: C extract element, sec pt, int pt numbers C JEL=JRRAY(1,3) JPNT=JRRAY(1,4) JSPNT=JRRAY(1,5) C C Stress invariant record for ABAQUS/Standard ELSE IF(KEY.EQ.12)THEN C Stress invariant record for ABAQUS/Explicit ELSE IF(KEY.EQ.75)THEN C C Extract von Mises stress C IF(ARRAY(3).GT.STRESS)THEN STRESS=ARRAY(3) KEL=JEL KPNT=JPNT KSPNT=JSPNT END IF C END IF C 100 CONTINUE 110 CONTINUE C WRITE(6,120) KEL,KPNT,KSPNT,STRESS 120 FORMAT(5X,'ELEMENT',I5,5X,'POINT',I4,5X,'SECTION POINT', 1 I4,5X,'STRESS',1PG12.3) STOP ENDSee Chapter 12, Postprocessing of ABAQUS Results Files,” of the ABAQUS Example Problems Manual for additional examples.
Subroutine DBFILW can be used to write a file in the format of the ABAQUS results file to modify the file information or to add additional information before postprocessing. Subroutine INITPF must be called before DBFILW.
The file will be written to FORTRAN unit 9 with the extension .fin. Unit 9 is opened by ABAQUS when DBFILW is first called; your coding must not open or redefine unit 9, but you must ensure that FORTRAN unit 9 is saved following the job.
Joining data from multiple results files and converting file format: FJOIN, Section 12.1.2 of the ABAQUS Example Problems Manual, contains an example of the use of subroutine DBFILW to merge specific records of discontinuous results files. Continuous results files are required for postprocessing purposes; if you have written a results file during an analysis and a new results file on the restart of the analysis without making the files continuous, they must be made continuous before postprocessing. Analysis of a cantilever subject to earthquake motion, Section 1.4.13 of the ABAQUS Benchmarks Manual, also shows the use of DBFILW for merging results files. Alternatively, results files can be merged using the ABAQUS/Append execution procedure as described in Execution procedure for joining results (.fil) files, Section 3.2.10.
The DBFILW subroutine can also be used to convert the ABAQUS results file from binary to ASCII format to transfer it from one computer system to another. Alternatively, this conversion can be done automatically by using the abaqus ascfil execution procedure, as described in Execution procedure for ASCII translation of results (.fil) files, Section 3.2.9.