yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #14719
Re: [Question #626571]: number of contact for particles with the same size
Question #626571 on Yade changed:
https://answers.launchpad.net/yade/+question/626571
Status: Open => Answered
Jérôme Duriez proposed the following answer:
Hello,
I guess there indeed is no built-in function that would do that, but it
is quite easy to do the job oneself:
nCont = 0
for i in O.interactions:
b1 = O.bodies[i.id1]
b2 = O.bodies[i.id2]
if b1.shape.radius == 4mm and b2.shape.radius == 4mm: # obviously "mm" is not to be typed here, use the correct numerical value for your model. You may also need to add another test to disregard non-spherical particles, if any.
nCont+=1
--
You received this question notification because your team yade-users is
an answer contact for Yade.