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(fs1fs1 + fs2fs2 + fs3fs3);
lred = 0.25*sqrt(shear[0]shear[0] + shear[1]shear[1] + shear[2]shear[2]);
slideloss = 0.5lred(fsmag+fslmag);
slipc = fs1/fs1;
}
else fs1 = fs2 = fs3 = 0.0;
lred = 0.0sqrt(shear[0]shear[0] + shear[1]shear[1] + shear[2]shear[2]);
slideloss = 0.0lred(fsmag+fslmag);
slipc = 0fs1/fs1;
}
else
{
fs1 -= (gammatvtr1);
fs2 -= (gammatvtr2);
fs3 -= (gammatvtr3);
lred = 0.0sqrt(shear[0]shear[0] + shear[1]shear[1] + shear[2]shear[2]);
slideloss = 0.0lred(fsmag+fslmag);
slipc = 0fs1/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.
