Access contact forces between atoms?

Submitted by Ming on Fri, 03/04/2022 - 01:32

Hi. I have used LIGGGHTS to prepare a cube of compressed particles. I need to extract the local contact information such as contact normal, tangential force direction, to construct a four-rank tangent modulus for the granular system.

I am aware of the compute pair/gran/local command but the issue is that I can not use the variable to store the local information that needs further processing. So now I am trying to write my own compute to achieve this goal.

Another approach is to dump these data. But I am coupling LIGGGHTS with another code. It is better if I can get the tangent modulus directly without keeping reading a file during the simulation.

I know the neighbor list stored in the NeighList class, which allows me to get the contact list. However, I do not know how to access the contact force, between atom i and atom j, for example. Through compute_pair_gran_local.cpp, I identify PairGran::cpl_add_pair(LCM::SurfacesIntersectData & sidata, LCM::ForceData & i_forces) in pair_gran.cpp. But this function does not seem to be called in the program. I am totally lost. Please help me if possible. Thanks.

Ming | Fri, 03/04/2022 - 22:07

Hi Matt,
Thanks for your reply. I am sorry that I could not follow you (I am new to the LIGGGHTS source code).
My pursue is simple: for each contact, I want to obtain the corresponding forces. Do you have any suggestions about getting those?
When you mention cfd/couple, are you referring to the file fix_cfd_coupling.h? Can you elaborate a bit more on your idea of getting the local information?
Thanks for your help.

Ming | Sat, 03/05/2022 - 00:23

Hi Matt,
I got it. Thanks for the excellent suggestion.
Have a good weekend.