Dear all:

In the manual, there is an example LAMMPS input script for solid Ar-----utilizing compute heat/flux command to calculate average thermal conductivity. I make some modification to simulate iron’s thermal conductivity. But the result puzzled me. Besides some necessary modification, I only amend the N of “run N” command, nevertheless the results were vastly different.

So I write to ask for some help. Is it correct what I have modified or the example input script couldn’t be use like this? Or why in the same temperature, the results is so different?

The result of the first attachment is 124.5W/K*m, the second is 2715W/K*m, the third is 4545W/K*m*

the input script:

atom_style atomic

units metal

variable kB equal 1.3806504e-23 # [J/K] Boltzmann

variable kCal2J equal 4186.0/6.02214e23

variable T equal 300

variable V equal vol

variable dt equal 0.0001

variable p equal 200 # correlation length

variable s equal 10 # sample interval

variable d equal $p$s # dump interval

# ---------------------------------------------------------

dimension 3

boundary p p p

lattice fcc 2.87 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1

region box block 0 4 0 4 0 4

create_box 1 box

create_atoms 1 box

mass 1 55.85

pair_style eam

pair_coeff * * Fe_2.eam

timestep ${dt}

thermo $d

# ------------- equilibration and thermalization ----------------

velocity all create $T 102486 mom yes rot yes dist gaussian

fix NVT all nvt temp $T $T 10 drag 0.2

run N

# -------------- flux calculation ---------------

reset_timestep 0

compute myKE all ke/atom

compute myPE all pe/atom

compute myStress all stress/atom 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 JJ all ave/correlate $s $p d c_flux[1] c_flux[2] c_flux[3] type auto file J0Jt.dat ave running
variable scale equal {kCal2J}*{kCal2J}/{kB}/$T/$T/$V*s*{dt}*1.0e25*

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_style custom step temp v_Jx v_Jy v_Jz v_k11 v_k22 v_k33

run N’

variable k equal (v_k11+v_k22+v_k33)/3.0

print “average conductivity: $k [W/mK]”

in.tc（1） (1.68 KB)

in.tc（2） (1.68 KB)

in.tc（3） (1.68 KB)

Dear all:

In the manual, there is an example LAMMPS input script for solid Ar-----utilizing compute heat/flux command to calculate average thermal conductivity. I make some modification to simulate iron’s thermal conductivity. But the result puzzled me. Besides some necessary modification, I only amend the N of “run N” command, nevertheless the results were vastly different.

So I write to ask for some help. Is it correct what I have modified or the example input script couldn’t be use like this? Or why in the same temperature, the results is so different?

The result of the first attachment is 124.5W/K*m, the second is 2715W/K*m, the third is 4545W/K*m.*

Maosheng

the input script:

atom_style atomic

units metal

variable kB equal 1.3806504e-23 # [J/K] Boltzmann

variable kCal2J equal 4186.0/6.02214e23

variable T equal 300

variable V equal vol

variable dt equal 0.0001

variable p equal 200 # correlation length

variable s equal 10 # sample interval

variable d equal $p$s # dump interval

# ---------------------------------------------------------

dimension 3

boundary p p p

lattice fcc 2.87 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1

region box block 0 4 0 4 0 4

create_box 1 box

create_atoms 1 box

mass 1 55.85

pair_style eam

pair_coeff * * Fe_2.eam

timestep ${dt}

thermo $d

# ------------- equilibration and thermalization ----------------

velocity all create $T 102486 mom yes rot yes dist gaussian

fix NVT all nvt temp $T $T 10 drag 0.2

run N

# -------------- flux calculation ---------------

reset_timestep 0

compute myKE all ke/atom

compute myPE all pe/atom

compute myStress all stress/atom 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 JJ all ave/correlate $s $p d c_flux[1] c_flux[2] c_flux[3] type auto file J0Jt.dat ave running
variable scale equal {kCal2J}*{kCal2J}/{kB}/$T/$T/$V*s*{dt}*1.0e25*

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_style custom step temp v_Jx v_Jy v_Jz v_k11 v_k22 v_k33

run N’

variable k equal (v_k11+v_k22+v_k33)/3.0

print “average conductivity: $k [W/mK]”

in.tc（1） (1.68 KB)

in.tc（2） (1.68 KB)

in.tc（3） (1.68 KB)

Mail list readers (like me) generally don't have

time to read thru complicated scripts to figure

out what you are doing or what might be going wrong.

You need to post a more specific question. Someone

familiar with thermal conductiity may want to comment

on whether you can use this technique for Fe, since

the thermal conductivity of metals presumably depends

on electronic contributions.

Steve

Dear all:

In the manual, there is an example LAMMPS input script for solid

Ar-----utilizing compute heat/flux command to calculate average thermal

conductivity. I make some modification to simulate iron's thermal

conductivity. But the result puzzled me. Besides some necessary

modification, I only amend the N of "run N" command, nevertheless the

results were vastly different.

So I write to ask for some help. Is it correct what I have modified or

the example input script couldn't be use like this? Or why in the same

temperature, the results is so different?

if you run for different length and get different results, then

this is often an indication that your results are not converged

within the time you simulate and/or the size of the system you

are looking at. increasing the values of N in a systematic

way, should have them converge at some point. you can also

break down longer trajectories into chunks and analyse them

independently to get a feeling for how large fluctuations you

get on your results.

cheers,

axel.