!让MSC.MARC根据总应变杀死单元
!by 陆新征,清华大学
subroutine uactive(m,n,mode,irststr,irststn,inc,time,timinc)
include '../common/implicit'
include "../common/ELMCOM"
dimension m(2)
integer ElemNo, IntPNo, KC, ICODE
real*8 var1(3,8, 6), Strainmax, Strainmin
var1=0.
ElemNo=M(1)
do IntPNo=1,8
KC=1
ICODE=301 !total strain
CALL ELMVAR (ICODE,ElemNo,IntPNo,KC,VAR1(1,IntPNo, :)) ! 得到总应变
end do
Strainmax=maxval((var1(3,:,:)))
if(Strainmax>5.E-2) then !Kill the element
MODE=-1; IRSTSTR=1; IRSTSTN=1;
end if
RETURN
END