How to get the number of atom contacts on walls?

Submitted by Tao on Sat, 05/21/2011 - 22:33

Hi all,
I wonder if I can get the number of atom contacts on walls in LIGGGHTS? I'm using the fix mesh/gran/stressanalysis command to create boundary wall in simulation and I want to get the number of atom contacting with wall when wall moves. What's more, I also want to get the position of the geometrical centre of the wall after moving.

Can anyone help me with that?

Cheers,
Tao

ckloss's picture

ckloss | Mon, 05/23/2011 - 14:40

Hi Tao,

you will have to modify the FixMeshGranAnalyze class for this, but it should be pretty straight forward. The only thing you need to do is increase a counter in add_particle_contribution(), one extra line in compute_vector() to output the result of the counter, a counter reset in pre_force(), and an allreduce in calc_total_force().

Best,
Christoph

PS: if it works, let me know. this might be an interesting feature for other people, too