利用LAMMPS中fraction例子计算摩擦力,为什么输出的力是0?
lammps吧
全部回复
仅看楼主
level 1
是清欢🐭 楼主
# 2d friction simulation
dimension2
boundaryp s p
atom_styleatomic
neighbor0.3 bin
neigh_modifydelay 5
# create geometry
latticehex 0.9
regionbox block 0 50 0 22 -0.25 0.25
create_box4 box
mass1 1.0
mass2 1.0
mass3 1.0
mass4 1.0
# atom regions
region lo-fixed block INF INF INF 1.1 INF INF
region lo-slab block INF INF INF 7 INF INF
region above-lo block INF INF INF 7 INF INF side out
region hi-fixed block INF INF 20.9 INF INF INF
region hi-slab block INF INF 15 INF INF INF
region below-hi block INF INF 15 INF INF INF side out
regionlo-asperity sphere 32 7 0 8
regionhi-asperity sphere 18 15 0 8
regionlo-half-sphere intersect 2 lo-asperity above-lo
regionhi-half-sphere intersect 2 hi-asperity below-hi
# create 2 surfaces with asperities
create_atoms1 region lo-slab
create_atoms1 region hi-slab
create_atoms2 region lo-half-sphere
create_atoms3 region hi-half-sphere
# LJ potentials
pair_stylelj/cut 2.5
pair_coeff* * 1.0 1.0 2.5
# define groups
group lo region lo-slab
grouplo type 2
grouphi region hi-slab
grouphi type 3
grouplo-fixed region lo-fixed
grouphi-fixed region hi-fixed
groupboundary union lo-fixed hi-fixed
groupmobile subtract all boundary
setgroup lo-fixed type 4
setgroup hi-fixed type 4
# initial velocities
compute new mobile temp/partial 0 1 0
velocitymobile create 0.1 482748 temp new
velocityhi set 1.0 0.0 0.0 sum yes
# fixes
fix1 all nve
fix2 boundary setforce 0.0 0.0 0.0
fix3 mobile temp/rescale 200 0.1 0.1 0.02 1.0
fix_modify3 temp new
fix 4 all enforce2d
compute 3 hi-fixed property/atom fx fy fz #计算hi-fixed的力
compute 3x hi-fixed reduce sum c_3[1]
compute 3y hi-fixed reduce sum c_3[2]
compute 3z hi-fixed reduce sum c_3[3]
# Run
timestep0.0025
thermo100
thermo_modifytemp new
thermo_style custom step pe ke etotal vol c_3x c_3y c_3z c_new
dump1 all atom 100 friction.lammpstrj
dump_modify 1 scale no
run20000
2020年10月03日 13点10分 1
level 1
是清欢🐭 楼主
求大神帮忙指导下,看是哪里出错了?
2020年10月03日 13点10分 2
level 1
是清欢🐭 楼主
顶一下
2020年10月03日 13点10分 3
level 1
是清欢🐭 楼主
救救孩子吧
2020年10月03日 13点10分 4
level 1
是清欢🐭 楼主
compute之前的内容都没有改,只改了后面的
2020年10月03日 13点10分 5
1