搜档网
当前位置:搜档网 › LAMMPS案例分析—石墨烯拉伸和热传导

LAMMPS案例分析—石墨烯拉伸和热传导

LAMMPS案例分析—石墨烯拉伸和热传导
LAMMPS案例分析—石墨烯拉伸和热传导

第一行一般是一些说明性的文字,例如解释一下这个输入文件的作用,模拟的是什么系统,作者是谁,什么时候完成的。这样做为了方便以后查阅起来方便。在LAMMPS

里用符号#来注释掉不需要执行的指令。

一、Initialization

# 2d LJ crack simulation 使用L-J势能模拟裂纹的扩展

Units lj 设置整个模拟系统的单位;物理量均采用无量纲化的约化单位dimension 2

boundary s s p 设置a三个方向上的边界条件

atom_style atomic 基本物质单元所具备属性,参数atomic所有单元都是粗粒化小球neighbor 0.3 bin 成对势能的截至距离

neigh_modify delay 5 间隔多少载荷步从新形成近邻表

二、Atom Definition

# create geometry

lattice hex 0.93 指定晶格类型和晶格常数(二维六方密堆积)

region box block 0 100 0 40 -0.25 0.25 三个方向上模拟的空间区域

create_box 5 box 按照空间区域创造5个模拟盒子

create_atoms 1 box 使模拟盒子里布满原子,原子种类记为1

mass 1 1.0

mass 2 1.0

mass 3 1.0 与5个模拟盒子对应,设置原子的质量

mass 4 1.0

mass 5 1.0

三、Setting

# LJ potentials

pair_style lj/cut 2.5 相互作用为LJ12-势,截断半径为2.5

pair_coeff * * 1.0 1.0 2.5 LJ 12-6 中的ε 和σ 分别为1.0 和1.0,截断半径为2.5 # 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 定义可动原子组,便于统计温度

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 定义左上、左下原子组,便于指定裂纹的存在

set group leftupper type 2

set group leftlower type 3

set group lower type 4

set group upper type 5 指定原子类型,便于指定裂纹的存在

# initial velocities

compute new mobile temp 定义温度的计算,可动区域内统计平均

compute p all pressure thermo_temp

compute 1 all stress/atom 定义原子应力的计算,整个区域,计算结果记为p

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 可移动原子速度从0-0.3线性变化thermo_style custom step temp pxx pyy pzz lx ly lz

thermo_modify temp new

四、Suppliment

# fixes

fix 1 all nve nve系综的积分算法

fix 2 boundary setforce NULL 0.0 0.0 边界上原子力的条件钢化原子,便于加载

# run

timestep 0.003 时间间隔步

thermo 200 每200步输出热力学统计量

thermo_modify temp new 计算温度通过new指示的方法计算

neigh_modify exclude type 2 3 原子2,3之间取消【裂纹】(通过不使他们在近邻表中出现实现)

dump 1 all custom 50 https://www.sodocs.net/doc/ee6713882.html,mmpstrj x y z c_1[1] c_1[2] c_1[3] c_1[4] c_1[5] c_1[6]

每隔500步将原子信息写入文件https://www.sodocs.net/doc/ee6713882.html,mmpstrj

run 15000 模拟步数

相关主题