December 1, 2020 at 4:19 pm
Subscriber
ArraynThe image below is the material in this model.n
However, there is a Command Object in the model that has the following code:n!Failure strainnfail_strain=arg1n!total number of steps for solve, strain is checked only after each stepnsteps=arg2nn!Find out the final solution time set in Analysis Settingsn*get,TIME_END,common,,stepcm,,real,2ntimeinc=TIME_END/stepsntime,timeincnsolvenn*do,ICOUNT,1,steps-1nn!After the solve, go post process strainn /post1n set,lastnn!Limited to Named Selection killelemn cmsel,s,killelemn etable,MYPLAS,eppl,eqvn esel,r,etab,MYPLAS,fail_strain,0.5n *get,ECOUNT,elem,,countnn!Create component (Named Selection) of elements that are above failure strainn cm,MYELEM%ICOUNT%,elemn finishnallselnn!A restart opens the ANSYS restart database (*.rdb) which is written after the first n!solve command. Therefore, all the stuff above does not exist in the rdb.n!Therefore...n!Write out the components to a file so they can be read in for the restart solvencmwrite,temp%ICOUNT%,cmn!Write out the parameters to a file so they can be read in for the restart solvenparsavnn /solun!Restart... wipes out all of our post processing data that we just obtainedn antype,,restnn!Read in the parametersn parres,changenn!Read in all components and kill the elementsn*do,j,1,ICOUNTn/goprn /input,temp%j%,cmn *GET, exists, COMP, MYELEM%j%, TYPEn *if,exists,ne,0,thenn cmsel,s,MYELEM%j%n elistn ekill,alln *endifn*enddonn allsel,alln time,timeinc*ICOUNT+timeincn solven finishn*enddon
