Products: ABAQUS/Standard ABAQUS/Explicit
The ABAQUS results (.fil) file can be accessed with the utility routines described in this section. Access is subsequent to an analysis by a user-written postprocessing program or, in ABAQUS/Standard, from within an analysis by user subroutine URDFIL.
The following utility subroutines are available:
DBFILE (read from a file)
DBFILW (write to a file)
DBRNU (set a unit number for a file)
INITPF (initialize a file)
POSFIL (determine position in a file; available only in ABAQUS/Standard)
Only the subroutines DBFILE and POSFIL can be called from user subroutine URDFIL.
A flag, which you must set before calling DBFILE, indicating the operation. Set LOP=0 to read the next record in the file; set LOP=2 to rewind the file currently being read (for example, if it is necessary to read the file more than once, it must be rewound since it is a sequential file). If LOP=2 is used, the file must first be read to the end, and it should be rewound only when the end-of-file is reached.
The array containing one record from the file, in the format described in Results file output format, Section 5.1.2. When LOP=0, this array will be filled by the data management routines with the contents of the next record in the file as each call to DBFILE is executed. ARRAY must be dimensioned adequately in your routines to contain the largest record in the file. For almost all cases 500 words is sufficient. The exceptions arise if the problem definition includes user elements or user materials that use more than this many state variables or if substructures with a large number of retained degrees of freedom are used (see Using substructures, Section 10.1.1, for more details regarding substructures). When the results file has been written on a system on which ABAQUS runs in double precision, ARRAY must be declared double precision in your routine.
Returned as nonzero if an end-of-file marker is read when DBFILE is called with LOP=0.
The array containing one record to be written to the file, in the format described in Results file output format, Section 5.1.2.
Return code (0 – record written successfully, 1 – record not written).
Not currently used.
A character string defining the root file name (that is, the name without an extension) of the files being read or written. FNAME must be declared as CHARACTER*80 and can include the directory specification as well as the root file name. The extension of each individual file is defined by the LRUNIT array below. See the discussion below for file naming conventions.
An integer giving the number of results files that the postprocessing program will read. Normally only one results file is read, but sometimes it is necessary to read several results files—for example, to merge them into a single file.
An integer array that must be dimensioned LRUNIT(2,NRU) in the postprocessing program and must contain the following data before INITPF is called:
LRUNIT(1,K1) is the FORTRAN unit number on which the K1th results file will be read. Valid unit numbers are 8 to read the .fil file, 15–18, or numbers greater than 100. All other units are reserved by ABAQUS. See below for naming conventions based on the unit numbers.
LRUNIT(2,K1) is an integer that must be set to 2 if the K1th results file was written as a binary file or set to 1 if the K1th results file was written in ASCII format.
Needs to be defined only if the program that is making the call to INITPF will also write an output file in the ABAQUS results file format (for example, if results files are being merged into a single results file or if a results file is being converted from binary to ASCII format). In that case LOUTF should be set to 2 if the output file is to be written as a binary file or set to 1 if the output file is to be written as an ASCII file. This results file will be written with the file name extension .fin. See Accessing the results file information, Section 5.1.3, for a discussion of writing results files; see below for information on the naming of this file.
The file extension is derived from the value of LRUNIT(1,K1). If LRUNIT(1,K1) is 8, the file name will be constructed with the extension fil. Any other unit number will result in a file extension of 0nn, where nn is the number assigned to LRUNIT(1,K1). For example, if LRUNIT(1,K1) is 15, the file extension is .015. If an output file has been indicated by a nonzero value of LOUTF, its extension will be .fin.
For example, to read a file xxxx.fil, set LRUNIT(1,K1) to 8 and the character variable FNAME to xxxx using assignment or data statements. If desired, FNAME can include a directory specification, device name, or path. Operating system environment and shell variables will not be translated properly and, therefore, should not be used.
All error messages generated by ABAQUS are written to FORTRAN unit 6. On most machines error messages will be printed by default directly to the screen if the program is run interactively. You can include an open statement for unit 6 in the main program to redirect messages to a file. If you wish to read or write to units other than those units specified in LRUNIT, OPEN statements for those units may have to be included in the program (depending upon the computer being used). Unit numbers of such auxiliary files should be greater than 100 to avoid any conflict with ABAQUS internal files.
The POSFIL utility routine is available only in ABAQUS/Standard.
Desired step. If this variable is set to 0, the first available step will be read.
Desired increment. If this variable is set to 0, the first available increment of the specified step will be read.
Real array containing the values of record 2000 from the results file for the requested step and increment.
Return code (0 – specified increment found, 1 – specified increment not found). If the step and increment requested are not found in the results file, POSFIL will return an error and leave you positioned at the end of the results file.
You may find it convenient to call POSFIL with both NSTEP and NINC set to 0 to skip over the information that is written to the results file at the beginning of an analysis (see Results file output format, Section 5.1.2) and, thus, start reading from the first increment written to the file.
POSFIL cannot be used to move backward in the results file: you cannot use POSFIL to find a given increment in the file and then make a second call to POSFIL later to read an increment earlier than the first one found. If this is attempted, POSFIL will return an error indicating that the requested increment was not found.