User login

You are here

Abaqus DISP Subroutine

SavanRGowda's picture

Hi everyone!! 

I am a student studying in Hamburg University of Technology. I am currently doing my thesis and want some help in finishing it. I am finding it a bit difficult to do subroutine in Fortran as I am new to it. I have tried learning from Abaqus Documentation but I didn't get answer to my needs. 

I already have a text file that contains Nodes, X,Y,Z coordinates and the displacement values to be assigned. 
For Example: Nodes  X_coord  Y_coord  Z_coord  U 
                      1       0.23        1          .94       2.36+i.45 
                      62       ....          ...         ....        .... 
                      ... 
                      538   ....           ....        ....        .... 

It a basically a 304 x 5 matrix. I just need to assign the values of the displacements to these nodes using a subroutine. 

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

      INCLUDE 'ABA_PARAM.INC' 

      DIMENSION U(3),TIME(2),COORDS(3) 
C   
      REAL,DIMENSION(304,5)::A 
      A = OPEN(UNIT = 1, FILE ="Pressure_SAVAN_100Hz.txt", FORM = "FORMATTED", STATUS = "OLD", ACTION = "READ") 
          
          DO I = 1, 304 
          IF (NODE.EQ.A(I,1)) THEN 
                U(1) = A(I,5) 
          ENDIF 
          ENDDO 
          
RETURN 
END 
Please do notify me where I have gone wrong! Your help is much appreciated 

Regards 
Savan

Comments

Dear

You sholud assign the proper value of displacment based on the JDOF parameter. for example if the fifth column of your file is the displacement in the y direction you sholud use :

DO I = 1, 304 
          IF (NODE.EQ.A(I,1)) THEN 

               IF (JDOF .EQ. 2) THEN
                    U(1) = A(I,5) 

              END IF
          ENDIF 
          ENDDO

 

SavanRGowda's picture

Hi again!!

I have tried to code the fortran file and I don't 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

tarkes's picture

If you can provide  a sample inp file of your problem along with the subroutine and text file, it would be easy to diagonise.

If it is confidential, what I can suggest is use WRITE command in your subroutine and check each and every line of your code gives the output AS YOU EXPECT. Most of the time here it goes wrong. You imagine to be the output as this but it wont.

Dont use a large set of text data (304 x 3 Matrix), reduce to say about 3 X3 matrix data and see if evverything goes smoothly as expected.

I am expecting some kind of syntax or declaration errors to the type of issue you had mentioned. Please use the write command and diagonise systematically as suggested.

SavanRGowda's picture

Hi tarkes,

If you could provide your email address, I can send you my file.

Regards

Savan

tarkes's picture

You must be fast. Its already available in my profile.

tarkesdora20@gmail.com

tarkes's picture

Also dont forget to breifly mention the issue and slightly about the problem you are trying to solve.

Subscribe to Comments for "Abaqus DISP Subroutine"

Recent comments

More comments

Syndicate

Subscribe to Syndicate