← Back to team overview

yade-users team mailing list archive

Re: [Question #699565]: Obtain the contact number of each particles in the primary fabric (only consider large contact force pairs)

 

Question #699565 on Yade changed:
https://answers.launchpad.net/yade/+question/699565

    Status: Open => Answered

Karol Brzezinski proposed the following answer:
Hi Zheng,

I am not sure whether I understand you correctly. From what I
understood, you want to know how many contacts of each particle have a
normal force (amplitude) bigger than the threshold (mean force that you
computed). I propose a modification of your last loop like this:

bodyId_numOfContacts = []
for b in O.bodies:
    counter = 0
    for ii in b.intrs():
        if ii.phys.normalForce.norm() > avgForce:
            counter += 1
    bodyId_numOfContacts.append([b.id, counter])
bodyId_numOfContacts = np.array(bodyId_numOfContacts)

Cheers,
Karol

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.