Regarding the calculation of slip events in granular simulation

Dear all,

I am trying to calculate no of slip events in granular simulation. In order to do that I added some lines in the pair/gran model and also compute pair/gran/local. Like when ft>fn, slip=1. Now when I am trying to store this by adding a slipflag, it is giving zero. I must be doing some mistake. Can someone help me on that.

thanks a lot

Dear all,

I am trying to calculate no of slip events in granular simulation. In
order to do that I added some lines in the pair/gran model and also compute
pair/gran/local. Like when ft>fn, slip=1. Now when I am trying to store
this by adding a slipflag, it is giving zero. I must be doing some mistake.
Can someone help me on that.

your e-mail has the same problem as your code: it is giving zero
(information).

axel.

Dear Axel,

Here is the detailed information. when fs>fn I am doing the calculation. The quantity of interest is slipc,lred and slideloss (part of the code where I have added some lines in pair/gran/hooke/history

// energy loss from sliding or damping
if (fs > fn) {
if (shrmag != 0.0) {
fs1 = 0.8fn/fs;
fs2 = 0.8fn/fs;
fs3 = 0.8fn/fs;
shear[0] = -fs1/kt;
shear[1] = -fs2/kt;
shear[2] = -fs3/kt;
fs1l = fs1/0.8;
fs2l = fs2/0.8;
fs3l = fs3/0.8;
fslmag = sqrt(fs1lfs1l+fs2lfs2l+fs3lfs3l);
fsmag = sqrt(fs1
fs1 + fs2fs2 + fs3fs3);

lred = 0.25*sqrt(shear[0]shear[0] + shear[1]shear[1] + shear[2]shear[2]);
slideloss = 0.5
lred
(fsmag+fslmag);
slipc = fs1/fs1;
}
else fs1 = fs2 = fs3 = 0.0;
lred = 0.0
sqrt(shear[0]shear[0] + shear[1]shear[1] + shear[2]shear[2]);
slideloss = 0.0
lred
(fsmag+fslmag);
slipc = 0
fs1/fs1;

}
else
{
fs1 -= (gammatvtr1);
fs2 -= (gammat
vtr2);
fs3 -= (gammatvtr3);
lred = 0.0
sqrt(shear[0]shear[0] + shear[1]shear[1] + shear[2]shear[2]);
slideloss = 0.0
lred
(fsmag+fslmag);
slipc = 0
fs1/fs1;

}

fl1 = slipc;
fl2 = slideloss;
fl3 = lred;

then I am casting this into

if(cpl && addflag) cpl->add_pair(i,j,fx,fy,fz,fs1,fs2,fs3,fl1,fl2,fl3,deltan,tor1,tor2,tor3,shear);

and in the compute pair/gran/local

''else if (strcmp(arg[iarg],“forceloss”) == 0) flflag = 1;

nvalues = posflag6 + idflag3 + fflag3 + fsflag3 + flflag3 + deltanflag + tflag3 + hflag*dnum + aflag + hfflag;

if(flflag)
{
array[ipair][n++] = fl1;
array[ipair][n++] = fl2;
array[ipair][n++] = fl3;
}’’

These are the places where I have changed. I can succesfully dump deltan, fs1,fs2 and fs3 but not these ones. Can you please suggest where I am going wrong.

Dear Axel,

Here is the detailed information. when fs>fn I am doing the calculation.
The quantity of interest is slipc,lred and slideloss (part of the code
where I have added some lines in pair/gran/hooke/history

​there is not much detail here either. ​what you present is without
context, so it requires significant effort to recover that. there are no
file names, line numbers, LAMMPS version, nothing. just some code
fragments, where one has to guess what it is that you added.

// energy loss from sliding or damping
        if (fs > fn) {
            if (shrmag != 0.0) {
                fs1 *= 0.8*fn/fs;
                fs2 *= 0.8*fn/fs;
                fs3 *= 0.8*fn/fs;
        shear[0] = -fs1/kt;
                shear[1] = -fs2/kt;
                shear[2] = -fs3/kt;
                fs1l = fs1/0.8;
                fs2l = fs2/0.8;
                fs3l = fs3/0.8;
                fslmag = sqrt(fs1l*fs1l+fs2l*fs2l+fs3l*fs3l);
                fsmag = sqrt(fs1*fs1 + fs2*fs2 + fs3*fs3);

                lred = 0.25*sqrt(shear[0]*shear[0] + shear[1]*shear[1] +
shear[2]*shear[2]);
                slideloss = 0.5*lred*(fsmag+fslmag);
                slipc = fs1/fs1;
            }
            else fs1 = fs2 = fs3 = 0.0;
                lred = 0.0*sqrt(shear[0]*shear[0] + shear[1]*shear[1] +
shear[2]*shear[2]);
                slideloss = 0.0*lred*(fsmag+fslmag);
                slipc = 0*fs1/fs1;

        }
        else
        {
            fs1 -= (gammat*vtr1);
            fs2 -= (gammat*vtr2);
            fs3 -= (gammat*vtr3);
            lred = 0.0*sqrt(shear[0]*shear[0] + shear[1]*shear[1] +
shear[2]*shear[2]);
            slideloss = 0.0*lred*(fsmag+fslmag);
            slipc = 0*fs1/fs1;

        }

fl1 = slipc;
        fl2 = slideloss;
        fl3 = lred;

then I am casting this into
​ ​

if(cpl && addflag) cpl->add_pair(i,j,fx,fy,fz,fs1
,fs2,fs3,fl1,fl2,fl3,deltan,tor1,tor2,tor3,shear);

​i don't understand this line. where does this come from.​ there is no
"cpl" class reference in any pair style in LAMMPS, and neither a method
called add_pair().

and in the compute pair/gran/local

​there is no compute pair/gran/local in LAMMPS.​

are you by any chance using LIGGGHTS and not LAMMPS?
if yes, that you are posting to the wrong forum (and, of course, this would
be *another* major important piece of information you have omitted).

axel.

p.s.: i would consider changing your gmail user name. you have proven it to
be incorrect twice already. :wink: