大家好,我是小马老师。
本文分享一个lammps扭转案例代码。
扭转有两种方式,一是固定一端旋转另外一端,二是两端沿相反的方向旋转。
旋转的命令也是之前介绍过的fix move rotate命令。
案例为两侧旋转方式,扭转后的效果如图所示。
下面in文件代码重点演示扭转命令的用法,为简化代码,省略了驰豫部分和应力输出部分,如课题需要,请自行添加。
#模型基本设置
units metal
boundary p s s
atom_style atomic
timestep 0.001
neighbor 2 bin
neigh_modify every 1 delay 0 check yes
#建模
lattice fcc 4.05
region box block -10 10 -5 5 -5 5
create_box 1 box
region 1 block INF INF -2 2 -2 2
create_atoms 1 region 1
mass * 27
#力场设置
pair_style eam/fs
pair_coeff * * Al1.eam.fs Al
#分组
region left block INF -36 INF INF INF INF units box
region right block 36 INF INF INF INF INF units box
group left region left
group right region right
group mobile subtract all left right
#温度初始化
velocity mobile create 300 90877
#输出设置
dump 1 all atom 100 dump.xyz
#扭转
fix 1 left move rotate 0 0 0 -1 0 0 100 units box
fix 2 right move rotate 0 0 0 1 0 0 100 units box
#系综
fix 3 all nvt temp 300 300 0.1
run 6000
公众号:lammps加油站