Hello all,

I am using GK algorithm to calculate the thermal conductivity of a polymer melt system. I would like to separate the different contributions to thermal conductivity (ke, pe, and stress) as given by the expression in the lammps documentation page. To my surprise, I find that the sum of the contributions is not equal to the total. I went back to the example given for Argon and found the same issue. Here is a summary of what I have done:

- Created “0” computes for ke, pe and stress using and empty group (myKE, … are computed for all atoms):

group empty type 9999

compute zKE empty ke/atom

compute zPE empty pe/atom improper

compute zStress empty stress/atom NULL virial

- Use those to compute kinetic, potential and stress fluxes:

compute flux all heat/flux myKE myPE myStress

compute Kflux all heat/flux myKE zPE zStress

compute Pflux all heat/flux zKE myPE zStress

compute Sflux all heat/flux zKE zPE myStress

- Use those to calculate the heat fluxes and autocorrelation funtions

variable Jx equal c_flux[1]/vo

…

variable KJx equal c_Kflux[1]/vol

…

fix KJJ all ave/correlate $s $p $d &

c_Kflux[1] c_Kflux[2] c_Kflux[3] type auto file KJ0Jt.dat ave running

…

- Use trap to calculate the thermal conductivities:

variable Kk11 equal trap(f_KJJ[3])*${scale}

I find that Jx, KJx, PJx and SJx (the y and z components as well) add up correctly (Jx-KJx -PJx -SJx ~ 1E-13), however the autocorrelation function and the thermal conductivities differ by more (i.e. k11 -Kk11 -Pk11 -Sk11 ~ 0.5E-2, which is significant given that k ~0.35)

Is there any reason why the components should not add up? I am missing some subtlety with the fix ave/correlate? If so how do I adjust it to get the correct contributions to TC?

Thank you in advance for your help!

David