Interaction between clumps

Asked by xuq on 2019-10-10

Hi all,

If the clump 1 is composed of particle A,B,C and clump 2 is composed of particle D,E,F ,and when clump 1 interact with clump 2,it is possible to know which particle in clump 1 interacts with clump2?

Thanks a lot for your help!

xuq.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Robert Caulk
Solved:
2019-10-11
Last query:
2019-10-11
Last reply:
2019-10-10
Best Robert Caulk (rcaulk) said : #1

Hello,

Here is my guess (untested):

clump1ID = someID
clump2ID = someOtherID

for i in O.bodies[clump1ID].intrs():
    if O.bodies[i.id2].clumpId = clump2ID
         print('clump1 body', i.id1)
         print('clump2 body', i.id2)

Cheers,

Robert

xuq (xuq) said : #2

Thanks Robert Caulk, that solved my question.

Robert Caulk (rcaulk) said : #3

line edit:

if O.bodies[i.id2].clumpId == clump2ID: