α-Fe多晶中随机掺杂H原子

1.用lammps实现H原子在多晶体系中掺杂。探究其对应力应变的影响。

#--------随机数node是5,H浓度为0.01 
variable            T equal 300
units                  metal
boundary            p p p
atom_style          atomic
timestep	          0.001
neighbor            2.0 bin
neigh_modify     delay 5 check yes
read_data           final5.data  extra/atom/types 1
variable kB equal 8.63e-5 
#--------------------------------- FORCE FIELD ------------------------------------
#1   Fe-H  Fe_H_Kumar2023.eam.fs
#2   Fe-Fe   Fe_mm.eam.fs
#3  H-H    LJ

create_atoms    2 random 848   12345 NULL      ####H的浓度为0.01 
mass           2    1
pair_style    hybrid  eam/fs    lj/cut 8    
pair_coeff    *   *   eam/fs   Fe_mm.eam.fs  Fe   NULL
pair_coeff    *   *   eam/fs   Fe_H_Kumar2023.eam.fs  Fe H
pair_coeff    2   2   lj/cut   0.046   2.24
#-------------------------------- SETTINGS ---------------------------------
delete_atoms  overlap 0.5 all all compress yes
compute         myKE all ke/atom
compute         myPE all pe/atom
variable temp atom c_myKE/1.5/${kB}
#-------------------------------- Minimization -----------------------------
fix                 1 all box/relax iso 0.0 vmax 0.001
min_style           cg
minimize            0 0 10000 10000
write_data          mini.data
unfix                 1
dump                11 all custom 20000 compress.xyz mass type x y z fx fy fz c_myKE v_temp
#-------------------------------- EQUILIBRATION 1 ----------------------------
reset_timestep      0
timestep            0.001
velocity            all create $T 12345 mom yes rot no loop local
#-------------------------------- EQUILIBRATION 2 ----------------------------
fix                 12 all npt temp $T   $T 0.1 aniso 0 0 1 drag 1 
thermo              10000
thermo_style        custom step lx ly lz press pxx pyy pzz pe temp
run                1000000
unfix               12
 
#----------------- Store final cell length for strain calculations-----------------
variable            tmp equal "ly"
variable            L0 equal ${tmp}
print               "Initial Length, L0: ${L0}"

#-------------------------------------- Deformation1 --------------------------------
reset_timestep      0
fix                 1 all nve ######temp $T $T 0.1 x 0 0 1 z 0 0 1 drag 1
fix          32 all temp/rescale 10 300 300 10 1.0
variable            erate equal 1e8
variable            erate1 equal "v_erate / 1.0e12"
fix                 2 all deform 100 y erate ${erate1} units box remap x
# Output strain and stress info to file
# for units metal, pressure is in [bars] = 100 [kPa] = 1/10000 [GPa]
# p2, p3, p4 are in GPa
variable            strain equal "(-v_L0 + ly)/v_L0"
variable            p1 equal "v_strain"
variable            p2 equal "-pxx/10000"
variable            p3 equal "-pyy/10000"
variable            p4 equal "-pzz/10000"
fix                 def1 all print 10000 "${p1} ${p2} ${p3} ${p4}" file compress1.txt screen no
fix                   def2 all  ave/time  10 1000 10000 v_p1 v_p2 v_p3 v_p4 file compress.txt 
thermo              5000
thermo_style        custom step v_strain temp v_p1 v_p2 v_p3 v_p4 ke pe press
run                 2000000


 







代码就不过多解释了,有问题可以留言,或者关注公众号 硕博科研小助手

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值