# Thermal conductivity in Green-kubo method

Hello, everyone,

I’m new to lammps and trying to calculate the thermal conductivity of benzene. I got the result is close to experimental data. Since I used the Green-Kubo method (EMD), the temperature should keep in a small fluctuation range, but in my result , the temperature increased in the whole simulation, can anyone help me with that or give me any advices? Any help would be appreciated.

My input script is followed:

# settings

variable T equal 300
variable dt equal 1.0
variable V equal vol
variable p equal 2000 # correlation length
variable s equal 1 # sample interval
variable d equal \$p*\$s # dump interval

#convert from Lammps real units to SI

variable kB equal 1.3806504e-23 # [J/K] Boltzmann
variable kCal2J equal 4186.0/6.02214e23
variable A2m equal 1.0e-10
variable fs2s equal 1.0e-15
variable convert equal {kCal2J}*{kCal2J}/{fs2s}/{A2m}

# setup problem

units real
dimension 3
atom_style full

neighbor 2.0 bin
neigh_modify every 2 delay 0 check yes page 1000000

pair_style lj/charmm/coul/long 10.00 10.10
kspace_style pppm 1.0e-4
bond_style harmonic
angle_style charmm
dihedral_style charmm
improper_style cvff

atom_modify sort 0 0.0

# 1st equilibration run

fix 1 all nvt temp \$T \$T 1000
thermo 100
run 1000000

velocity all scale \$T

unfix 1

# thermal conductivity calculation

reset_timestep 0

compute myKE all ke/atom
compute myPE all pe/atom
compute myStress all stress/atom NULL virial
compute flux all heat/flux myKE myPE myStress
variable Jx equal c_flux[1]/vol
variable Jy equal c_flux[2]/vol
variable Jz equal c_flux[3]/vol

fix 1 all nve
fix JJ all ave/correlate \$s \$p d & c_flux[1] c_flux[2] c_flux[3] type auto & file profile.heatflux-run04 ave running dump 1 all xyz 1000 xyz.file variable scale equal {convert}/\${kB}/\$T/\$T/\$V*s*{dt}
variable k11 equal trap(f_JJ[3]){scale} variable k22 equal trap(f_JJ[4])*{scale}
variable k33 equal trap(f_JJ[5])
\${scale}

thermo \$d
thermo_style custom step temp v_Jx v_Jy v_Jz v_k11 v_k22 v_k33 density
timestep 1.0
run 10000000

variable k equal (v_k11+v_k22+v_k33)/3.0
variable ndens equal count(all)/vol
print “average conductivity: \$k[W/mK] @ T K, {ndens} /A^3”

Hi Chuanxing,

There is no thermostat in your production run!

Kasra.

Green-Kubo method does not need a thermostat.

Check your pressure and if it is large you may need an NPT run before the GK run.

Ray

Hi Chuanxing,

There is no thermostat in your production run!

Kasra.