EDEM API: Particle Body Force – Particle Growth
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
Comments
-
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?
0 -
Abhilash said:
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.
0 -
Community Guest said:
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.
RegardsStephen
0