Skip to main content

DISP.FOR (ABAQUS). Issues with advancement above KSTEP = 1

Submitted by Timothy E. Kendon on

Hi

I am trying to use the user-defined subroutine functionality in ABAQUS 6.11. I have set up a simple test case of an object (cube) being displaced harmonically in time (DISP.FOR, Standard Implicit). The subroutine DISP.FOR is shown at the end of the post.

It appears that my subroutine is compiled, linked and called during executation, as I have manage to create the "fortranlog.txt" file (created by DISP.FOR). The problem is that it the routine seems stuck in an eternal loop and never advances above KSTEP=1. My fortran log file contains the following 3 lines repeated again and again :(

 HELLO FROM SUBROUTINE!  1.000000000000000E-007  6.283180236816403E-007            1      1

 HELLO FROM SUBROUTINE!  1.000000000000000E-007  0.000000000000000E+000           2      1

 HELLO FROM SUBROUTINE!  1.000000000000000E-007  0.000000000000000E+000           3      1

Any ideas as to the issue? One additional piece of information. In order to get the subroutine called in the first place, I noticed that in the ABAQUS CAE I had to both i) select that I wanted to use a UDF, and ii) had to click on U1, U2, U3 and enter a value. I entered the values (1,0,0) for (U1,U2,U3). However perhaps there is a conflict here with what the UDF DISP.FOR? I thought these were simply dummy values

Anyway subroutine is below. Appreciate any help!

      SUBROUTINE DISP(U,KSTEP,KINC,TIME,NODE,NOEL,JDOF,COORDS)

      INCLUDE 'ABA_PARAM.INC'

      DIMENSION U(3),TIME(2),COORDS(3)

      IF (KSTEP .EQ. 1) THEN

         OPEN(57,FILE='C:\Appl\SIMULIA\Temp\fortranlog.txt',

     &        POSITION='APPEND',status='UNKNOWN')

      END IF

      PI=3.14159

      PERIOD = 10.              ! [T]

      OMEGA  = 2.*PI / PERIOD

      AMP    = 10.              ! [L]

      ! U(1) = displacement; U(2) = velocity; U(3) = acceleration

      ! JDOF = jth degree of freedom

      IF (JDOF.EQ.1) THEN

         U(1)= AMP*SIN(OMEGA*TIME(1))

      END IF

      WRITE(57,*) 'HELLO FROM SUBROUTINE!', TIME(1), U(1), JDOF, KSTEP

      RETURN

      END SUBROUTINE DISP

Hi again

Some additional information. It seems that I managed to get it work in the end, however I am not 100% sure what the issue was. To get it to work

 1. I Removed the fortran write and open from subroutine file

 2. I defined the functions U(2) and U(3) in accordance with simple differentiation of U(1)

 3. I specified on U(1) in abaqus CAE Boundary condition option.

It is of course possible to find out which of the above changes made the difference, by a simple process of elimination. Logic dictates that U(2) and U(3) should be important to specify, but on the other hand, ABAQUS could use a simple Euler scheme to compute these terms (although the first step would have issues for U(3)).

Best

Mon, 11/12/2012 - 15:37 Permalink

I can see that in your subroutine, you're not closing the output data file (fortranlog.txt). Just close this file before the return statement and see. Also, yes you do need to fill out acceleration and velocity (just to be in the safer side, and to make your routine more complete).

If your original subroutine works with close statement, then I have the explanation for what was happening :)

------

The world started with 0, is progressing with 0, but doesn't want 0.

Mon, 11/12/2012 - 17:36 Permalink

13.2.1 USER SUBROUTINES: OVERVIEW

Testing and debugging

When developing user subroutines, test them thoroughly on smaller examples in which the user

subroutine is the only complicated aspect of the model before attempting to use them in production

analysis work.

If needed, debug output can be written to the ABAQUS/Standard message (.msg) file using

FORTRAN unit 7 or to the ABAQUS/Standard data (.dat) file or the ABAQUS/Explicit status (.sta)

file using FORTRAN unit 6; these units should not be opened by your routines since they are already

opened by ABAQUS.

FORTRAN units 15 through 18 or units greater than 100 can be used to read or write other userspecified

information. The use of other FORTRAN units may interfere with ABAQUS file operations;

see “FORTRAN unit numbers used by ABAQUS,” Section 3.6.1. You must open these FORTRAN units;

and because of the use of scratch directories, the full pathname for the file must be used in the OPEN

statement



also:

3.6.1 FORTRAN UNIT NUMBERS USED BY Abaqus

Abaqus uses the FORTRAN unit numbers outlined in the table below. Unless noted otherwise, you should not try to write to these FORTRAN units from user subroutines.

For Abaqus/Standard, you should specify unit numbers 15–18 or unit numbers greater than 100 .

For Abaqus/Explicit, specify units 16–18 or unit numbers greater than 100 ending in 5 to 9, e.g. 105, 268, etc. You cannot write to the.sta file.

You forgot to close the file. It is presumably open exclusively in step 1

Here is an example:

IF (condition fulfilled) THEN

open(15,file='Exp.rpl',position='append')

write(15,*) TIME(2), RPL

close(15)

END IF

------------------------------------------
Ruhr-University
Bochum
Germany

Tue, 11/13/2012 - 15:16 Permalink