Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IRstuff on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

ABAQUS DISP SUBROUTINE IN FORTRAN

Status
Not open for further replies.

SavanGowda

Mechanical
Aug 13, 2015
8
Hi again!!

I have tried to code the fortran file and I don't know what is wrong with the file exactly. Below is my code

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



INCLUDE 'ABA_PARAM.INC'

INTEGER,PARAMETER::iwp=SELECTED_REAL_KIND(15)

REAL(iwp),INTENT(OUT)::U(1)



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



REAL,DIMENSION(1:304,1:3)::A ! Matrix with dimension 304 x 3

REAL :: x, y, z

!COMPLEX,DIMENSION(1:304)::E

INTEGER :: i,j,k



OPEN(UNIT = 1, FILE = "Pressure_SAVAN_100Hz.txt",

1 FORM = "FORMATTED", STATUS = "OLD", ACTION = "READ") !text file which is a 304 x 3 Matrix



DO i=1,UBOUND(A,1)

READ(UNIT=7, FMT=*)x,y,z

DO k=1, UBOUND(A,1)

A(i,1) = x

A(i,2) = y !real part of the value

A(i,3) = z !complex part of the value

!E(i) = CMPLX(y,z)

ENDDO

ENDDO



DO j = 1, UBOUND(A,1)

IF (NODE.EQ.A(j,1)) THEN



IF(JDOF.EQ.1) THEN

U(j) = A(j,2)

ENDIF

ENDIF

ENDDO



END



My text file looks something like this:

1,0.020141,3.1217

2,0.096111,3.1203

3,0.23753,3.1128

4,0.45527,3.0884

5,0.75772,3.0285

6,1.1475,2.9033

7,1.6152,2.6715

The program is not going further with the iteration! I am stuck with this from past 2 weeks!. Any help is appreciated!!

Thanks in advance

Kind Regards

Savan
 
Replies continue below

Recommended for you

Hi,

First thought what can be wrong with your subroutine.
You must not use UNIT=1. Some of units are already used by Abaqus.
See Abaqus documentation: Abaqus Analysis User's Manual , 3.7.1 FORTRAN unit numbers used by Abaqus

Second thought, you opened UNIT=1 but you read UNIT=7).

Regards,
Bartosz

VIM filetype plugin for Abaqus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor