Lammps模拟(一)单晶铜纳米压痕模拟

1.建模

dimension	    3
units		    metal 
boundary	    p p f
atom_style	    atomic
########################################################################
#---------------------------------------建模----------------------------
variable        a equal 3.615   #晶格常数值
variable        lx equal 50    #盒子           
variable        ly equal 50    #三个方向 
variable        lz equal 150    #大小

###创建盒子
lattice	        fcc $a orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
region		    box block 0.0 ${lx} 0 ${lx} 0.0 ${lz} units box
create_box	    4 box
###创建基体原子
region		    boundary_layer_down block INF INF INF INF INF 5 units box
region		    thermostat_layer block INF INF INF INF 5 10 units box
region		    newtonian_layer block INF INF INF INF 10 60 units box
region		    substracte union 3 boundary_layer_down thermostat_layer newtonian_layer	units box
create_atoms	1 region substracte units box
###创建压头原子(这里的纳米压痕用的是实际压头)
lattice	        diamond 3.57 	
region		    indent sphere 25 25 80 12 units box
create_atoms	4 region indent units box
###设定原子质量
mass		    1 63.55         #Cu
mass		    2 63.55         #Cu
mass		    3 63.55         #Cu
mass		    4 12.01         #C
#----------------------------------------划分组----------------------------------
group		    boundary_layer_down region boundary_layer_down
group		    thermostat_layer region thermostat_layer
group		    newtonian_layer region newtonian_layer
group		    tool region indent

set		        group boundary_layer_down type 1
set		        group thermostat_layer type 2
set		        group newtonian_layer type 3
set		        group tool type 4

write_data      intial.data

2.设置势函数

##################################################################################
#---------------------------------势函数------------------------------------------
pair_style      hybrid eam morse 9.025

pair_coeff      1*3 1*3 eam Cu_u3.eam 
pair_coeff      3 4 morse 0.087 5.14 2.05 
pair_coeff      1*2 4 none
pair_coeff      4 4 none
#要删除
variable        tstp equal 0.001
variable        T equal 293
variable        thermo_step equal 1000
variable        relax_step  equal 500000

3.弛豫

#---------------------------------弛豫-----------------------------
neighbor      3.0 bin
neigh_modify  delay 5
compute          newTemp thermostat_layer temp
fix            1 all nve
fix            2 boundary_layer_down setforce 0.0 0.0 0.0

velocity      newtonian_layer set NULL NULL NULL 
velocity      thermostat_layer create $T 5812775 temp newTemp 
fix            3 thermostat_layer temp/rescale 10 $T $T 10 1
fix_modify      3 temp newTemp

timestep      ${tstp}
thermo        ${thermo_step}
thermo_modify  temp newTemp
thermo_style  custom step c_newTemp press pe ke etotal
run            ${relax_step}

write_data      yahen.data
write_restart   yahen.restart

4.纳米压痕

#-----------------------------压痕实现-----------------------
variable        depth equal 30    #压入深度为30埃
variable        distance equal 10 #压头与表面的初始距离为10埃
variable        loadv equal 0.1  #加载速度为0.1埃/ps
variable        load_step equal (v_depth+v_distance)/v_loadv/(${tstp})
variable        hold_step equal 20000 
###计算压入深度
variable      dis equal xcm(tool,z)
variable        initial_dis equal ${dis}    
variable        disp equal -(v_dis-(${initial_dis}))
###计算压入载荷
#方法一
variable      m1 equal fcm(tool,z)           #用压头质心的受力计算载荷
variable        unit equal 1.602*1.0e-3        #单位换算成μN
variable        load1 equal v_m1*(${unit})
#方法二
#compute       forcez tool property/atom fz     
#compute        m2 tool reduce sum c_forcez   #也可以用压头z方向受到的合力计算载荷
#variable        load2 equal c_m2*(${unit})
#----------------------------------加载过程-------------------
dump        1 all custom 10000 ./output/indentation/Indentation.lammpstrj id type x y z 
fix            5 tool move linear 0.0 0.0 -${loadv} units box 
fix            6 all print 100 "${disp} ${load1} ${load2}" file ./output/indentation/load_disp.txt
run            ${load_step}

#-----------------------------------保持阶段-------------------
fix            7 tool move linear 0 0 0 units box
run            ${hold_step}

#-----------------------------------卸载过程--------------------
fix            7 tool move linear 0.0 0.0 ${loadv} units box 
run            ${load_step}

可根据需求,设置不同的下压力、下压速度,研究不同参数下的铜的变形情况。

本案例输出下压深度与压力曲线图:

  • 6
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
LAMMPS是一种基于分子动力学方法的计算软件,可以用于模拟物质的多种性质,并且在纳米压痕模拟中也得到了广泛的应用。 在纳米压痕中,我们通常将待测材料作为底基,用一个具有尖锐针锋的压头对其进行压痕。通过在LAMMPS中建立底基和针锋的分子动力学模型,并引入适当的势函数和力场参数,可以模拟纳米压痕过程中的原子级变化和相关物理性质。 通过LAMMPS计算纳米压痕可以得到以下信息: 1. 压头对底基施加的力和压头的运动情况:LAMMPS模拟可以揭示压痕过程中压头和底基之间的相互作用力,以及压头的运动轨迹,从而分析压痕的力学性质。 2. 压痕深度和硬度:LAMMPS可以模拟原子的变形情况,通过计算原子位置的变化和材料的应力应变关系,可以得到纳米压痕过程中的压痕深度和材料的硬度值。 3. 压痕后的结构和缺陷:LAMMPS可以模拟出原子的变形和位移,通过分析原子的运动轨迹,可以得到材料压痕后的结构变化和产生的缺陷情况。 4. 压痕的应力分布和塑性变形区域:LAMMPS模拟可以计算出压痕过程中的应力分布,从而揭示出不同位置的应力状态和压力分布,以及塑性变形区域的形成。 综上所述,LAMMPS是一个强大的计算工具,可以帮助我们理解纳米压痕过程中的原子级变化和物理性质,为材料研究和纳米技术应用提供了重要的理论支持。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值