Error: Pair gran allows only own compute of type pair/local

Submitted by Rachel on Sun, 01/21/2018 - 20:17

Hi,

I am facing a problem about outputing the contact force of different particle groups. In my code, I first wrote:

1#: compute fc all pair/gran/local force id pos
2#: compute fcSparticle sparticle pair/gran/local force

where "sparticle" is a certain group name. However, the ERROR message shows: pair gran allows only one compute of type pair/local. I cannot figure out why one cannot use two compute pair/local?

After the above test, I deleted the 2# command and just use the 1# command. When I want to output the results, I used:

3#: dump fc sparticle local 1000 dump*.cforce c_fc[1] c_fc[2] c_fc[3]

I want to obtain the contact force in the group of sparticle. However, I found it outputed data of all particles, not only the sparticle group. How could this happen?

Could anyone please give me any clues about how to output the contact force of all particles and that in a certain determined group? Thanks ahead.

Best regards,
Rachel

arnom's picture

arnom | Mon, 01/22/2018 - 18:19

It has never been possible to use more than one compute of type pair/gran/local with LIGGGHTS. You would need to try and either only use your 2nd fcSparticle compute or find a way to remove the unwanted forces in your postprocessing.

Best,
Arno

DCS team member & LIGGGHTS(R) core developer

Rachel | Tue, 01/23/2018 - 04:10

Hi Arno,

Thanks for your suggestion. Yes, I think removing the unwanted forces in the output file is a good choice. As I know, I can output the ID of each particles so as to distinguish different groups of particles. However, I cannot figure out the ID rules of particles with different sizes. If I insert 100 particles based on number percent (10% bparticles, 90% sparticles), does it mean the ID from 1-10 will be the bparticles and the ID from 11-100 will be the sparticles? Any clues about this are greatly appreciated.

Regards,
Rachel

richti83's picture

richti83 | Tue, 01/23/2018 - 10:43

In fact compute pair/gran/local respects the group bit [1], but when you delete #2nd command you'll get fc for group all. To get only fc of group sparticle you should use the 2nd command but adapt the dump command to dump fc all local 1000 dump*.cforce c_fcSparticle[1] c_fcSparticle[2] c_fcSparticle[3] to access the result of #2nd compute.
To get the fc of particles NOT in group sparticle one could use a 3rd group group others subtract all sparticle and use this group for the compute pair/gran/local.
Due to the limitation that only one compute pair/gran/local is allowed this will require another run of the simulation.

[1] https://github.com/CFDEMproject/LIGGGHTS-PUBLIC/blob/master/src/compute_... line 424,425

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

Rachel | Wed, 01/24/2018 - 01:00

Hi,

Thanks very much for you kind suggestion. Yes I will try another run of the simulation so as to obtain the expected results. One more question, I am trying to output the force chain. I need the force chain to have different width based on the magnitude of contact force. Do you have any method about how to realize this force chain function? Thank you very much.

Best regards,
Rachel