URDFIL

User subroutine to read the results file.

User subroutine URDFIL:

  • can be used to access the results file during an analysis;

  • is called at the end of any increment in which new information is written to the results file;

  • must call the utility routine DBFILE to read records from the results file (see Utility Routines for Accessing the Results File);

  • can call the utility routine POSFIL to read from the results file starting at a specified step and increment as opposed to the beginning of the file, which would otherwise be done (see Utility Routines for Accessing the Results File);

  • can force an analysis to terminate upon completion of a call by means of the variable LSTOP;

  • allows the last increment written to the results file to be overwritten by means of the variable LOVRWRT; and

  • allows access to the complete results file in a restarted job if the new results file is being appended to the old results file (see the description of the execution option fil in Abaqus/Standard and Abaqus/Explicit Execution).

This page discusses:

User Subroutine Interface

      SUBROUTINE URDFIL(LSTOP,LOVRWRT,KSTEP,KINC,DTIME,TIME)
C
      INCLUDE 'ABA_PARAM.INC'
C
      DIMENSION ARRAY(513),JRRAY(NPRECD,513),TIME(2)
      EQUIVALENCE (ARRAY(1),JRRAY(1,1))

      user coding to read the results file

      RETURN
      END

Variables to Be Defined

In all cases
LSTOP

Flag to indicate whether an analysis should continue. The analysis will be terminated if LSTOP is set to 1. Otherwise, the analysis will continue.

LOVRWRT

Flag to indicate that the information written to the results file for the increment can be overwritten. If LOVRWRT is set to 1, information for the current increment will be overwritten by information written to the results file in a subsequent increment unless the current increment is the final increment written to the results file. The purpose of this flag is to reduce the size of the results file by allowing information for an increment to be overwritten by information for a subsequent increment.

DTIME

Time increment. This variable allows you to provide input to the automatic time incrementation algorithms in Abaqus (if automatic time incrementation is chosen). It is passed in as the value of the next time increment to be taken and can be updated to increase or reduce the time increment. If automatic time incrementation is not selected in the analysis procedure, updated values of DTIME are ignored.

Only if utility routine POSFIL is called
NSTEP

Desired step at which file reading will begin via utility routine DBFILE. If NSTEP is set to 0, the first available step will be read.

NINC

Desired increment at which file reading will begin via utility routine DBFILE. If NINC is set to 0, the first available increment of the specified step will be read.

Variables Passed in for Information

KSTEP

Step number.

KINC

Increment number.

TIME(1)

Value of the step time at the end of the increment.

TIME(2)

Value of the total time at the end of the increment.

Example: Terminating an Analysis upon Exceeding a Mises Stress Limit

The example below reads the values of Mises stress for the current increment from record 12 in the results file and terminates the analysis if any of the values of Mises stress written to the results file exceed 2.09 × 108. Here, POSFIL is used to position you to read from the current increment.

      SUBROUTINE URDFIL(LSTOP,LOVRWRT,KSTEP,KINC,DTIME,TIME)
C
      INCLUDE 'ABA_PARAM.INC'
C
      DIMENSION ARRAY(513),JRRAY(NPRECD,513),TIME(2)
      EQUIVALENCE (ARRAY(1),JRRAY(1,1))
      PARAMETER(TOL=2.09D8)
C
C FIND CURRENT INCREMENT.
C
      CALL POSFIL(KSTEP,KINC,ARRAY,JRCD)
      DO K1=1,999999
         CALL DBFILE(0,ARRAY,JRCD)
         IF (JRCD .NE. 0) GO TO 110
         KEY=JRRAY(1,2)
C
C RECORD 12 CONTAINS VALUES FOR SINV
C
         IF (KEY.EQ.12) THEN
            IF (ARRAY(3).GT.TOL) THEN
               LSTOP=1
               GO TO 110
            END IF
         END IF
      END DO
 110  CONTINUE
C
      RETURN
      END

Example: Terminating an Analysis When the Maximum Mises Stress Value Stops Increasing

This example demonstrates the use of URDFIL and POSFIL to stop an analysis when the maximum value of Mises stress in the model does not increase from one increment in the results file to the next. A data statement is used to save the maximum Mises stress value from the last increment. LOVRWRT is also used in this case to overwrite an increment in the results file once it has been read in URDFIL.

The subroutine shown below must be modified to define the maximum Mises stress in the data statement each time a job is restarted. This can be avoided by removing the LOVRWRT=1 statement and recoding the routine to read both the previous and the current increment to check that the Mises stress increases from one increment to the next (in this case you must correctly handle the first increment written to the results file as there will be no previous increment). The results file must also be properly appended on restart if you wish to compare the values of Mises stress between the first increment of a restart and the final increment of the job being restarted. This approach has the disadvantage that the results file may become quite large, as no information in the file will be overwritten.

      SUBROUTINE URDFIL(LSTOP,LOVRWRT,KSTEP,KINC,DTIME,TIME)
C
      INCLUDE 'ABA_PARAM.INC'
C
      DIMENSION ARRAY(513),JRRAY(NPRECD,513),TIME(2)
      EQUIVALENCE (ARRAY(1),JRRAY(1,1))
C
C INITIALIZE THE OLD MAXIMUM. FOR A JOB THAT IS BEING RESTARTED
C THIS VALUE SHOULD BE SET TO THE MAXIMUM MISES STRESS IN THE
C ORIGINAL ANALYSIS.
C
      DATA OLDMAX/-1.D0/
C
      CURRMAX = 0.D0
C
C FIND CURRENT INCREMENT.
C
      CALL POSFIL(KSTEP,KINC,ARRAY,JRCD)
C
C SEARCH FOR THE HIGHEST VALUE OF MISES STRESS
C AND STORE THIS IN CURRMAX
C
      DO K1=1,999999
         CALL DBFILE(0,ARRAY,JRCD)
         IF (JRCD.NE.0) GO TO 110
         KEY=JRRAY(1,2)
         IF (KEY.EQ.12) THEN
            IF (ARRAY(3).GT.CURRMAX) CURRMAX=ARRAY(3)
         END IF
      END DO
 110  CONTINUE
C
C COMPLETED READING OF CURRENT INCREMENT. NOW CHECK TO
C SEE IF VALUE OF MISES STRESS HAS INCREASED SINCE 
C LAST INCREMENT
C
      IF (CURRMAX.LE.OLDMAX) LSTOP=1
      OLDMAX=CURRMAX
      LOVRWRT=1
C
      RETURN
      END