Hi,
I am trying to calculate thermal conductivity using Muller-Plathe method implemented in Lammps. My script is given below. Thermal conductivity can be calculated as
Thermal_conductivity(K)=-Heat_Flux/Temp_Gradient
With my script I can get the temperature gradient (delta_T/delta_Z). But how should I get Heat_Flux? Any help will be highly appreciated.
#3-D Carbon Nanotubes
dimension 3
boundary p p p
units metal
atom_style atomic
newton on
read_data CNTCord.xyz
# Potential
pair_style airebo 3.0 1 0
pair_coeff * * CH.airebo C
kspace_style none
mass 1 12.0
neighbor 2.0 bin
velocity all create 300 6549325
# Equilibrate in NVT with Langevin thermostat
fix 1 all nvt 300 300 100
fix 2 all langevin 300 300 0.2 654678
thermo 10
run 2000
reset_timestep 0
# Computing thermal conductivity using Muller-Plathe alogorithm
unfix 1 # remove NVT
unfix 2 # remove Langevin
fix 3 all nve
thermo 10
run 1000
reset_timestep 0
fix 4 all thermal/conductivity 100 z 20 swap 100
compute ke all ke/atom
variable temp atom c_ke[]/(1.5*8.617e-5)
fix 5 all ave/spatial 10 100 1000 z lower 0.05 v_temp file tmp.profile units reduced
dump mydump all atom 100 dump.lammpstrj
run 100000