using local data as a variable

Submitted by mojgan on Sun, 02/03/2013 - 22:07

Hi,
I am a new user of Liggghts and have some problem. I am trying to use compute pair/gran/local command for calculating the contact force of grains. I know that this compute calculates a local array which can not be used as a variable.
1. how can I perform some math operators and functions on specific columns of this local array (for example use ^ or * and then calculate the sum of all the vector elements)?
2. in its doc it is mentioned that "The output force and torque are the contact force and the torque divided by the particle diameter", why is it so and if that's true do I have to correct it for changing the values to the exact contact force?

thank you in advance
mojgan

ckloss's picture

ckloss | Wed, 02/06/2013 - 09:07

Hi mojgan,

I just saw that there is a typo in the doc. It should read
"The output force and torque are the contact force and the torque divided by the particle RADIUS"
Thanks for bringing this up, I'll fix that for the next release. Regarding your questions:

1) it should work to use the local array in variables. However, you can also do post-processing with your own tools of course
2) the force is output dirctly, the torque is divided by the radius. The reason for dividing torque by radius is that otherwise you would have to output two torwues per contact
Cheers
Christoph

mojgan | Wed, 02/06/2013 - 22:59

Hi christoph,
thank you so much for your reply,
the second point solved my problem. but for the first one I have used these calculated contact forces to define a variable and encountered an error. It is mentioned in the variable doc that just global and per-atom values can be used to set a variable. If that is not true please help me.
furthermore, I need these contact forces for checking the quasi-static condition (out-of-balanced forces) through a loop in the script. It obviously can be solved by a write_restart and read_restart. using liggghts version 2.2 leads in an error in reading mesh. I do update with "git reset --hard ae841c27a92c3a389d9333b27798201cdc4368df" successfully but running takes place by 2.2.. as I am not so familliar with linux, would you please help me solve the problem? Is there anything that I should consider?
sorry for too many questions,

thanks a lot
mojgan

mojgan | Thu, 02/07/2013 - 00:05

dear christoph,
I have successfully updated and run liggghts-public 2.2.4.. the problem was a mistake (so sorry).
but I am still looking forward to your reply about local variables and/or unbalanced-force.

cheers
mojgan