Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Needing help for debugging a usdfld subroutine

Status
Not open for further replies.

roya22

Mechanical
Aug 9, 2017
11
0
0
US
Dear all,

I wrote the following USDFLD subroutine for calculating Damage.
But when it comes to add damage increment to the current damage parameter, it does not work and returns a wrong value (sdv5 must be the summation of sdv3,4 and its previous value). Does anybody knows what is the problem?

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)
C
INCLUDE 'ABA_PARAM.INC'
C
CHARACTER*80 CMNAME,ORNAME
CHARACTER*3 FLGRAY(15)
DIMENSION FIELD(NFIELD),STATEV(NSTATV),DIRECT(3,3),
1 T(3,3),TIME(2)
DIMENSION ARRAY(15),JARRAY(15),JMAC(*),JMATYP(*),COORD(*)
c-----------constants---------------
c-----------------------------------
if ((MOD(kstep,2)==0)) then
! CALCULATE VON MISES STRESS
call getvrm('S',ARRAY,JARRAY,FLGRAY,JRCD,JMAC,JMATYP,
1 MATLAYO,LACCFLA)
s11=array(1)
s22=array(2)
s33=array(3)
s12=array(4)
s23=array(5)
s31=array(6)
A1=(s11-s22)**2
A2=(s22-s33)**2
A3=(s33-s11)**2
A4=6*((s12**2)+(s23**2)+(s31**2))
A5=A1+A2+A3+A4
SMISES=sqrt(A5/2)
statev(1)=SMISES
c
call getvrm('PE',ARRAY,JARRAY,FLGRAY,JRCD,JMAC,JMATYP,
1 MATLAYO,LACCFLA)
PEEQ=array(7)
statev(2)=PEEQ
c
CALL GETVRM('SDV',ARRAY,JARRAY,FLGRAY,JRCD,JMAC,JMATYP,
1 MATLAYO,LACCFLA)
SA=statev(1)
D1=(SA/M)**b
statev(3)=D1
SAA=statev(2)
D2=(SAA/mm)**c
statev(4)=D2
D=statev(5)+statev(3)+statev(4)
c
IF (D.GE.1) THEN
field(1)=1
statev(5)=field(1)
c
ELSE
field(1)=D
statev(5)=field(1)
c
END IF
c
else
continue
end if
c
RETURN
END
99002BB4-0576-4C0E-BD42-60B13C402B3C_iwhu6j.jpg
 
Status
Not open for further replies.
Back
Top