🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

EDEM API: Particle Body Force – Particle Growth

User: "Stephen Cole"
Altair Employee
Updated by Stephen Cole

Overview

Here you will find the UDL source code and a simulation deck example for a simple particle growth and shrinkage application. This example has been updated to support CUDA GPU in EDEM 2024, note that the format of the preference .txt file has changed from the previous version.

Pre-Requisite

  • EDEM 2024

Usage/Installation Instructions

This model makes particle grow in function of time by re-scaling them using the “setScale” API function. The Particle Body Force plugin v3.7 is used for this API model.

In “ParticleGrowth.zip” you will find:

  • ParticleGrowth.dll: the compiled .dll application
  • example: contains the simulation deck example
  • src: contains the source files

Each particle needs the following inputs:

    • Expansion or Shrinkage rate (use negative values for shrinkage): the expansion or the shrinkage rate. The higher, the faster the particle will grow/shrink. Use negative values to indicate shrinkage
    • Final scale of the particle: the maximum or the minimum scale (relative to the current scale) to which the particles type will grow/shrink
    • Start time: the starting time for the particle growth/shrinkage

 

To run:

Extract the files from the attached zip and place the ParticleGrowth.dll file in the same location as the ParticleGrowth.dem file.  Note that the .dem file has the custom model already loaded in the Physics > Particle Body Force area.

Run the EDEM simulation to see the influence of the particle growth API.

Post-Requisite

If you are interested in simulating a swell/shrink cycle of the particles, please refer to this API: https://community.altair.com/community/en/edem-api-particle-body-force-particle-growth-cycle?id=kb_article&sysparm_article=KB0125119

Find more posts tagged with

Comments

Sort by:
1 - 4 of 41
    User: "Abhilash"
    New Altair Community Member
    Updated by Abhilash

    Hi,

    Instead of applying the setScale function to all the particles of a particular type, Is it possible to apply it to a set of randomly chosen particles? 

    User: "Community Guest"
    New Altair Community Member
    Updated by Community Guest

    Hi,

    Instead of applying the setScale function to all the particles of a particular type, Is it possible to apply it to a set of randomly chosen particles? 

    And do you have a GPU compatible (preferably openCL) version of this code?

    I upgraded the model to a higher version following the EDEM programming guide. but, I wasn't able to create a GPU file.

    User: "Stephen Cole"
    Altair Employee
    OP
    Updated by Stephen Cole

    And do you have a GPU compatible (preferably openCL) version of this code?

    I upgraded the model to a higher version following the EDEM programming guide. but, I wasn't able to create a GPU file.

    Hi, we dont have a GPU version however it does use the particle manager function, which we have a CUDA GPU example here - https://community.altair.com/community/en/edem-api-contact-model-example-removing-particles?id=kb_article_view&sysparm_article=KB0122028

     

    I'd recomend using CUDA GPU as the OpenCL version is no longer supported and is dropped in future versions.

     

    On the random selection this should be OK, you have information such as particle position if it is random within a specific area, or you could add a random number generator into the code and then only apply the scaling if the number is higher or lower than a set value.


    Regards

    Stephen

    User: "HoangDinhTrung"
    Altair Community Member

    Hi,

    When I open the example, an error shows up :

    WARNING : Plugin : Could not load plugin file:
    C:/Users/rr/Documents/Altair/ParticleGrowth/example\ParticleGrowth.dll

    May I know how I can fix this error?

Share projects with the Community

Share your models, scripts, workspaces, and more with the Altair Community.
New Exchange Project