24小时热门版块排行榜    

Znn3bq.jpeg
查看: 7598  |  回复: 13

zxzj05

荣誉版主 (著名写手)

[交流] 【转帖】热导率计算的in文件 已有12人参与

看到有不少人在找热导率计算方面的in文件,我就贡献三个in文件吧,仅供参考。

    同时,附件里贴出了我的计算结果。EMD的输出结果(compute heat/flux command+compute tc command的计算结果)中, “ac.dat”(见附件中的"ac.wmf")是热流自相关函数(我已经修改了compute_tc.cpp,目前输出的是normalized HCACF,但结果中给出的还是没有归一化的热流自相关函数,但形状和归一化的是一样的,请注意!)随m的变化,"tc.dat"(见附件中的"tc.wmf"是热导率随m的变化(m的涵义请参看热导率计算的Green Kubo离散化公式,见附件"Comparison of atomic-level simulation methods for computing thermal conductivity”中的(9)式),"tc_time.dat"(见附件中的"tc_time.wmf"是热导率随时间的变化;NEMD的结果中,"temp.profile"(见附件中的"temp_distribution.wmf"是z方向上的温度分布,"thermal_conductivity.dat“(见附件中的"NEMD.wmf"表示热导率随时间的变化,两者都包含了fix heat command 和fix thermal/conductivity command的计算结果。

1.用compute heat/flux command+compute tc command得到热流自相关函数和热导率(EMD方法)

# MD simulation of Ar thermal conductivity
# Initialization
units             lj
dimension         3
newton            on
boundary          p   p   p
atom_style        atomic
neighbor          0.3    bin
neigh_modify      check  yes
lattice           fcc   0.844
region            box  block -4  4  -4  4  -4  4  units lattice
create_box     1  box
create_atoms     1  box
mass      1  1.0
velocity          all  create  0.71 458127641 mom yes  rot yes dist gaussian units box
# LJ potential *********************************************************
pair_style        lj/cut 2.8
pair_coeff        1  1   1.0                  1.0                     #  LJ parameters for Ar-Ar
fix               temp all  temp/berendsen 0.71 0.71 0.000466
fix               nve  all  nve
thermo_style      custom step temp etotal vol
thermo_modify     lost warn
thermo            100
# Run

timestep          0.000466
run               200000
reset_timestep    0
# -------------- Flux calculation in nve ---------------
compute     myKE all ke/atom
compute     myPE all pe/atom
compute     myStress all stress/atom virial
variable          factor_ac equal 1.0
variable          factor_tc equal 1.3806504e-23*sqrt(1.67e-21/6.633e-26)/3.405e-10^2
compute      jflux all heat/flux myKE myPE myStress
compute           tc all tc c_thermo_temp c_jflux v_factor_ac v_factor_tc iso first 10000 900000 100000
fix               tc_out  all  ave/time  1  1  1  c_tc   file  tc_time.dat
thermo_style      custom  step  temp
restart           100000   restart.*            
run             1000000

2. 用fix thermal/conductivity command得到温度梯度,进而得到热导率(NEMD方法)

# MD simulation of Ar thermal conductivity
# Initialization
units             lj
dimension         3
newton            on
boundary          p   p   p
atom_style        atomic
neighbor          0.3    bin
neigh_modify      check  yes
lattice           fcc   0.844
region            box  block -4  4  -4  4  -4  4  units lattice
create_box     1  box
create_atoms     1  box
region            up1    block  INF INF  INF INF  -0.5  -0.25  units lattice
region            up2    block  INF INF  INF INF   0.5   0.75  units lattice
region            up  union 2 up1 up2
region            down1  block  INF INF  INF INF  -3.5  -3.25  units lattice
region            down2  block  INF INF  INF INF   3.5   3.75  units lattice
region            down union 2 down1 down2
mass      1  1.0

velocity          all  create  0.71 458127641 mom yes  rot yes dist gaussian units box
# Tersoff potential *********************************************************
pair_style        lj/cut 2.8
pair_coeff        1  1   1.0                  1.0                     #  LJ parameters for Ar-Ar
fix               temp all  temp/berendsen 0.71 0.71 0.0466
fix               nve  all  nve
compute           ke  all  ke/atom
variable          temp atom  c_ke/(1.5*1.0)
fix               temp_profile    all    ave/spatial  1  100000  100000  z  lower  0.25      v_temp  file  temp.profile    units  lattice
compute           up_temp    all  temp/region up
compute           down_temp  all  temp/region down
variable          delta_temp   equal  c_up_temp-c_down_temp
fix               delta_out  all  ave/time  1  100000  100000  v_delta_temp   file  delta_temp.dat
thermo_style      custom step temp etotal vol
thermo_modify     lost warn
thermo            100
# Run

timestep          0.000466
run               100001
unfix             temp
fix               heat_swap   all  thermal/conductivity  10  z  32
fix               e_exchange  all  ave/time  10  10000  100000  f_heat_swap  file  e_exchange.dat   
variable          thermal_conductivity equal f_e_exchange/(0.000466*10.0*4.0*f_delta_out)*1.3806504e-23/3.405e-10/3.405e-10*sqrt(1.67e-21/6.633e-26)*6.0/8.0

# 以上variable命令需要特别注意,因为我所模拟的系统,盒子边长Lx=Ly=Lz,热导率计算公式经过推导变成为e_exchange/(4.0*t*L*delta_T),
# 为了不在in文件里给L赋值,我修改了fix_thermal_conductivity.cpp文件(见附件),将e_exchange修改成了 e_exchange += force->mvv2e * (all[0].value - all[1].value) / (domain->zprd); 同时在end_of_step()
里添加了一句 “   e_exchange = 0.0;“,详见附件中的fix_thermal_conductivity.cpp,这样所得的e_exchange曲线基本上是一条水平曲线,而不是用原来的fix thermal/conductivity command所得到的斜向上的曲线,请注意!!!
# 所以才出现以上variable的表达式。
# 请看明白后再做计算,免得算出错误的结果!!!

fix               thermal_conductivity_out  all  ave/time  100000  1   100000  v_thermal_conductivity   file  thermal_conductivity.dat
                  
# Run
run               10000000

3. 用fix heat command建立温度梯度,进而得到热导率(NEMD方法)

# MD simulation of Ar thermal conductivity
# Initialization
units             lj
dimension         3
newton            on
boundary          p   p   p
atom_style        atomic
neighbor          0.3    bin
neigh_modify      check  yes
lattice           fcc   0.844
region            box  block -4  4  -4  4  -4  4  units lattice
create_box     1  box
create_atoms     1  box
region            up1    block  INF INF  INF INF  -0.5  -0.25  units lattice
region            up2    block  INF INF  INF INF   0.5   0.75  units lattice
region            up  union 2 up1 up2
region            down1  block  INF INF  INF INF  -3.5  -3.25  units lattice
region            down2  block  INF INF  INF INF   3.5   3.75  units lattice
region            down union 2 down1 down2
region            hot  block  INF INF  INF INF     0.0   0.25  units lattice
group             hot  region  hot
region            cold  block  INF INF  INF INF   -4.0  -3.75  units lattice
group             cold  region  cold
mass      1  1.0
mass0             6.633e-26
epsilon0          1.67e-21
sigma0            3.405e-10
velocity          all  create  0.71 458127641 mom yes  rot yes dist gaussian units box
# Tersoff potential *********************************************************
pair_style        lj/cut 2.8
pair_coeff        1  1   1.0                  1.0                     #  LJ parameters for Ar-Ar
fix               temp all  temp/berendsen 0.71 0.71 0.0466
fix               nve  all  nve
compute           ke  all  ke/atom
variable          temp atom  c_ke/(1.5*1.0)
fix               temp_profile    all    ave/spatial  1  100000  100000  z  lower  0.25      v_temp  file  temp.profile    units  lattice
compute           up_temp    all  temp/region up
compute           down_temp  all  temp/region down
variable          delta_temp   equal  c_up_temp-c_down_temp
fix               delta_out  all  ave/time  1  100000  100000  v_delta_temp   file  delta_temp.dat
thermo_style      custom step temp etotal vol
thermo_modify     lost warn
thermo            100
# Run

timestep          0.000466
run               100001
unfix             temp
fix               hot   all  heat  1   50   region hot
fix               cold  all  heat  1  -50   region cold
variable          thermal_conductivity equal 50.0*0.5*1.67e-21/3.405e-10/sqrt(6.633e-26/1.67e-21)/((4.0*8.0*8.0*8.0/0.844)^(1.0/3.0)*3.405e-10*2.0*f_delta_out*1.67e-21/1.3806504e-23)*6.0/8.0
fix               thermal_conductivity_out  all  ave/time  100000  1   100000  v_thermal_conductivity   file  thermal_conductivity.dat
                  
# Run
run               10000000



【转自】http://www.mdbbs.org/thread-26451-1-1.html
回复此楼
储氢家族欢迎储氢研究者!
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
回帖支持 ( 显示支持度最高的前 50 名 )

babaleo

木虫 (正式写手)


小木虫(金币+0.5):给个红包,谢谢回帖交流
只有其中一个,分享以下
5楼2011-01-17 10:12:19
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通回帖

c_friends

金虫 (小有名气)


小木虫(金币+0.5):给个红包,谢谢回帖交流
楼主转载最好把那个附件也转一下啊,我这里下载不了分子模拟论坛的附件。。期待ing。。。。
2楼2010-12-12 18:35:59
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zxzj05

荣誉版主 (著名写手)

不好意思,我在分子模拟论坛的账号没积分了。
储氢家族欢迎储氢研究者!
3楼2010-12-13 15:16:07
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

354895492

木虫 (正式写手)


小木虫(金币+0.5):给个红包,谢谢回帖交流
谢谢分享,不过要是附件也有就好了,我的分子模拟论坛也没金币了
4楼2010-12-20 22:19:54
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

WJ-MS

新虫 (小有名气)


小木虫: 金币+0.5, 给个红包,谢谢回帖
楼主第一种方法里面说的 compute tc命令是什么,我在manual里面找不到啊
加油!
6楼2013-05-27 09:25:48
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

某某人

铁虫 (初入文坛)


小木虫: 金币+0.5, 给个红包,谢谢回帖
引用回帖:
6楼: Originally posted by WJ-MS at 2013-05-27 09:25:48
楼主第一种方法里面说的 compute tc命令是什么,我在manual里面找不到啊

据我所知,这个命令是后来加上去的,之前我在manual里面也找不到,后来上谷歌上搜到了这个命令。
我想请问一下,这个方法你跑过没有?
7楼2013-05-27 14:09:47
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

WJ-MS

新虫 (小有名气)


小木虫: 金币+0.5, 给个红包,谢谢回帖
引用回帖:
7楼: Originally posted by 某某人 at 2013-05-27 14:09:47
据我所知,这个命令是后来加上去的,之前我在manual里面也找不到,后来上谷歌上搜到了这个命令。
我想请问一下,这个方法你跑过没有?...

我跑过了,manual不是有一个计算Ar的热导率的in文件么,我对应于我的体系做了修改,跑了一下,没有什么问题~~~那个in文件里面也没有用 compute tc命令啊,这个命令是干什么的~~~
加油!
8楼2013-05-28 08:32:49
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

灿烂的幸福

新虫 (小有名气)


小木虫: 金币+0.5, 给个红包,谢谢回帖
请问大神有没有QE关于热导率计算的in文件,谢谢!
青山依旧在,几度夕阳红
9楼2013-08-08 10:41:20
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

xiaohongxing

金虫 (正式写手)

多谢分享!
10楼2014-12-10 22:02:48
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 zxzj05 的主题更新
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考博] 申博/考博 +3 啃面包的小书虫 2026-04-17 4/200 2026-04-17 23:54 by 阳阳阳^_^
[考研] 260求调剂 +3 Zyt1314520.. 2026-04-17 4/200 2026-04-17 21:06 by Eurekall
[考研] 一志愿华中农业071010,320求调剂 +17 困困困困坤坤 2026-04-14 19/950 2026-04-17 20:08 by 关一盏灯cd
[考研] 一志愿中科大材料与化工,353分还有调剂学校吗 +10 否极泰来2026 2026-04-15 12/600 2026-04-17 17:54 by mapenggao
[考研] 295分求调剂 +5 ?要上岸? 2026-04-17 5/250 2026-04-17 16:51 by fenglj492
[考研] 322求调剂 +6 tekuzu 2026-04-17 6/300 2026-04-17 13:48 by Espannnnnol
[考研] 材料相关专业344求调剂双非工科学校或课题组 +23 hualkop 2026-04-12 25/1250 2026-04-16 22:12 by SUSE_CL
[考研] 279学硕食品专业求调剂院校 20+7 孤独的狼爱吃羊 2026-04-12 29/1450 2026-04-16 09:00 by screening
[考研] 通信工程求调剂!!! +6 zlb770521 2026-04-14 6/300 2026-04-15 20:00 by 学员JpLReM
[考研] 0854调剂 +13 长弓傲 2026-04-12 16/800 2026-04-15 13:45 by fenglj492
[考研] 各位老师好,求调剂,本科211,一志愿天津大学生物与医药学硕,差两名录取。 +11 路六六jjj 2026-04-13 11/550 2026-04-14 16:01 by zs92450
[考研] 366求调剂 +11 不知名的小卅 2026-04-11 11/550 2026-04-14 15:50 by zs92450
[考研] 求调剂 +12 何气正 2026-04-13 13/650 2026-04-14 14:47 by zs92450
[考研] 考研调剂 +13 长弓傲 2026-04-13 14/700 2026-04-14 14:44 by zs92450
[考研] 085600材料与化工349分求调剂 +16 李木子啊哈哈 2026-04-12 17/850 2026-04-14 09:11 by fenglj492
[考研] 求调剂,985材料与化工348分 +9 涵竹刘 2026-04-11 14/700 2026-04-13 22:26 by 涵竹刘
[考研] 339求调剂 +4 hanwudada 2026-04-12 4/200 2026-04-13 12:03 by 蓝云思雨
[考研] 344 材料专业 求调剂211 无地域要求 +8 hualkop 2026-04-11 8/400 2026-04-12 22:24 by fqwang
[考研] 调剂 +5 文道星台 2026-04-11 5/250 2026-04-11 15:01 by 凯凯要变帅
[考研] 求调剂 +3 胃痉挛累了 2026-04-11 5/250 2026-04-11 14:13 by luhong1990
信息提示
请填处理意见