Help on EDEM API Accessing Meta-Particle Length

Jianan
Jianan Altair Community Member
edited July 2023 in Community Q&A

I have been working on developing an API to export the meta-particle length to a local file before removing each meta-particle from the computing domain. While I’m able to access the radius for each single particle, I have difficulty in obtaining the meta-particle length in API. Can anyone please show me how to access the properties of meta-particle in API?

By the way, the API I’m developing is based on the API example from Knowledge Base (Script & Model Library - EDEM API - Contact Model Example: Removing Particles (Altair Knowledge Article View - Altair Community)). 

Thank you!

Tagged:

Best Answer

  • Stephen Cole
    Stephen Cole
    Altair Employee
    edited July 2023 Answer ✓

    Hi Jianan,

     

    'Meta Particles' don't exist within the API unfortunately, they are essentially created via the factory but there isn't any data stored about them to be able to access this in the API.

     

    You have access to the contacts and custom contacts.  The custom contact 'bond status' is a value assigned per particle contact to determine if the two particles are bonded (status 0 = no bonds, status 1 = bonds, status 2 = broken bonds).  This is still difficult to get the meta particle data as you only have the info about contact pairs not the whole meta particle structure.  To get this you may have to update your own custom bond model to provide more data, the product team is looking into creating more structure around the meta particles for future releases however this isn't available now.

    We have an API version of the bond model here - Bond Model

    Regards

    Stephen

     

Answers

  • Stephen Cole
    Stephen Cole
    Altair Employee
    edited July 2023 Answer ✓

    Hi Jianan,

     

    'Meta Particles' don't exist within the API unfortunately, they are essentially created via the factory but there isn't any data stored about them to be able to access this in the API.

     

    You have access to the contacts and custom contacts.  The custom contact 'bond status' is a value assigned per particle contact to determine if the two particles are bonded (status 0 = no bonds, status 1 = bonds, status 2 = broken bonds).  This is still difficult to get the meta particle data as you only have the info about contact pairs not the whole meta particle structure.  To get this you may have to update your own custom bond model to provide more data, the product team is looking into creating more structure around the meta particles for future releases however this isn't available now.

    We have an API version of the bond model here - Bond Model

    Regards

    Stephen

     

  • Jianan
    Jianan Altair Community Member
    edited July 2023

    Hi Jianan,

     

    'Meta Particles' don't exist within the API unfortunately, they are essentially created via the factory but there isn't any data stored about them to be able to access this in the API.

     

    You have access to the contacts and custom contacts.  The custom contact 'bond status' is a value assigned per particle contact to determine if the two particles are bonded (status 0 = no bonds, status 1 = bonds, status 2 = broken bonds).  This is still difficult to get the meta particle data as you only have the info about contact pairs not the whole meta particle structure.  To get this you may have to update your own custom bond model to provide more data, the product team is looking into creating more structure around the meta particles for future releases however this isn't available now.

    We have an API version of the bond model here - Bond Model

    Regards

    Stephen

     

    Hi Stephen,

    Thank you so much for your answer. As you mentioned, it is hard to get the meta particle's length using contacts or custom contact model. The reason for us to do that is to improve computing efficiency. We would like to remove particles when exiting the computing domain, meanwhile record the length of meta particles for analysis. 

    To get the length of meta particles using custom bond model, can you shed some light on how to achieve it? It does not have to be bounding box diagonal length, equivalent volume of a spherical particle may also work for us.

    Thanks,

    Jianan

  • Stephen Cole
    Stephen Cole
    Altair Employee
    edited July 2023

    Hi Stephen,

    Thank you so much for your answer. As you mentioned, it is hard to get the meta particle's length using contacts or custom contact model. The reason for us to do that is to improve computing efficiency. We would like to remove particles when exiting the computing domain, meanwhile record the length of meta particles for analysis. 

    To get the length of meta particles using custom bond model, can you shed some light on how to achieve it? It does not have to be bounding box diagonal length, equivalent volume of a spherical particle may also work for us.

    Thanks,

    Jianan

    Hi Jianan,


    I don't have a good solution myself for this with the API.  The data available includes the contact position between a pair of particles, the type of particles and the BondStatus custom property.

     

    Challenge is that you don't get all this at once rather you get it in pairs, and when considering multi-threaded process these pairs are calculated simultaneously.

    What you would have to do is for each contact create a list which includes the ID, position and bond status value of 1 for bonded particles.  Then sort the list into groups each group containing only particles with connecting bond status = 1 values.  Each group then would be a meta particle and given you know the positions of the particles you could determine the size/length.

    I can't provide much insight into creating and organizing the lists but this is the approach I'd take.

    Regards

    Stephen