nik@cabana
unread,May 1, 2017, 6:55:35 PM5/1/17You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Dear all,
I have written following two fortran subroutines, which are called by external Abaqus program iteratively. My program is exiting with unknown error regarding compilation of these subroutines. Can anybody tell me what is the syntax error here? Thank you in advance, Nik
SUBROUTINE SIGINI(SIGMA,COORDS,NTENS,NCRDS,NOEL,NPT,LAYER,
1 KSPT,LREBAR,NAMES)
C
INCLUDE 'ABA_PARAM.INC'
C
DIMENSION SIGMA(NTENS),COORDS(NCRDS)
CHARACTER NAMES(2)*80
REAL, DIMENSION(3,3) :: T,X,STRESSXYZ,STRESSRTZ
REAL :: Stress,r,c,s,ylim,sine,cosine,radius,depth,dummy1,dummy2
INTEGER :: i,j
INTEGER, parameter :: NROWS=4442796, NCOLS=8
REAL :: output(NROWS,NCOLS)
REAL, DIMENSION(1,6) :: xy
ylim=-8.701882 !6309 Size Bearing
r=SQRT(COORDS(1)**2 + COORDS(3)**2)
if (COORDS(2)>ylim) then
sine=COORDS(1)/r
cosine=COORDS(3)/r
dummy1=(36.5948*sine-COORDS(1))**2 + (COORDS(2))**2 !6309 Size Bearing
dummy2=(36.5948*cosine-COORDS(3))**2 !6309 Size Bearing
radius=SQRT(dummy1+dummy2)
depth=radius-9.0805 !6309 Size Bearing
elseif(COORDS(2)<=ylim) then
depth=34-r !6309 Size Bearing
endif
if (depth<-0.0001) then
Stress=0 !This insures residual stress in ball = 0
elseif (depth>=-0.0001 .AND. depth<=0.026) then
!Stress=(300*depth/0.026)-700
Stress=-400
elseif(depth>0.026 .AND. depth<=0.5) then
Stress=-400
elseif(depth>0.5 .AND. depth<=1) then
!Stress=(400*depth/0.265)-1154.72
Stress=800*(depth-1)
else
Stress=0
endif
STRESSXYZ(:,:)=0.0
STRESSRTZ(:,:)=0.0
STRESSRTZ(2,2)=Stress !Residual stress is applied in circumferential direction
STRESSRTZ(3,3)=Stress !Residual stress is applied in axial direction
c=COORDS(1)/r
s=COORDS(3)/r
T(:,:)=0.0
T(1,1)=c
T(1,2)=-s
T(2,1)=s
T(2,2)=c
T(3,3)=1
X(:,:)=0.0
X(1,1)=c
X(1,2)=s
X(2,1)=-s
X(2,2)=c
X(3,3)=1
STRESSXYZ=T*STRESSRTZ*X
if (depth>=1) then
CALL Read_xcsv(output)
i=27*(NOEL-1)+NPT
xy(1,:)=output(i,3:8)
STRESSXYZ(1,1)=xy(1,1)
STRESSXYZ(2,2)=xy(1,2)
STRESSXYZ(3,3)=xy(1,3)
STRESSXYZ(1,2)=xy(1,4)
STRESSXYZ(1,3)=xy(1,5)
STRESSXYZ(2,3)=xy(1,6)
endif
SIGMA(1)=STRESSXYZ(1,1)
SIGMA(2)=STRESSXYZ(2,2)
SIGMA(3)=STRESSXYZ(3,3)
SIGMA(4)=STRESSXYZ(1,2)
SIGMA(5)=STRESSXYZ(1,3)
SIGMA(6)=STRESSXYZ(2,3)
RETURN
END
Subroutine Read_xcsv (xcsv)
IMPLICIT NONE
! read real numbers from CSV file
integer, parameter :: iu=20, nrows = 4442796, ncols = 8
real :: xcsv(nrows,ncols)
integer :: i
open (unit=iu,file="D:\E\3D\Run_2.csv",action="read",status="old")
do i=1,nrows
read (iu,*) xcsv(i,:)
end do
close (unit=iu)
END Subroutine Read_xcsv