Different forces from particles dump and computed from contacts dump

Submitted by iluvatar on Thu, 04/09/2020 - 23:41

Hello,
I need to compute some parameter that relates the forces on particles to the force on contacts. I assumed that if particle i have n contacts, by adding up the forces at each contact I will recover the total force on the particle (without external forces). Unfortunately, that does not seem to be the case.

To get a MWE, I slightly modified the packing example (script attached), to compute the contacts info and to dump id fx fy fz (for particles) and id1 id2 fx fy fz (for contacts). As an example, at time step 68000, I get some dumps for both contacts and particles. I extract here the data for particle 8 (2 contacts) and 33 (1 contact) as example:

# particles dump
8 -0.0352053 0.0199142 -0.0296188
33 0.00313615 0.00189959 -0.00814605

# contacts dump
8 14 -0.235279 0.0574739 0.123451
25 8 -0.0521209 -0.0593388 0.0305788
33 2 0.00313536 0.00189909 -0.00814435

As you can see, when only one contact exists (like for particle 33), the contact forces and the particle forces are close (with differences that start at the fourth significant figure). AND, for particle 8, with two contacts, there is no clear way to get the particle force from the contact forces.

My question is : is there a way to compute the particle forces only from the contact forces? what is my mistake here? I used periodic boundary conditions to avoid contacts with primitive walls that cannot be counted.

Thanks in advance

EDIT: Typo and moved to right forum

AttachmentSize
Plain text icon in-packing.txt3.68 KB