Export contact particle ID with EDEMpy

Yang_QI1User: "Yang_QI1"
Altair Community Member
Updated by Yang_QI1

Hi anyone,

I am trying to get ids of particles in contact with each other using EDEMpy. I only want information of particle conatacting with particle and I have used two methods.
1.contactids = deck.timestep[tstep].contact.surfSurf.getIds()
2. contacts = deck.timestep[tstep].contact.surfSurf.getContacts()

contactids = contacts[:,[1,3]]

I previously thought these two methods should return identical results, both returns contact particle pairs.
However, I noticed that the two methods generate different results and I am confused about the reasons. I would like to know what exactly does the two functions: contact.surfSurf.getIds() and contact.surfSurf.getContacts() returns? Why is there a difference?

Many thanks,

Jason

Find more posts tagged with

Sort by:
1 - 1 of 11
    jpmorrUser: "jpmorr"
    Altair Community Member
    Accepted Answer
    Updated by jpmorr

    getContacts() returns an array where each row represents the index location for the ID of the two particles. So the first value is element 1 particle type and the second value is the index location of it's ID in the particle ID lists. Values 3 and 4 repeat this for particle two in the contact. These two pieces of information are required to extract the correct ID for each particle in a contact pair- EDEM stores the index location to the ID rather than the ID itself.

    getIds() is basically an index lookup function using getContacts() information. Hope that makes sense.

    JP