Hi. I have been trying to run a usdfld code that changes the material properties of the model using the hashin failure indicators for fiber and matrix compression for changing the material properties after failure begins. However abaqus is displaying a compilation error. The code is as follows:
SUBROUTINE USDFLD(FIELD,STATEV,PNEWDT,DIRECT,T,CELENT,
1 TIME,DTIME,CMNAME,ORNAME,NFIELD,NSTATV,NOEL,NPT,LAYER,
2 KSPT,KSTEP,KINC,NDI,NSHR,COORD,JMAC,JMATYP,MATLAYO,LACCFLA)
!
INCLUDE 'ABA_PARAM.INC'
!
CHARACTER*80 CMNAME,ORNAME
CHARACTER*3 FLGRAY(15)
DIMENSION FIELD(NFIELD),STATEV(NSTATV),DIRECT(3,3),T(3,3),TIME(2)
DIMENSION ARRAY(15),JARRAY(15),JMAC(*),JMATYP(*),COORD(*)
PARAMETER(Xc=2293000000.0,Xt=66200000.0,Yc=948200000.0,Yt=210000000.0,Zc=175.0,Zt=55.5,Sc=155300000.0)
! Absolute value of current strain:
CALL GETVRM('S',ARRAY,JARRAY,FLGRAY,JRCD,JMAC,JMATYP,MATLAYO,LACCFLA)
S11 = ABS(ARRAY(1))
S12 = ABS(ARRAY(2))
S22 = ABS(ARRAY(4))
!
FV1=(S22/Yc)**2 + (S12*Sc)**2
IF(FV1.GE.1.0) THEN
FV1=1.0
ELSE
FV1=0.0
ENDIF
!
FV2=(S11/Yc)**2 + (S12/Sc)**2
IF(FV2.GE.1.0) THEN
FV2=1.0
ELSE
FV2=0.0
ENDIF
!
! Use FV1 as a field variable
FIELD(1) = FV1
FIELD(2) = FV2
!
STATEV(1) = FIELD(1)
STATEV(2) = FIELD(2)
! If error, write comment to .DAT file:
IF(JRCD.NE.1.0)THEN
WRITE(6,*) 'REQUEST ERROR IN USDFLD FOR ELEMENT NUMBER ',NOEL,'INTEGRATION POINT NUMBER ',NPT
ENDIF
!
RETURN
END
Kindly suggest a fix.