How to delete 10% of small particles in a region?

Submitted by Rachel on Wed, 11/21/2018 - 16:27

Hi all,

In my simulation, I have two particle size, namely small particles and big particles. Now I need to delete 10% of the small particles in my calculation region, does anyone know which command do I need to use?

Best regards,
Rachel

iluvatar | Wed, 12/26/2018 - 22:26

Hi, I do not know exactly how to do it, but I might suggest that you select the particles in the given region (assuming that you have tagged the small particles with a different type than the larger ones) and then use the slice compute (https://www.cfdem.com/media/DEM/docu/compute_slice.html) to slice the total array and get the 10% of it, for instance by choosing an appropriate skip length, and then delete the final ids selected. Also, the delete_atoms command also accept a fraction (https://www.cfdem.com/media/DEM/docu/delete_atoms.html), but in this case it is hard to specify the region and not affect the larger atoms.
As I said, this is just an idea. Maybe this is useful just to bump this question so someone with more knowledge can answer.

Rachel | Sun, 01/06/2019 - 16:07

Hi,

Thanks so much for your advice. Now I think I have found the solution. First I generate a group with a determined fraction of fine particles, then I delete this group using delete_atoms. This may not be a direct way but I think I can get my purpose using this method. Thanks.

Best,
Rachel

arnom's picture

arnom | Mon, 01/14/2019 - 11:44

Just a small hint, if you use delete_atoms ensure that you have compress no in the arguments to avoid bugs. This will be fixed in LIGGGHTS soon.

DCS team member & LIGGGHTS(R) core developer