Can EDEM derive all particle IDs in contact with a certain particle?

Alvin Li
Alvin Li Altair Community Member
edited December 2022 in Community Q&A

Can the EDEM obtain all the particles in contact with a particle (those with overlapping contact radii) at one certain time step?

Tagged:

Answers

  • Renan
    Renan
    Altair Employee
    edited December 2022

    Hi Alvin,

     

    It's possible to do that using EDEMpy. To get the ids of the particles in contact you can use the getIds function. It would look something like this:

    timestep = deck.timestep[tstep] pp_contacts = timestep.contact.surfSurf pp_contacts_ids = pp_contacts.getIds() 

     

    This returns a list (num_contacts x 2) with the ids of the particles in contact. Then you can use that list to find the particles that are in contact with the particle you're interested in.

     

    Best regards,
    Renan

  • Alvin Li
    Alvin Li Altair Community Member
    edited December 2022

    Thank you for responding! As far as I know, EDEMpy is used for EDEM data post-processing, and these data are not necessary for post-processing in my case. Instead, when calling the APIs to calculate the particle volume force or contact force during the simulation, I need to acquire the IDs of all particles in contact with the particle. Is it possible to achieve this?

  • Renan
    Renan
    Altair Employee
    edited December 2022
    Alvin Li said:

    Thank you for responding! As far as I know, EDEMpy is used for EDEM data post-processing, and these data are not necessary for post-processing in my case. Instead, when calling the APIs to calculate the particle volume force or contact force during the simulation, I need to acquire the IDs of all particles in contact with the particle. Is it possible to achieve this?

    Hi Alvin,

     

    When a contact model is called it doesn't have any information about other contacts. What you could do is create a particle custom property and store the ids of the particles that are in contact with it in that custom property. The downside with this approach is that you'd only know the ids of the previous timestep, so your calculations would be "delayed" by one timestep.

     

    Best regards,

    Renan