You are here
Abaqus Fortran Subroutine
Hi Everyone,
I have now managed to run the fortran code, but it won't assign the values that I want to assign to the U(1) variable from the TXT file.
In the attached file I have the Fortran file that I am working on, the input file Subroutine1 (save it as .inp file to open in Abaqus) and the pressure file that contains the nodes and the corresponding pressure values which I want to assign through DISP Subroutine. The code below
SUBROUTINE DISP(U,KSTEP,KINC,TIME,NODE,NOEL,JDOF,COORDS)
INCLUDE 'ABA_PARAM.INC'
C REAL, DIMENSION(1:304,1:3), ALLOCATABLE :: A
C REAL, DIMENSION(304), ALLOCATABLE :: U
C CHARACTER*80 CNAME
DIMENSION U(1),TIME(2),COORDS(3),NODELOC(1095)
REAL,DIMENSION(1095,3) :: A
INTEGER :: I,J,W
OPEN(UNIT =16 , FILE = "C:\Pr100.txt",STATUS = "OLD")
DO 999, I=1,1095,1
READ(16,*)(A(I,J),J=1,3)
WRITE(6,*) (A(I,J),J=1,3)
999 CONTINUE
CLOSE(UNIT = 16)
JRCD = 0
JTYP = 0
NODEGLOB = 0
DO 99, J=1,1095,1
NODELOC(J) = A(J,1)
CALL GETINTERNAL('PART-1-1',NODELOC(J),JTYPE,NODEGLOB,JRCD)
IF (NODE.EQ.NODEGLOB.AND.JDOF.EQ.1) THEN
U(1) = A(J,2)
RETURN
END IF
99 ENDDO
END IF
RETURN
END
The above code runs successfully but doesn't assign the required values (the values which it reads fro the TXT file) to the variable U(1). Please help me with this and suggest some ideas that could be implemented.
Thanks in advance
Cheers!
Savan
Attachment | Size |
---|---|
Pr100.txt | 22.56 KB |
DISP3.txt | 1.19 KB |
Subroutine1.txt | 4.09 MB |
- SavanRGowda's blog
- Log in or register to post comments
- 3787 reads
Comments
RE: Abaqus Fortran Subroutine
Dear Savan
I guess you forgot to active the corresponding DOF in the boundary condition definition. When you employ the DISP subroutin, you must check the desired DOF in the BC definition as the following figure.