首页 >> 仿真软件说明 >>lammps >>in文件 >> 空位形成能
详细内容

空位形成能

#模型基本设置

variable ao equal 3.615

units   metal

dimension   3

boundary    p  p    p      

atom_style  atomic

#建模

lattice fcc 3.615

region  box block -4 4 -4 4 -4 4

create_box  2 box

lattice fcc 3.615

create_atoms    1 box

#力场参数设置

pair_style  eam/alloy

pair_coeff * * FeCuNi.eam.alloy Cu Cu

#计算势能

compute eng all pe/atom 

compute eatoms all reduce sum c_eng

#设置输出

thermo 10

thermo_style custom step pe c_eatoms 

#能量最小化

min_style cg

minimize 1e-15 1e-15 5000 5000

run 0

#计算原子数量

variable N equal count(all)

variable No equal $N

#计算初始能量E0

variable E equal "c_eatoms"

variable Ei equal $E

#产生空位原子

variable r2 equal sqrt(${ao}^2+${ao}^2)/4

region select sphere 0 0 0 ${r2} units box

delete_atoms region select compress yes

write_data  cu.data

#设置输出

thermo 10

thermo_style custom step pe lx ly lz press pxx pyy pzz c_eatoms 

#再一次能量最小化

min_style cg

minimize 1e-15 1e-15 5000 5000

write_data  cu2.data

run 0

#计算插入空位原子后的能量Ef

variable Ef equal "c_eatoms"

#计算空位原子形成能

variable Ev equal (${Ef}-((${No}-1)/${No})*${Ei})

#输出空位原子形成能

print "Vacancy formation energy = ${Ev}"


技术支持: CLOUD | 管理登录
seo seo