I am trying to calculate thermal conductivity of a 9nm long, 5nm wide single layer graphene(thickness is 0.335nm) with G-K method in LAMMPS. I used “units metal” in the LAMMPS in file, and dumped the heat flux(generate with heat ) into a flux.txt file.

Then I calculated the TC with following procedure.

Since the unit of heat flux(usually ranges 50~100) in the flux.txt is (eV * Angstrom / ps), I should change it to SI units, which is scale = (1.6e-19 J * 1e-10m / 1e-12s = 1.6e-17 J*m/s). So J = J * scale;

Multiply time step 10, 20, … with simulation interval 0.0005e-12 s, so it turns into t = 0.005e-12s, 0.010e-12s …

Compute the auto-correlation function of J.

Use an exponential function <J(0)J(t)> = Aexp(B*t) to fit the auto-correlation function of J.

TC = (1/kb/V/T^2) * A/B, the unit of TC should be W/(mK), where kb = 1.38e-23J/K, V = 9e-95e-9*0.335e-9 m^3.

But the calculated TC is 1.52e8, which is much much large than normal values(1000~5000). I think there should be something wrong with the unit conversion in the procedure above. I do not know if have any misunderstanding in LAMMPS output. Did you encounter a similar problem as that? Thank you!

Related part in my in file is listed as following.

compute myKE all ke/atom
compute myPE all pe/atom
compute myStress all stress/atom virial
compute flux all heat/flux myKE myPE myStress
log flux.txt
variable J1 equal c_flux[1]
variable J2 equal c_flux[2]
thermo_style custom step temp v_J1 v_J2
thermo 10
run 4000000

a) the script on the compute heat/flux doc page for "real" units,
do you understand everything it does to get the right result
b) look at the "units" doc page to insure you are getting the
units of all metal quantities correct

a) the script on the compute heat/flux doc page for “real” units,
do you understand everything it does to get the right result
b) look at the “units” doc page to insure you are getting the
units of all metal quantities correct

Steve

Dear LAMMPS users and developers,

I am trying to calculate thermal conductivity of a 9nm long, 5nm wide single
layer graphene(thickness is 0.335nm) with G-K method in LAMMPS. I used
“units metal” in the LAMMPS in file, and dumped the heat flux(generate with
heat ) into a flux.txt file.

Then I calculated the TC with following procedure.

Since the unit of heat flux(usually ranges 50~100) in the flux.txt is (eV

Angstrom / ps), I should change it to SI units, which is scale = (1.6e-19
J * 1e-10m / 1e-12s = 1.6e-17 J*m/s). So J = J * scale;

Multiply time step 10, 20, … with simulation interval 0.0005e-12 s, so
it turns into t = 0.005e-12s, 0.010e-12s …

Compute the auto-correlation function of J.

Double check it.

Use an exponential function <J(0)J(t)> = Aexp(B*t) to fit the
auto-correlation function of J.

Did it fit well?

TC = (1/kb/V/T^2) * A/B, the unit of TC should be W/(mK), where kb =
1.38e-23J/K, V = 9e-95e-9*0.335e-9 m^3.

V should be a numerator, on the top.

But the calculated TC is 1.52e8, which is much much large than normal
values(1000~5000). I think there should be something wrong with the unit
conversion in the procedure above. I do not know if have any
misunderstanding in LAMMPS output. Did you encounter a similar problem as
that? Thank you!

Related part in my in file is listed as following.

compute myKE all ke/atom
compute myPE all pe/atom
compute myStress all stress/atom virial
compute flux all heat/flux myKE myPE myStress
log flux.txt
variable J1 equal c_flux[1]
variable J2 equal c_flux[2]
thermo_style custom step temp v_J1 v_J2
thermo 10
run 4000000

Best regards,

Yan

You can follow the example in the manual using trap() for integral.