计算化学公社
标题:
lammps案例中用GreenKubo公式计算导热系数的方法,输入文件为何将体积放在分母上
[打印本页]
作者Author:
Poly_Maohua
时间:
2022-12-29 10:40
标题:
lammps案例中用GreenKubo公式计算导热系数的方法,输入文件为何将体积放在分母上
本帖最后由 Poly_Maohua 于 2022-12-29 10:45 编辑
请问各位老师,
lammps利用GreenKubo方法计算导热系数的案例,输入文件如下
# Sample LAMMPS input script for thermal conductivity of solid Ar
units
real
variable
T
equal
70
variable
V
equal
vol
variable
dt
equal
4.0
variable
p
equal
200
# correlation length
variable
s
equal
10
# 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
dimension
3
boundary
p
p
p
lattice
fcc
5.376
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
c
reate_atoms
1
box
mass
1
39.948
pair_style
lj
/
cut
13.0
pair_coeff
*
*
0.2381
3.405
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
8000
# thermal conductivity calculation, switch to NVE if desired
#unfix NVT
#fix NVE all nve
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
100000
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"
我的问题是,在划线的一行,为什么体积V是在分母上呢?无论是根据Lammps官网,还是文献,这个体积都应该在分子上。
我猜想可能是哪个参数包含了V,这里要把多乘的体积除去,但是又不知道具体是为什么。能不能麻烦老师们帮我解答一下?非常感谢
作者Author:
Poly_Maohua
时间:
2022-12-31 17:43
我想自己頂一下。。。請教一下上面這個問題
作者Author:
Jiya_abbc
时间:
2025-1-7 11:56
想必这个问题楼主已经解决了,最近刚入手学习做分子动力学模拟,这个体积V应该是热流J(t)的计算公式里有V,但Lammps计算热流的过程实际没有计算V,而是放在了后面划线这一步计算,所以分母出现V平方和原有分子上的V约去后剩下一个V在分母上。但最近一直有个疑问困扰我,单位转换计算convert的公式为什么是${kCal2J}*${kCal2J}/${fs2s}/${A2m}这样呢,时间项为什么在分母,而且分母上是V, 长度单位转换不应该出现三次方出现吗?按照我的理解,我觉得convert公式应该这样,convert equal ${kCal_to_J}*${kCal_to_J}*${fs_to_s}/${A_to_m}/${A_to_m}/${A_to_m},但我看到很多地方的公式都是前者,不明白是我哪里理解的有问题,希望楼主看到回复,也求路过的大神或者老师们赐教,感谢感谢
欢迎光临 计算化学公社 (http://ccc.keinsci.com/)
Powered by Discuz! X3.3