About deleting atoms using fix_massflow_mesh command

Submitted by Rachel on Sat, 11/11/2017 - 08:51

Dear all,

I am now facing a problem about deleting atoms in my particle-fluid coupling process. In my code, I apply the command of "fix massflow mesh .. delete atoms yes" to delete atoms that getting through a certain mesh wall. I have listed this command in my liggghts code. However, I found the atoms cannot be deleted at every liggghts time step. It seems the atoms are deleted only at the initial several steps, and after that the atoms will get across the wall without being deleted. I have also tried to list this command on liggghtsCommandModel_execute... while it doesn't work. I really cannot undertand why the fix_massflow_mesh work at the initial steps while doesn't work after that step. How to delete the atoms getting through a mesh wall at every liggghts timestep? Could anyone please help me? I really need and appreciate your help.

Best regards,
Rachel

TimMJN's picture

TimMJN | Thu, 12/07/2017 - 16:45

Dear Rachel,

I have ran into the same problem, and did some troubleshooting. As it turns out, the particle deletion routine is only called on timesteps when the neighbourlist is rebuild. With "rebuild", I mean a new neighbourlist being build during the integration. As in a coupled simulation, a new run is set-up every coupling interval, this might never occur. The initial neighbourlist build during the set-up of the run is used for the entire coupling interval. Try setting your skinsize to something very small, so LIGGGHTS is forced to build a new neighbourlist in between the coupling intervals. Fix massflow/mesh .. delete_atoms yes will then work.

I hope this helps.

Kind regards,

Tim
Eindhoven University of Technology

Kind regards,

Tim Nijssen
Eindhoven University of Technology

Rachel | Thu, 12/07/2017 - 23:34

Dear Tim,

It sounds like a good idea, I will have a try of your suggestion and will see whether the problem can be solved. In the past few days, I use another method to delete the particles penetrating through the wall. I set a new region and then use the command "delete_atoms region xxx compress yes" to delete the atoms in liggghtsCommands. This works good for my case. Anyway thanks for your suggestion and I think that should be the point why I made a mistake.

Also, I want to ask another question if convenient, do you know how to count the total particle number inside a certain region and update the total particle number in every 10000step or every coupling step. I have used the command "variable number equal count(region_name)" in my liggghts code but the v_number seems not change during the simulation. Do you have any idea about how to update the total particle number in every step? Thanks ahead!

Kind regards,
Rachel

TimMJN's picture

TimMJN | Fri, 12/08/2017 - 08:39

Hi Rachel,

Yes that is also a good option, I have used it as well. Although, I found it rather inconvienent, as defining the regions can be cumbersome when using complex geometry.

As for the particle count, the variable command set the value only once, at the start of the simulation. If you want to update it every time step, you will have to use a compute command. Specifically, the compute nparticles/tracer/region command. Have a look at https://www.cfdem.com/media/DEM/docu/compute_nparticles_tracer_region.html for the details.

Kind regards,

Tim
Eindhoven University of Technology

Kind regards,

Tim Nijssen
Eindhoven University of Technology