|
LAMMPS讲解50-纳米流体RNEMDS方法计算热导率和粘度建模方法和Green-Kubo方法一样,只是计算方法不一样。由于热导率和粘度计算过程不一样需要分开计算,但两个计算可以共享一个弛豫后的restart文件。RNEMDS方法的原理是将模拟盒子划分为偶数个薄层,然后人为的交换最中间的一层与最两边两层之间的速度,从而形成由中间流向两边的热流或动量流。通过交换速度的累积过程就能知道多少时间交换了多少能量或动量,除以交换累积时间和薄层面积再除以温度或速度梯度就能得到热导或粘度。 热导率计算 ######基本模拟规则设置######### units metal dimension 3 boundary p p p neighbor 3.0 bin neigh_modify delay 0 every 1 chech yes atom_style atomic pair_style hybrid sw eam lj/cut 10 #######定义几何模型########## read_data pre.data replicate 5 5 5 #利用复制命令建立更大的模型,具体模型多大需要经验。具体可以跑一下算例 ########定义物理模型############## pair_style * * sw NULL WT pair_style 1 1 eam Cu_u6.eam pair_style 1 2 lj/cut 0.006 3.0 #水和铜的参数,可以通过一些实验参数进行调节 #######定义分组信息######### group cu type 1 group wat type 2 #######弛豫部分####### timestep 0.002 thermo 1000 thermo_style custom step temp etotal press thermo_modify flush yes velocity all create 300 3265456 rot yes dist gaussian loop local dump 1 all custom 10000 dump.lammpstrj id type x y z fix fxnvt move nvt temp 300 300 0.2 run 1000000 write_restart restart.equ ######开始交换速度产生定常温度分布######### reset_timestep 0 unfix fxnvt fix fxnve all nve fix MP_T wat thermal/conductivity 10 z 200 #通过控制交换频率和每次交换的原子个数就能产生不同大小的热流以及温度分布 run 1000000 #重置 fix thermal/conductivity reset_timestep 0 unfix MP_T fix MP_T wat thermal/conductivity 10 z 200 compute layers_kappa all chunk/atom bin/1d z lower 0.005 units reduced fix ave_T all ave/chunk 1 1000000 1000000 layers_kappa temp file T.profile thermo_style custom step temp ke f_MP_T run 1000000 粘度计算 ######基本模拟规则设置######### units metal dimension 3 boundary p p p neighbor 3.0 bin neigh_modify delay 0 every 1 chech yes atom_style atomic pair_style hybrid sw eam lj/cut 10 #######定义几何模型########## read_data pre.data replicate 5 5 5 #利用复制命令建立更大的模型,具体模型多大需要经验。具体可以跑一下算例 ########定义物理模型############## pair_style * * sw NULL WT pair_style 1 1 eam Cu_u6.eam pair_style 1 2 lj/cut 0.006 3.0 #水和铜的参数,可以通过一些实验参数进行调节 #######定义分组信息######### group cu type 1 group wat type 2 #######弛豫部分####### timestep 0.002 thermo 1000 thermo_style custom step temp etotal press thermo_modify flush yes velocity all create 300 3265456 rot yes dist gaussian loop local dump 1 all custom 10000 dump.lammpstrj id type x y z fix fxnvt move nvt temp 300 300 0.2 run 1000000 write_restart restart.equ ######开始交换速度产生定常速度分布######### reset_timestep 0 unfix fxnvt fix fxnve all nve fix MP_V wat viscosity 10 x z 200 #通过控制交换频率和每次交换的原子个数就能产生不同大小的动量流以及速度分布 run 1000000 #重置 fix viscosity reset_timestep 0 unfix MP_V fix MP_V wat viscosity 10 x z 200 compute layers_eta all chunk/atom bin/1d z lower 0.005 units reduced fix ave_T all ave/chunk 1 1000000 1000000 layers_eta vx file vx.profile thermo_style custom step ke temp f_MP_V run 1000000
感谢鲍路瑶老师的分享,内容来自于鲍老师分享出来的资料 如有需要添加微信:lmp_zhushou 进入微信群,帮助他人,共建社区 获取完整版lammps讲义可以加微信lmp_zhushou或加入QQ群994359511 |