lammps 計算實例——金屬空位形成能和空位濃度

一、空位n從晶體中移去一個原子,即可形成空位。本例將運用 LAMMPS 計算空位形成能, Ev.nLAMMPS 輸入文件為 in.cu_vacancyn1) 在 fcc 結構的完整Cu 晶體中引入一個空位n沿<100>方向構造一個 4 ×N×N×N 的晶體。N 為input 文件中lattice 命令指定的個n方向上的晶胞重複單元數。n2) 弛豫n當一個原子從晶體中移走之後,周圍的原子將相應地調整位置以降低體系勢能。為得到n穩定的構型,需要對體系進行弛豫,relaxation. LAMMPS提供兩種能量最小化方式,ncg 和 sd。本例中選用 sd 方式進行能量最小化。n如下是輸入文件, in.cu_vacancy:

in文件

units tttttmetal # 單位為lammps 中的metel 類型nboundary tttp p p # 周期性邊界條件natom_style ttatomic # 原子模式nlattice ttttfcc 3.6150 # Cu 的晶格常數3.615nregion ttttbox block 0 20 0 20 0 20 # x,y,z 各方向上的晶胞重複單元數,也即區域大小ncreate_box tt1 box # 將上述區域指定為模擬的盒子ncreate_atoms tt1 box # 將原子按晶格填滿盒子npair_style ttteam # 選取 Cu 的EAM 勢作為模型npair_coeff ttt1 1 Cu_u3.eam # EAM 勢文件名稱nrunttttt 0 tttt# 運行0 步,僅為啟動lammps 的熱力學數據計算nvariable tttE equal pe # 定義變數 E 為系統總勢能nvariable tttN equal atoms # 定義變數 N 為系統總原子數nprint ttttt"the number of atoms & system energy now are $N $E" # 列印信息nregion ttttcenterpoint block 3 3.10 3 3.10 3 3.10 # 指定一個原子大小的區域ndelete_atoms ttregion centerpoint # 刪除這個區域的原子nmin_style tttsd # 能量最小化模式,sdnminimize ttt1.0e-12 1.0e-12 1000 1000 # 能量最小化參數,指數越大最小化程度越深nprint ttttt"the number of atoms & system energy now are $N $E" # 列印信息ncompute ttt3 all pe/atom # 計算每個原子的勢能ncompute ttt4 all ke/atom # 計算每個原子的動能ncompute ttt5 all coord/atom cutoff 3.0 # 計算每個原子的近鄰原子數ndump tttt1 all custom 1 dump.atom id xs ys zs c_3 c_4 c_5n# 將指定的各原子信息寫入 dump.atom.ntimestep ttt0.005 # 步長 0.005fsn#thermo_modifytlost ignorenrun ttttt1 # 運行1 步n

運行得到log文件

LAMMPS (26 Jan 2017-ICMS)nOMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90)n using 1 OpenMP thread(s) per MPI tasknunits tttttmetal # 單位為lammps 中的metel 類型nboundary tttp p p # 周期性邊界條件natom_style ttatomic # 原子模式nlattice ttttfcc 3.6150 # Cu 的晶格常數3.615nLattice spacing in x,y,z = 3.615 3.615 3.615nregion ttttbox block 0 20 0 20 0 20 # x,y,z 各方向上的晶胞重複單元數,也即區域大小ncreate_box tt1 box # 將上述區域指定為模擬的盒子nCreated orthogonal box = (0 0 0) to (72.3 72.3 72.3)n 1 by 1 by 1 MPI processor gridncreate_atoms tt1 box # 將原子按晶格填滿盒子nCreated 32000 atomsnpair_style ttteam # 選取 Cu 的EAM 勢作為模型npair_coeff ttt1 1 Cu_u3.eam # EAM 勢文件名稱nrunttttt 0 tttt# 運行0 步,僅為啟動lammps 的熱力學數據計算nWARNING: No fixes defined, atoms wont move (../verlet.cpp:55)nNeighbor list info ...n update every 1 steps, delay 10 steps, check yesn max neighbors/atom: 2000, page size: 100000n master list distance cutoff = 6.95n ghost atom cutoff = 6.95n binsize = 3.475, bins = 21 21 21n 1 neighbor lists, perpetual/occasional/extra = 1 0 0n (1) pair eam, half, perpetualn pair build: half/bin/newtonn stencil: half/bin/3d/newtonn bin: standardnMemory usage per processor = 18.9056 MbytesnStep Temp E_pair E_mol TotEng Press n 0 0 -113280 0 -113280 -0.027860371 nLoop time of 0 on 1 procs for 0 steps with 32000 atomsnn0.0% CPU use with 1 MPI tasks x 1 OpenMP threadsnnMPI task timing breakdown:nSection | min time | avg time | max time |%varavg| %totaln---------------------------------------------------------------nPair | 0 | 0 | 0 | 0.0 | 0.00nNeigh | 0 | 0 | 0 | 0.0 | 0.00nComm | 0 | 0 | 0 | 0.0 | 0.00nOutput | 0 | 0 | 0 | 0.0 | 0.00nModify | 0 | 0 | 0 | 0.0 | 0.00nOther | | 0 | | | 0.00nnNlocal: 32000 ave 32000 max 32000 minnHistogram: 1 0 0 0 0 0 0 0 0 0nNghost: 19911 ave 19911 max 19911 minnHistogram: 1 0 0 0 0 0 0 0 0 0nNeighs: 2.144e+006 ave 2.144e+006 max 2.144e+006 minnHistogram: 1 0 0 0 0 0 0 0 0 0nnTotal # of neighbors = 2144000nAve neighs/atom = 67nNeighbor list builds = 0nDangerous builds = 0nvariable tttE equal pe # 定義變數 E 為系統總勢能nvariable tttN equal atoms # 定義變數 N 為系統總原子數nprint ttttt"the number of atoms & system energy now are $N $E" # 列印信息nthe number of atoms & system energy now are 32000 -113280.000077752nregion ttttcenterpoint block 3 3.10 3 3.10 3 3.10 # 指定一個原子大小的區域ndelete_atoms ttregion centerpoint # 刪除這個區域的原子nDeleted 1 atoms, new total = 31999nmin_style tttsd # 能量最小化模式,sdnminimize ttt1.0e-12 1.0e-12 1000 1000 # 能量最小化參數,指數越大最小化程度越深nWARNING: Resetting reneighboring criteria during minimization (../min.cpp:168)nMemory usage per processor = 23.4056 MbytesnStep Temp E_pair E_mol TotEng Press n 0 0 -113275.14 0 -113275.14 -8.538598 n 101 0 -113275.18 0 -113275.18 -11.459407 nLoop time of 11.322 on 1 procs for 101 steps with 31999 atomsnn99.6% CPU use with 1 MPI tasks x 1 OpenMP threadsnnMinimization stats:n Stopping criterion = energy tolerancen Energy initial, next-to-last, final = n -113275.143538 -113275.176418 -113275.176418n Force two-norm initial, final = 0.549256 0.00144827n Force max component initial, final = 0.107602 1.83421e-005n Final line search alpha, max atom move = 1 1.83421e-005n Iterations, force evaluations = 101 202nnMPI task timing breakdown:nSection | min time | avg time | max time |%varavg| %totaln---------------------------------------------------------------nPair | 11.146 | 11.146 | 11.146 | 0.0 | 98.45nNeigh | 0 | 0 | 0 | 0.0 | 0.00nComm | 0.032 | 0.032 | 0.032 | 0.0 | 0.28nOutput | 0 | 0 | 0 | 0.0 | 0.00nModify | 0 | 0 | 0 | 0.0 | 0.00nOther | | 0.144 | | | 1.27nnNlocal: 31999 ave 31999 max 31999 minnHistogram: 1 0 0 0 0 0 0 0 0 0nNghost: 19911 ave 19911 max 19911 minnHistogram: 1 0 0 0 0 0 0 0 0 0nNeighs: 2.14387e+006 ave 2.14387e+006 max 2.14387e+006 minnHistogram: 1 0 0 0 0 0 0 0 0 0nnTotal # of neighbors = 2143866nAve neighs/atom = 66.9979nNeighbor list builds = 0nDangerous builds = 0nprint ttttt"the number of atoms & system energy now are $N $E" # 列印信息nthe number of atoms & system energy now are 31999 -113275.176417649ncompute ttt3 all pe/atom # 計算每個原子的勢能ncompute ttt4 all ke/atom # 計算每個原子的動能ncompute ttt5 all coord/atom cutoff 3.0 # 計算每個原子的近鄰原子數ndump tttt1 all custom 1 dump.atom id xs ys zs c_3 c_4 c_5n# 將指定的各原子信息寫入 dump.atom.ntimestep ttt0.005 # 步長 0.005fsn#thermo_modifytlost ignorenrun ttttt1 # 運行1 步nWARNING: No fixes defined, atoms wont move (../verlet.cpp:55)nNeighbor list info ...n update every 1 steps, delay 10 steps, check yesn max neighbors/atom: 2000, page size: 100000n master list distance cutoff = 6.95n ghost atom cutoff = 6.95n binsize = 3.475, bins = 21 21 21n 2 neighbor lists, perpetual/occasional/extra = 1 1 0n (1) pair eam, half, perpetualn pair build: half/bin/newtonn stencil: half/bin/3d/newtonn bin: standardn (2) compute coord/atom, full, occasionaln pair build: full/binn stencil: full/bin/3dn bin: standardnMemory usage per processor = 43.533 MbytesnStep Temp E_pair E_mol TotEng Press n 101 0 -113275.18 0 -113275.18 -11.459407 n 102 0 -113275.18 0 -113275.18 -11.459407 nLoop time of 0.164 on 1 procs for 1 steps with 31999 atomsnnPerformance: 2.634 ns/day, 9.111 hours/ns, 6.098 timesteps/sn95.1% CPU use with 1 MPI tasks x 1 OpenMP threadsnnMPI task timing breakdown:nSection | min time | avg time | max time |%varavg| %totaln---------------------------------------------------------------nPair | 0.058 | 0.058 | 0.058 | 0.0 | 35.37nNeigh | 0 | 0 | 0 | 0.0 | 0.00nComm |-6.4843e-008|-6.4843e-008|-6.4843e-008| 0.0 | -0.00nOutput | 0.106 | 0.106 | 0.106 | 0.0 | 64.63nModify |-6.4843e-008|-6.4843e-008|-6.4843e-008| 0.0 | -0.00nOther | | 2.059e-007 | | | 0.00nnNlocal: 31999 ave 31999 max 31999 minnHistogram: 1 0 0 0 0 0 0 0 0 0nNghost: 19911 ave 19911 max 19911 minnHistogram: 1 0 0 0 0 0 0 0 0 0nNeighs: 2.14387e+006 ave 2.14387e+006 max 2.14387e+006 minnHistogram: 1 0 0 0 0 0 0 0 0 0nFullNghs: 4.28773e+006 ave 4.28773e+006 max 4.28773e+006 minnHistogram: 1 0 0 0 0 0 0 0 0 0nnTotal # of neighbors = 4287732nAve neighs/atom = 133.996nNeighbor list builds = 0nDangerous builds = 0nTotal wall time: 0:00:12n

將數據提取

空位濃度由下式給出:n[n] = exp( ? Fv / kBT).n其中 Fv = Ev ? TSv 為形成一個空位所需要的Helmholtz 自由能.n忽略熵Sv, 空位濃度公式簡化為n[n] = exp( ?Ev / kBT).n設 E1 為完整晶體能量,含N 個原子;E2 為弛豫後的晶體能量,含N – 1 個原子。空n位形成能 Ev 為:nEv=E2-(N-1)/N*E1

本例中以EAM 模型計算4×(20×20×20)=32000 個原子的體系,得到空位形成能Ev ~

1.2799 eV,文獻中的實驗值為~1.28 eV,符合較好。

二、間隙原子

向完整晶體中插入一個原子,即形成間隙原子。如果新插入的原子和晶體原子相同,則

為自間隙原子,self-interstitial。

與空位計算類似,我們用如下式子計算金屬Cu 中的自間隙原子形成能Ei

Ei=E2-(N+1)/N*E1

Ei 可能取決於間隙原子引入的初始位置。但對應最小的Ei 值的,應該是唯一的位置。

推薦閱讀:

以現有的超算的算力,能否在原子的級別上,模擬一杯水的物理狀態?
計算物理-雅克比迭代法解方程組
計算物理-差商解波動方程混合解
如何評價丁澤軍的計算物理?
物理所之行學術總結 凝聚態中的哲學與概念

TAG:计算物理学 | 计算材料学 | 分子动力学 |