第五讲分子动力学模拟的Lammps实现

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
B、使用L-J势模拟裂纹的扩展
• L-J 无量纲化计算中的单位
B、使用L-J势模拟裂纹的扩展
leftupper 裂纹
upper
y
leftlower
lower x
Lammps计算输入文件
• # 2d LJ crack simulation(问题的基本初始化)
• dimension 2 • #2维分子动力学模拟 • boundary s s p • #x,y方向不存在周期边界条件,z方向周期边界条件。
• # initial velocities初始化速度 • compute new mobile temp • #定义温度的计算(可动区域内统计平均) • compute new2 mobile stress/atom • #定义原子应力的计算(整个区域) • Velocity mobile create 0.01 887723 temp new • #按指定的温度(0.01)计算方法,初始化原子的速度 • Velocity upper set 0.0 0.3 0.0 • #upper原子组y方向的速度为0.3 • Velocity mobile ramp vy 0.0 0.3 y 1.25 38.75 sum yes • #mobile原子的速初始度从0到0.3线性变化 • # fixes施加约束 • fix 1 all nve • #nve系综的积分算法 • fix 2 boundary setforce NULL 0.0 0.0 • #边界boundary上力条件,钢化原子,便于加载!!
现实现)
• Dump 1 all atom 500 dump.crack • #每隔500步将原子信息写入文件dump.crack
• Dump 2 mobile custom 500 dump2.crack tag x y z c_new2[2]
•Baidu Nhomakorabearun
5000
• #进行5000步的模拟
C.使用EAM势模拟Ni的循环行为
• atom_style atomic • #原子类型(金属) • Neighbor 0.3 bin • #建近邻表参数(rc+0.3)bin表示为近邻表类型。 • neigh_modify delay 5 • #间隔多少载荷步重新形成近邻表
Lammps计算输入文件
• # create geometry创建初始几何构形
• # define groups(便于加载) • Region 1 block INF INF INF 1.25 INF INF • Group lower region 1 • #定义lower组(便于施加外加速度) • Region 2 block INF INF 38.75 INF INF INF • Group upper region 2 • #定义upper组(便于施加外加速度) • Group boundary union lower upper • #定义总边界组 • Group mobile subtract all boundary • #定义可动原子组(便于统计温度)
z
u
u
y
x
u
常温30K条件下
金属材料模拟中Lammps的单位
Lammps计算输入文件
• # 3d metal 拉伸模拟 • #模拟条件的初始化 • Units metal • #指定模拟中的单位类型 • boundary s s s • #指定模拟的边界条件 • atom_style atomic • #指定原子类型,原子的属性 • Lattice fcc 3.52 • #指定材料的晶格类型和晶格常数 • region box block -5 5 -5 5 -15 15 • #xlo,xhi,ylo,yhi,zlo,zhi =区域box的上下限 • create_box 1 box • #建立只有1中原子类型的simulation box • create_atoms 1 box • #在simulation box中创建类型为1的原子(原子位置初始化)
• Mass 1 1.0 • Mass 2 1.0 • Mass 3 1.0 • Mass 4 1.0 • Mass 5 1.0 • #指定单个原子的质量
Lammps计算输入文件
• # LJ potentials(指定原子作用势) • pair_style lj/cut 2.5 • #指定lj势,截断半径为2.5 • pair_coeff * * 1.0 1.0 2.5 • #指定lj势参数
Lammps计算输入文件
• region
leftupper block INF 20 20 INF INF INF
• region
leftlower block INF 20 INF 20 INF INF
• group
leftupper region leftupper
• group
leftlower region leftlower
Lammps计算输入文件
• # run运行计算 • timestep 0.003 • #时间间隔步 • Thermo 200 • #每200步输出热动力学统计量 • thermo_modify temp new • #计算温度通过new指示的方法计算
• neigh_modify exclude type 2 3 • #原子2,3之间作用取消(也就是通过不使他们在近邻表中出
• #定义左上、左下原子组(便于指定裂纹的存在)
• set
group leftupper type 2
• set
group leftlower type 3
• set
group lower type 4
• set
group upper type 5
• #指定原子类型(便于指定裂纹的存在)
Lammps计算输入文件
• Lattice hex 0.93 • #指定晶格类型(二维hex)和晶格常数 • Region box block 0 100 0 40 -0.25 0.25 • #定义一个区域 • create_box 5 box • #在指定区域建立一个simulation box,5表示原子类型的种类数 • create_atoms 1 box • #在simulation box中创建类型为1的原子(原子位置初始化)
相关文档
最新文档