SMISES=(STRESS(1)-ALPHA(1)-STRESS(2)+ALPHA(2))**2
1 +(STRESS(2)-ALPHA(2)-STRESS(3)+ALPHA(3))**2
1 +(STRESS(3)-ALPHA(3)-STRESS(1)+ALPHA(1))**2
do K1=NDI+1,NTENS
SMISES=SMISES+SIX*(STRESS(K1)-ALPHA(K1))**2
enddo
SMISES=SQRT(SMISES/TWO)
C
C GET YIELD STRESS AND HARDENING MODULUS
C
SYIELD=PROPS(3)
HARD=PROPS(4)
C
C DETERMINE IF ACTIVELY YIELDING
C
if(SMISES.gt.(ONE+TOLER)*SYIELD) then
C
C ACTIVELY YIELDING
C SEPARATE THE HYDROSTATIC FROM THE DEVIATORIC STRESS
C CALCULATE THE FLOW DIRECTION
C
SHYDRO=(STRESS(1)+STRESS(2)+STRESS(3))/THREE
do K1=1,NDI
flow(K1)=(STRESS(K1)-SHYDRO-ALPHA(K1))/SMISES
enddo
do K1=NDI+1,NTENS
flow(K1)=(STRESS(K1)-ALPHA(K1))/SMISES
enddo
C
C SOLVE FOR EQUIVALENT PLASTIC STRAIN INCREMENT
C
DEQPL=(SMISES-SYIELD)/(HARD+EG3)
C
C UPDATE SHIFT TENSOR, ELASTIC AND PLASTIC STRAINS AND STRESS
C
do k1=1,NDI
ALPHA(K1)=ALPHA(K1)+HARD*flow(K1)*DEQPL
EPLAS(K1)=EPLAS(K1)+THREE/Two*flow(K1)*DEQPL
EELAS(K1)=EELAS(K1)-THREE/Two*flow(K1)*DEQPL
STRESS(k1)=ALPHA(k1)+FLOW(k1)*SYIELD+SHYDRO
enddo
DO k1=NDI+1,NTENS
ALPHA(K1)=ALPHA(K1)+HARD*flow(K1)*DEQPL
EPLAS(K1)=EPLAS(K1)+THREE*flow(K1)*DEQPL
EELAS(K1)=EELAS(K1)-THREE*flow(K1)*DEQPL
STRESS(k1)=ALPHA(k1)+FLOW(k1)*SYIELD
ENDDO