计算bulk silicon 的热导率
fix NVT all nvt temp $T $T 0.01 drag 2
感觉是这一步设置的参数有问题,导致最后结果偏差太大 到了400多,改了好久一直算不出来,大家看看哪有问题
这是计算文件:
units metal
variable T equal 300
variable V equal vol
variable dt equal 0.004
variable p equal 200 # correlation length
variable s equal 10 # sample interval
variable d equal $p*$s # dump interval
# convert from LAMMPS metal units to SI
variable kB equal 1.3806504e-23 # Boltzmann
variable eV2J equal 1.60217646e-19
variable A2m equal 1.0e-10
variable ps2s equal 1.0e-12
variable convert equal ${eV2J}*${eV2J}/${ps2s}/${A2m}
# setup problem
dimension 3
boundary p p p
lattice diamond 5.43 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
region box block 0 21.72 0 21.72 0 21.72 units box
create_box 1 box
create_atoms 1 box
mass 1 28.085
pair_style sw
pair_coeff * * Si.sw Si
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 0.01 drag 2
run 1000000
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 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 ${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_style custom step temp v_Jx v_Jy v_Jz v_k11 v_k22 v_k33
run 1000000
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" 返回小木虫查看更多
nvt在抽样的时候,不要用drag,这个只是在弛豫过程中用
一次计算的结果不具有代表性,可能偏大,可能偏小。
你只跑了一次,产出时间为 1ns。
对于硅,总的产出时间要达到200 ns才能得到精确的结果。
可以参考我的文章:
https://arxiv.org/pdf/1503.06565.pdf
我看错了,你的产出时间是4ns。但这还是远远不够。
感谢大神指点
4ns我跑了1个多小时,200ns,我尽量试下,谢谢大神~
I do not mean run 200 ns in a single simulation. I mean run 50 4-ns-long simulations, each with a different velocity realization. Then, you can
average your results over the 50 realizations. If you have enough CPU cores, you can run the 50 simulations in parallel
,
原来是这样,谢谢大神