Overview
The Particle Manager function in EDEM API allows access to the scale, total number of particles, and multi-sphere particle element positions and also includes the ability to remove particles from a simulation.
This example shows the Particle Removal function applied to a Salt Spreader simulation. Salt particles are removed when they hit a plane positioned to track the passage of particles. The removal occurs when particles contact a geometry section called 'tracker'. The tracking planes are colored from yellow to red, depending on the number of impacts. The tracking plane coloring is set using the API Custom Geometry Properties.
The required output in this example is the total distribution of salt across the different planes. Removing and recording the material per plane significantly reduces the simulation time, compared to tracking each individual particle. This also improves the post-processing ability, as seen by the visualizations in the image below.
The same functionality can be applied to other simulations and industries, for example when simulating fertilizer spreaders in the agricultural industry, when removing material during chemical reactions in chemical or steel manufacturing or as part of a material breakage model.

Update January 2022 - this model has been updated to the EDEM API Version 3.3 for CPU and also updated to use CUDA API for GPU processing.
Update May 2024 - the model has been updated to version 3.6 of the API.
Usage/Installation Instructions
To run:
- Place the RemoveParticles.dll and RemoveParticles.cu in the same folder as the required simulation .dem file
- Go to the Physics > Particle to Geometry section and Edit Contact Chain. Add RemoveParticles from the Plug-in models area (note this has already been done for the supplied example)
- Once the RemoveParticles model has been added, click on it then click on the wheel button. Make sure that the geometry named "tracker" is selected from the drop down menu
- The model can then be run with the tracker code on CPU or CUDA GPU.
Please take a look at the code for use in your own project. We’d appreciate it if you would post any of your own modifications or code snippets to help other users. Feel free to use this forum for asking questions about this contact model.