yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #22061
Re: [Question #688696]: Calculate the number of broken bonds in Cpm mat
Question #688696 on Yade changed:
https://answers.launchpad.net/yade/+question/688696
Status: Needs information => Open
Akm gave more information on the question:
Hi Jan and Robert,
My script is pretty lengthy and has a lot of imports. So let me just
stick to those commands where I calculate the bond breakage statistics.
I do not get any change in the cohesive bond numbers even when I can see
particles flying after bond breakage.
###At the start of the program
global cohesive_count
cohesive_count=0
for i in O.interactions:
if hasattr(i.phys, 'isCohesive'):
if i.phys.isCohesive == True:
cohesive_count+=1
###Inside a Pyrunner:
presentcohesive_count = 0
for i in O.interactions:
if hasattr(i.phys, 'isCohesive'):
if i.phys.isCohesive == 1:
presentcohesive_count+=1
noncohesive_count= cohesive_count-presentcohesive_count
print (noncohesive_count)
--
You received this question notification because your team yade-users is
an answer contact for Yade.