[EDEM] Can we get energy loss with GPU calcuration

Sakae
Sakae Altair Community Member

Hi,

I'd like to get energy loss after simulation by GPU.

I think currrent .dill file that we use for getting energy loss is available only CPU calculation. Do you have any idea to get it with GPU calculation.

Tagged:

Answers

  • Stephen Cole
    Stephen Cole
    Altair Employee

    Hi,

    We are currently developing an Energy loss model to work internally with EDEM, however this is not completed yet.

    The API model here runs on CPU only:

    EDEM API - Contact Model Example: Energy Loss

    However it has recently been updated to run on GPU. To use you need either the .dll (Windows) or .so (Linux) and the .cu file (for GPU) in the same location as the .dem file, otherwise follow the same instructions to use as in the above post.

    We will update the post with the model shortly.

    This is different to the model which is to be released with EDEM 2025.x (or later) which will have more functionality.

    Regards
    Stephen

  • Sakae
    Sakae Altair Community Member

    Hi, thank you for your quick reply.

    I have tried to use it but it seems not to work.

    Please refer to below. My operation is correct?

  • Stephen Cole
    Stephen Cole
    Altair Employee

    Hi Sakae, It looks like the Linux version was updated but not the windows one. The engineer who updated the model is on vacation and back on Monday, we'll attach the updated version then.

    Regards

    Stephen

  • Sakae
    Sakae Altair Community Member

    Hi, could you send me Windows version?

    Thank you for your support

  • Renan
    Renan
    Altair Employee

    Hi Sakae,

    Here's the Windows version of the Energy Loss API

  • Sakae
    Sakae Altair Community Member

    Thank for your support.

    I have tried to use it , then it have worked well.

    But I wonder the result with my past calcuration by CPU and my

    new calculation by GPU is totally different. Why it happend, is there any idea?

  • Stephen Cole
    Stephen Cole
    Altair Employee

    Hi, Renan updated the model on the community page on the 21st with a bug fix which may resolve this issue:

  • Sakae
    Sakae Altair Community Member

    Hi, Thank you for your strong support.

    But I still have one question.

    I have tried to simulate it but Energy loss between particle to particle was 0.

    On the other hand, I got some value of Energy loss between particle to geometry.

    My understanding is that both energy loss should be occured but my case was not.

    Is this correct situation or my simulation condition was wrong?

    Thanks

  • Stephen Cole
    Stephen Cole
    Altair Employee

    hi, did you set at Contact Radius on the particles? The particles need a contact radius to be greater than the physical radius for the energy to be captured. This allows the model to write the data once the collision has ended.

  • Sakae
    Sakae Altair Community Member

    Hi, Yes I did set contact radius, its value was larger than physical radius.

    and I simulated it with several case, in some case, I got energy loss btw particle to particle.

    But other case, No value.

    pls see attached for your well understanding.

    Thank you for your strong support.

  • Stephen Cole
    Stephen Cole
    Altair Employee

    Model B looks reasonable, you should not see any change in energy loss with Contact Radius value as it only needs to be large enough to check the last contact. I would expect in both cases you can reduce this to be ~1% larger than the physical radius or calculate the actual value. It needs to be larger than the physical radius by "maximum particle velocity in the system" * time-step. You could estimate max particle velocity = max geom velocity and given the time-step is small this value will be small increase in radius required.

    For Model A how did you change the contact Radius? Just to note any changes to particle size or shape only affect particles which are created after this change is made. If you created the 1 million particles and let them settle with contact radius = physical radius and then changed the radius after the particles were created, it would still use the orignal value not the updated value. To ensure the contact radii changes are taken you either have to re-create the particles or manually edited the 0.h5 file with a HDF5 editor (not recommended).

    Regards

    Stephen