SavanGowda
Mechanical
- Aug 13, 2015
- 8
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 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
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 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