contact/atom

Submitted by abdulrahmanalharbi on Mon, 01/19/2015 - 17:02

Hi all,

I am trying to calculate the total number of contacts.
In my simulation, I used( compute contact/atom command) to calculate the number of contacts. Then, I used (fix print command )to store all the data in order to sum all the numbers and get the total number of contacts.

variable C1 equal c_NOC
fix cont all print 10 "${C1}" file contact.txt screen no
compute NOC gr contact/atom

From watching my simulation running in Paraview, there were only 4 contacts between the two balls. However,from print command, when I added all numbers that I got in text file(contact) , it showed that there are 17 contacts .

I found out that in :
fix ID group-ID print N string keyword value .......
each time I changed N (N = print every N steps) and then added all numbers (results), I got different total number of contacts.

N=20 ----- total number of contacts for one ball=8
N=10 ----- total number of contacts for one ball=17

My question is:
How can I get the exact total numbers of contacts to my simulation?

Please find attached input script and contact txt

Many thanks,
Abdul

AttachmentSize
Plain text icon contact.txt58.63 KB
Plain text icon input_script.txt1.44 KB

JoshuaP | Tue, 01/20/2015 - 10:18

I never tried the fix print command but maybe try this
fix myID all ave/time 1 1000 1000 c_NOC file results.txt

It averages the values of 1000 steps. I hope that helps.

regards
Joshua

abdulrahmanalharbi | Tue, 01/20/2015 - 20:05

Hi Joshua ,
thank you.

I have tried ............fix myID all ave/time 1 1000 1000 c_NOC file results.txt
this command will give the average while I need the exact number.

Many thanks,
Abdul

richti83's picture

richti83 | Wed, 01/21/2015 - 21:24

I think the exact number is outputted when you set every to N; Nrepeat to 1; and Nfreq to N. Where N defines every step the value is written.

For example, [...] Nrepeat=1 and Nfreq = 100, then no time averaging is done; values are simply generated on timesteps 100,200,etc.

(hidden in the manual)

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact