fuzzdoug
Mechanical
- Jul 22, 2003
- 42
I've been teaching myself APDL and decided to make a ekill macro for use in Workbench. I wanted to automate the process as much as possible w/ the minimum amount of setup.
I did not want to use separate load steps.
I was mainly inspired to use components from this:
It appears to be working under specific circumstances and I would like the community to take a look at it and possibly tweak it, etc.
It's designed to be used for any static analysis with a single part or an assembly using the same materials. Have NOT tested this on an multibody analysis (yet).
So far I have used a ASTM-D638 test as a benchmark.
Any feedback is appreciated.
At the moment the macro does the follow (or was intended to):
1. Breaks up the solution into sub-steps w/ sub-steps using a Do loop.
2. At each break, it stores elements meeting "failure" criteria into components.
3. Writes the a component file.
4. Issues a restart and reads in the component file and systematically kills the elements.
The *get and *status statements were used for troubleshooting.
! Doug Mangels
! 2011-07-01
total_steps=100
subst_int=1
subst_max=10
subst_min=1
*do,i,1,total_steps
/gopr
time_step=i/total_steps
time,time_step
nsubst,subst_int,subst_max,subst_min
outres,all,all
esel,all
solve
finish
/post1
set,last
! esel,s,live
! *get,live_count%i%,elem,0,count
! esel,inve,live
! *get,dead_count%i%,elem,0,count
esel,all
etable,stress,s,eqv
esel,s,etab,stress,ARG1
! *get,stress_ecount%i%,elem,0,count
cm,kill_stress%i%,elem
cmsel,s,kill_stress%i%,elem
! *get,stress_ecount%i%,elem,0,count
esel,all
etable,strain,epto,eqv
esel,s,etab,strain,ARG2
! *get,strain_ecount%i%,elem,0,count
cm,kill_strain%i%,elem
cmsel,s,kill_strain%i%,elem
! *get,strain_ecount%i%,elem,0,count
allsel
cmwrite,kill_list,cm
parsav,all
finish
/solu
antype,,restart
parres
! *status
/input,kill_list,cm
*do,k,1,i
ekill,kill_stress%k%
ekill,kill_strain%k%
! *status
*enddo
*enddo
finish
I did not want to use separate load steps.
I was mainly inspired to use components from this:
It appears to be working under specific circumstances and I would like the community to take a look at it and possibly tweak it, etc.
It's designed to be used for any static analysis with a single part or an assembly using the same materials. Have NOT tested this on an multibody analysis (yet).
So far I have used a ASTM-D638 test as a benchmark.
Any feedback is appreciated.
At the moment the macro does the follow (or was intended to):
1. Breaks up the solution into sub-steps w/ sub-steps using a Do loop.
2. At each break, it stores elements meeting "failure" criteria into components.
3. Writes the a component file.
4. Issues a restart and reads in the component file and systematically kills the elements.
The *get and *status statements were used for troubleshooting.
! Doug Mangels
! 2011-07-01
total_steps=100
subst_int=1
subst_max=10
subst_min=1
*do,i,1,total_steps
/gopr
time_step=i/total_steps
time,time_step
nsubst,subst_int,subst_max,subst_min
outres,all,all
esel,all
solve
finish
/post1
set,last
! esel,s,live
! *get,live_count%i%,elem,0,count
! esel,inve,live
! *get,dead_count%i%,elem,0,count
esel,all
etable,stress,s,eqv
esel,s,etab,stress,ARG1
! *get,stress_ecount%i%,elem,0,count
cm,kill_stress%i%,elem
cmsel,s,kill_stress%i%,elem
! *get,stress_ecount%i%,elem,0,count
esel,all
etable,strain,epto,eqv
esel,s,etab,strain,ARG2
! *get,strain_ecount%i%,elem,0,count
cm,kill_strain%i%,elem
cmsel,s,kill_strain%i%,elem
! *get,strain_ecount%i%,elem,0,count
allsel
cmwrite,kill_list,cm
parsav,all
finish
/solu
antype,,restart
parres
! *status
/input,kill_list,cm
*do,k,1,i
ekill,kill_stress%k%
ekill,kill_strain%k%
! *status
*enddo
*enddo
finish