模拟小窝

 找回密码
 立即注册
搜索
热搜: 安装 LAMMPS 图书
查看: 212|回复: 0
打印 上一主题 下一主题

[求助] NEMD计算界面热阻时热源热汇热流混乱

[复制链接]

2

主题

2

帖子

10

积分

新手上路

Rank: 1

积分
10
跳转到指定楼层
楼主
发表于 2024-4-25 10:08:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我在用NEMD计算Cu/diamond界面热导时,遇到了用Langevin热浴控温的情况下冷热源热流混乱的问题,具体情况是统计结果中热源的f_hot值时正时负其绝对值的大小在整体上也不是增大的,f_cold也出现了类似的情况,不知具体原因出在哪里,望解惑。
#Cu-diamond界面热阻
#---------initialization---------
units                 metal
dimension             3
boundary              p p s
atom_style            atomic
#构建模型
lattice                fcc 3.61                                                      
region                 box block 0 36 0 36  0 140 units box      
create_box             2 box                                                         
create_atoms           1 box                                                         
region                 cu_del block INF INF INF INF 70 140 units box      
delete_atoms           region cu_del                                             
lattice                diamond 3.57
region                 dia block INF INF INF INF 70 140 units box        
create_atoms           2 region dia     
#设定原子质量
mass                   1 63.5                             
mass                   2 12.011  
#--------force-field------------
neighbor                  0.3 bin
neigh_modify          delay 0
pair_style             hybrid/overlay morse 10.0 eam tersoff
pair_coeff             1 1 eam Cu_u3.eam
pair_coeff             * * tersoff c.tersoff NULL C
pair_coeff             1 2 morse 0.087 51.4 0.205
#####  setting some important variables
timestep              0.0001
variable             Time equal  step*dt/1000 #time in picoseconds
####                        定义热源和热汇
velocity             all  create 300 123456
# ----------------- Minimization-----------------
min_style           cg
min_modify          dmax 0.4
minimize            1e-15 1e-15 5000 5000
reset_timestep      0

#------------------NVT -equilibrium-run-----------
fix                1 all nvt temp 300 300 0.01
thermo_style       custom step v_Time temp press vol etotal ke pe evdwl
thermo             10000
dump               1 all custom 10000 nvt.xyz id type x y z vx vy vz
run                500000
unfix              1
undump             1
reset_timestep     0
write_data         nvt.data
write_restart      nvt.restart
velocity           all scale 300
#------------------set -equilibrium-run-----------
region             setl block INF INF INF INF 0 5 units box
region             setr block INF INF INF INF 135 140 units box
group              setl region setl
group              setr region setr
group              set2  union setl setr
velocity           set2  set 0.0 0.0 0.0
fix                2    set2 nve
fix                set  set2 setforce 0.0 0.0 0.0
region             hot  block INF INF INF INF 5 15 units box
region             cold block INF INF INF INF 125 135 units box
group              hot  region hot
group              cold region cold
compute            Thot  all temp/region hot
compute            Tcold all temp/region cold
#------------------NVE ---消除内应力---run-----------
fix                           1 all nve
fix                hot  all langevin 320 320 0.01 59804 tally yes
fix                cold all langevin 280 280 0.01 287859 tally yes
fix_modify         hot  temp Thot
fix_modify         cold temp Tcold
variable           tdiff equal c_Thot-c_Tcold
thermo_style       custom step temp press vol etotal ke pe evdwl c_Thot c_Tcold f_hot f_cold v_tdiff
thermo             10000
dump               1 all custom 10000 nve.xyz id type x y z vx vy vz
run                500000
undump             1
reset_timestep     0
write_data         nve.data
write_restart      nve.restart
velocity           all scale 300


#---------------set
region            cu block INF INF INF INF 20 70 units box
region            c block INF INF INF INF 70 120 units box
group             cu region cu
group             c region c
region            set3 block INF INF INF INF 0 5 units box  
region            setr1 block INF INF INF INF 135 140 units box
group             set3 region set3
group             setr1 region setr1
group             set4  union set3 setr1
region            hot1  block INF INF INF INF 5 15 units box
region            cold1 block INF INF INF INF 125 135 units box
group             hot1  region hot1
group             cold1 region cold1
compute           Thot1  all temp/region hot1
compute           Tcold1 all temp/region cold1

velocity          set4  set 0.0 0.0 0.0
fix               6    set4 nve
fix               set4  set4 setforce 0.0 0.0 0.0
dump              222222 cu custom 100 cu.txt id type  vx vy vz
dump              2222222 c custom 100 c.txt id type  vx vy vz
dump_modify       222222 sort id
dump_modify       2222222 sort id
# thermal conductivity calculation
# reset langevin thermostats to zero energy accumulation

variable          kB equal 8.625e-5
compute                      ke all ke/atom
variable              temp atom  c_ke/1.5/${kB}

fix               hot1 all langevin 320 320 0.01  59804 tally yes
fix               cold1 all langevin 280 280 0.01 287859 tally yes
fix_modify        hot1 temp Thot1
fix_modify        cold1 temp Tcold1
dump              3 all custom 10000 all.xyz id type x y z v_temp
variable          tdiff equal c_Thot1-c_Tcold1
fix               ave all ave/time 10 1000 10000 v_tdiff ave running
thermo_style      custom step temp press vol etotal ke pe ebond eangle edihed evdwl c_Thot1 c_Tcold1 f_hot1 f_cold1 v_tdiff f_ave


compute           layers all chunk/atom bin/1d z lower 0.025 units reduced
fix                          7 all ave/chunk 10 100000 1000000 layers v_temp file Neverybin_Temperature.langevin

run               3000000

write_data        end.final
复制代码

f-hot               f-cold
-568.30504     -94.180839  
-568.051       -78.464781  
-583.88286     -86.339358  
-586.8954      -105.70125  
-593.43634     -97.459747  
-579.21361     -75.545231  
-612.91888     -53.34412   
-593.82615     -65.126996  
-623.3003      -73.650208  
-616.00129     -45.101005  
-618.09516     -21.371068  
-619.10842      14.303784  
-634.00586      34.642138  
-638.64981      33.05171   
-670.36436      34.134725  
-662.22639      5.3947628  
-666.55279      12.96901   
-655.40438      12.767413  
-666.73252      19.760821  
-646.3159       13.897606  
-670.11289     -2.4970531  
-670.7554       31.797634  
-662.75966      7.1269273  
-647.2629       7.1007601  
-659.39604      7.9447331  
-670.49816      18.02318   
-704.79299      3.6101108  
-717.4315      -9.5525933  
-729.90736      21.376185  
-741.92049      34.803272  
-736.82544      46.193214  
-740.20196      44.24079   
-745.5525       42.889192  
-733.59161      20.63628   
-742.09114      20.201164  
-744.53075      24.651767  
-751.04477      31.854822  
-746.36368      29.3094   
-741.44953      32.609093  
-779.79077      72.539988  
-779.05585      78.9827   
-763.47115      59.227065  
-744.87126      42.506457  
-764.06062      52.460697  
-754.9076       54.243558  
-736.18048      57.316299  
-755.43723      53.52291   
-770.6763       37.843198  
-758.99704      57.618414  
-726.9475       60.329533  
-730.1936       43.208399  
-711.61379      24.015325  
-690.99606      7.0026592  
-668.94097     -25.561289  
-643.71226     -24.755719  
-626.96264     -22.908444  
-641.62613      8.041175   
-657.6056       22.463688  
-628.14705      23.306082  
-646.89974      24.06508   
-647.89527     -1.6386941  
-647.57656      5.5054592  
-658.73608     -20.851271  
-672.56568     -5.8100856  
-672.65314     -29.40876   
-671.49975     -48.046919  
-669.30738     -80.126179  
-703.37281     -87.082943  
-717.54103     -61.497585  
-722.47226     -65.632224  
-711.22972     -44.63841   
-687.97712     -34.497536  
-707.78291     -20.645773  
-702.20101     -22.091388  
-696.58318      5.0386221  
-693.21956      21.621586  
-670.91068      39.449354  
-666.52116      44.401228  
-662.50799      38.394672  
-632.50613      26.760133  
-680.49279     -6.4437646  
-697.99459      19.063469  
-699.17931      5.2935173  
-702.89869      4.3267366  
-713.87991      24.990274  
-720.90378      33.136933  
-721.09722      13.26492   
-723.19432     -18.519515  
-741.79521      16.69103   
-748.39912      3.2122802  
-754.96702      22.701424  
-769.18617      24.818574  
-775.19401      18.983579  
-748.98009     -4.2572607  
-751.63329     -3.8465054  
-754.927        10.129548  
-753.83352      26.74028   
-781.42654      34.901002  
-779.36339      48.580459  
-762.43895      37.339742  
-751.281        34.185583  
-737.64818     -1.4831628  
-701.37543     -10.664913  
-715.74495     -16.146413  
-726.71863      62.743619  
-714.90315     -3.0628239  
-727.0102      -22.803322  
-742.08857     -24.318212  
-730.3515      -32.306943  
-729.81537     -36.112058  
-743.11223     -37.703881  
-761.34979     -65.272838  
-729.39457     -62.615528  
-712.4188      -63.293208  
-742.41166     -72.254729  
-743.38214     -68.740967  
-749.46445     -83.952821  
-738.68843     -80.90812   
-731.33069     -73.07387   
-716.59013     -97.288789  
-740.15585     -86.260003
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|SimulationWorld ( 苏ICP备18052543号-1

GMT+8, 2024-5-20 06:58 , Processed in 0.052047 second(s), 22 queries .

Powered by Discuz!

快速回复 返回顶部 返回列表