详细内容

LAMMPS讲解41-氯化钠NaCl熔盐粘度和扩散系数模拟

本例发布氯化钠NaCl熔盐粘度和扩散系数模拟。力场参数取自文献Solid–solid phase equilibria in the NaCl-KCl system。粘度通过Green-Kubo关系计算,还可以通过其他方法获得更为准确的粘度。扩散系数通过均方位移计算。在本例in文件的基础上还可以计算热导率,RDF等其他参数。

image.png

image.png

image.png

image.png

image.png

in文件

 

 

units real

dimension 3

boundary p p p

neighbor 3.0 bin

neigh_modify every 1 delay 0 check yes

atom_style charge

pair_style born/coul/long 10.0 8.0

kspace_style pppm 10e-4

 

region box block -40 40 -40 40 -40 40 units box

create_box 2 box

 

lattice sc 4

region part1 block -40 40 -40 40 -40 -4.0 units box

create_atoms 1 region part1

 

lattice sc 4

region part2 block -40 40 -40 40 0.0 40 units box

create_atoms 2 region part2

#Na = 1 Cl = 2

 

pair_coeff 1 1 6.0772 0.3167 2.340 24.164 11.5076

pair_coeff 1 2 4.8617 0.3167 2.755 161.1 199.93

pair_coeff 2 2 3.6462 0.3267 3.170 1729.64 3473.65

 

set type 1 charge 1.0

set type 2 charge -1.0

 

mass 1 22.9898

mass 2 35.45

 

dump mydump all atom 1000 atom.lammpstrj

 

minimize 0.0 1.0e-8 1000 100000

 

timestep 1.0

thermo 100

thermo_style custom step temp density

thermo_modify flush yes

velocity all create 1200 5645354 loop local dist gaussian

 

fix fxnpt all npt temp 1200 1200 100 iso 100 100 1000

 

run 100000

 

unfix fxnpt

 

fix fxnpt all npt temp 1200 1200 100 iso 1.0 1.0 1000

 

run 100000

 

unfix fxnpt

 

variable    dt equal 1.0

variable    kB equal 1.3806504e-23

variable    g_mol2kg equal 1.0e-3/6.02214e23

variable    A2m equal 1.0e-10

variable    fs2s equal 1.0e-15

variable    atm2pa equal 1.01325e5

variable    convert_eta equal ${atm2pa}*${atm2pa}*${A2m}*${A2m}*${A2m}*${fs2s}

variable    kCal2J equal 4186.0/6.02214e23

variable    convert_kappa equal ${kCal2J}/${fs2s}/${A2m}

variable    convert_rho equal 1000

 

reset_timestep 0

variable    p equal 2000     # correlation length

variable    s equal 5       # sample interval

variable    d equal $p*$s   # dump interval

thermo          $d

variable         pxy equal pxy

variable         pxx equal pxx-press

variable         pxz equal pxz

variable         pzz equal pzz-press

variable         pyz equal pyz

variable         pyy equal pyy-press

fix              SS all ave/correlate $s $p $d v_pxy v_pxx v_pxz v_pzz v_pyz v_pyy type auto file profile.gk ave running

 

variable         scale equal 1.0/1200/${kB}*vol*$s*dt

variable         diagfac equal 2-2/3

variable         vxy equal trap(f_SS[3])*${scale}*${convert_eta}

variable         vxx equal trap(f_SS[4])*${scale}/${diagfac}*${convert_eta}

variable         vxz equal trap(f_SS[5])*${scale}*${convert_eta}

variable         vzz equal trap(f_SS[6])*${scale}/${diagfac}*${convert_eta}

variable         vyz equal trap(f_SS[7])*${scale}*${convert_eta}

variable         vyy equal trap(f_SS[8])*${scale}/${diagfac}*${convert_eta}

 

fix fxnvt all nvt temp 1200 1200 100.0

 

thermo_style     custom step temp press pxy pxz pyz v_vxy v_vxx v_vxz v_vzz v_vyz v_vyy

thermo_modify flush yes

 

run              100000

 

unfix SS

reset_timestep  0

 

compute         msd all msd com yes

variable        twopoint equal c_msd[4]/6/(step*dt+1.0e-6)

fix             9 all vector 10 c_msd[4]

variable        fitslope equal slope(f_9)/6/(10*dt)

 

thermo          1000

thermo_style  custom step temp c_msd[4] v_twopoint v_fitslope

thermo_modify flush yes

 

run 100000

 

 

感谢鲍路瑶老师的分享,内容来自于鲍老师分享出来的资料

如有需要添加微信:lmp_zhushou  进入微信群,帮助他人,共建社区

获取完整版lammps讲义可以加微信lmp_zhushou或加入QQ994359511


最新评论
请先登录才能进行回复登录
技术支持: CLOUD | 管理登录
seo seo