Calculation of Force

Dear all

I have two questions about calculation of forces of a system.

1- What is the differences between compute reduce sum and variable fcm in a case that there is just one group of atoms? For example suppose a simple block of atoms which is under pressure. If I calculate the forces of these atoms using these two commands, their results are totally different.

2- My second question might be from my lack of knowledge in this field. In order to find Fx I can use Pxx*(Ly*Lz). However, this value is far from the summation of forces of atoms in direction x. Shouldn’t they be the same? Or there is some way to calculate one from the other? Or maybe these two are completely non-related to each other!?

Thank you in advance for your help.

PS. I put a simple input code here.

Hi,

second and third columns in output are identical on my machine, so I don't see why you say that the results for fcm and reduce sum fx are different.

Normal component of pressure multiplied by the area of one face of the box is the force applied to that face, not to the center of mass. Consider an imaginary cube deep in water - the pressure is non-zero, but the net force applied to the center of mass is 0 (as it is effectively in your case). Forces applied to opposite faces eliminate each other.

Regards,
Oleg

12.12.2013, 16:48, "S.Solhjoo" <[email protected]...>:

Thank you Oleg,

I’m using LAMMPS 32-bit 2013.10.31, and it that, the results are not even close to each other. I will try to use another recent version (but I’m not sure if I can. Because I want to work with some restart files which most of times are just compatible with one version).

Your explanation for the second question is completely correct. So, is there any way to calculate this external force from the atoms inside the box (or maybe atoms on the surface)? The whole point is about something completely different. I want to calculate the coefficient of friction (COF) between two surfaces during sliding and I don’t want to add some force in some boundary atoms, but I want to apply some external pressure. Then one boundary layer will slide (by a constant speed) which will case a movement in, say upper part of the system. In order to calculate COF=Fx/Fz and these two forces are external forces. I’ve seen some works which obviously applied compute group/group to find these two forces. So, they were checking just the pairwise part of the potential and not the external force. I’m not sure if I’m on the right track or I’m missing some (maybe obvious) point!

Kind regards,
Soheil

Thank you Oleg,

I'm using LAMMPS 32-bit 2013.10.31, and it that, the results are not even
close to each other. I will try to use another recent version (but I'm not
sure if I can. Because I want to work with some restart files which most of
times are just compatible with one version).

please note that you can always convert restarts to data files, which
*are* portable.

axel.

Thank you Axel for this good news.

Dear Soheil,

I think you can use compute group/group, and that's why. The external force Fz applied to one of the groups is analogous to the external gravity force acting on a body placed on a table. But the table will act on the body with the reaction force caused by the interaction of its particles with body particles (internal forces), and this is the reaction force needed to calculate COF. So I think the external force Fz will be part of the quantity calculated by compute group/group because of the Newton's 3rd law.

Hope I expressed the idea clear enough.

Oleg

12.12.2013, 17:52, "S.Solhjoo" <[email protected]...>:

Thank you Oleg,

With your clear explanation, now I’m working with group/group. However, I think there is something missing.
What if there is a perturbation on the interface (because of temperature or roughness)? I mean maybe some atoms from group 1 go to group 2. If the interface is sharp and atoms of both groups are built from the same element, there might be a solution to overcome this problem using LAMMPS. But the problem could be exactly in opposite (rough surfaces, different elements). So, some atoms go to another group and move with them but group/group still count them by their original group.

Soheil

Groups are static in LAMMPS.

Steve