Reducing Particle number during the simulation

40044600's picture
Submitted by 40044600 on Wed, 04/25/2018 - 16:29

Hello,

I'm wondering if there's any existing LIGGGHTS simulation that alters the number of particles throughout the simulation.
For my case, I want the particle number in a powder bed to reduce linearly with time.

Has anything like this been achieved to date. Or has anybody any thoughts about how it could be done?

Any feedback greatly appreciated.

Thanks.

jsams | Thu, 04/26/2018 - 01:37

In older versions of liggghts you could use the fix evaporate command which allows the removal of a user-defined number of particles at a specified rate from a certain region in your simulation, however, it is not included in the recent versions of liggghts anymore (It would be interesting to know why, since it is quite a useful command. Maybe someone from the developer team can comment on why it is not included anymore?).

It's a lammps command [1] and you can still find and download the .cpp and .h file from the liggghts src folder on git [2], add it to your liggghts distribution and recompile it. Then you are able to use it for your simulation. It still works!

[1] http://lammps.sandia.gov/doc/fix_evaporate.html
[2] https://github.com/CFDEMproject/LIGGGHTS-3-beta-PUBLIC/tree/master/src/MISC

Liggghts doc: https://github.com/CFDEMproject/LIGGGHTS-3-beta-PUBLIC/blob/master/doc/f...

40044600's picture

40044600 | Fri, 04/27/2018 - 17:38

Thanks so much. This looks like exactly what I need!!

What is the process for adding this to my liggghts distribution? Do I need to create my own 'LIGGGHTS-PUBLIC' , add these files to the src folder and then recompile.
I've need had to add packages before so I'm unsure. :/

Thanks,

jsams | Sat, 04/28/2018 - 09:14

Adding a fix command is actually quite simple. Copy the fix_evaporate.cpp and fix_evaporate.h to your LIGGGHTS-PUBLIC src folder and recompile (e.g. using make auto) as done in the initial installation process.

40044600's picture

40044600 | Mon, 05/28/2018 - 14:53

Hey, I've added these files to the src folder and successfully recompiled LIGGGHTS.

However, I'm getting an error message that 'evaporate' in an invalid fix style. See below.
ERROR: Invalid fix style: "evaporate" (/build/liggghts-QCz4in/liggghts-3.3.1+repack1/src/modify.cpp:820)

I'm wondering if this fix style is no longer compatible with the latest version of LIGGGHTS.
Jsams - You stated previously you were able to get this command to work. What version of LIGGGHTS were you using?

jsams | Tue, 05/29/2018 - 09:33

I have been using the fix with the latest (v_3.8) as well as with previous versions of LIGGGHTS.

Usually, this error message comes up when the fix is not available (e.g. it is not compiled, not available in the LIGGGHTS PUBLIC, etc.)

40044600's picture

40044600 | Wed, 05/30/2018 - 12:37

Not sure of the exact problem but I reinstalled LIGGGTHS and the function is now working!!

Many thanks for bringing this function to my attention.