LAMMPS 近场动力学与塑性梁
用实际完成的 LAMMPS 输入展示参数、提交和结果文件,附各条件的操作记录。
阅读本篇目录
下载输入、Slurm 作业与实际结果。本例使用 LAMMPS 30 Sep 2026 的 P100 构建。附件保存 9 个已完成条件,按输入保留相互作用与操作参数。
选择条件#
解压并进入 lammps-peridynamic-models-plastic-beams-operations。CASES 每行对应一个作业数组索引,inputs 保存条件输入,reference 保存实际输出。gpu 条件使用 GPU 构建,其中普通 CPU 样式按输入直接运行;kokkos 条件启用 Kokkos。
| 条件目录 | 主要样式 | 运行模式 |
|---|---|---|
legacy-eps |
pair_style peri/eps, fix nve, fix indent, compute damage/atom, compute reduce, compute dilatation/atom, compute plasticity/atom, dump custom |
gpu |
legacy-ves |
pair_style peri/ves, fix nve, fix indent, compute damage/atom, compute reduce, compute dilatation/atom, dump custom |
gpu |
legacy-lps |
pair_style peri/lps, fix nve, fix indent, compute damage/atom, compute reduce, compute dilatation/atom, dump custom |
gpu |
legacy-pmb |
pair_style peri/pmb, fix nve, fix indent, compute damage/atom, compute reduce, dump custom |
gpu |
BPM-eps |
pair_style bpm/peri, bond_style bpm/peri, fix property/atom, fix nve, fix indent, compute property/atom, compute reduce, dump custom |
gpu |
BPM-ves |
pair_style bpm/peri, bond_style bpm/peri, fix property/atom, fix nve, fix indent, compute property/atom, compute reduce, dump custom |
gpu |
BPM-lps |
pair_style bpm/peri, bond_style bpm/peri, fix property/atom, fix nve, fix indent, compute property/atom, compute reduce, dump custom |
gpu |
four-beams-plastic |
pair_style bpm/spring, bond_style bpm/spring/plastic, fix nve, fix wall/region, fix setforce, fix addforce, fix viscous, compute reduce, dump custom |
gpu |
BPM-pmb |
pair_style bpm/peri, bond_style bpm/peri, fix property/atom, fix nve, fix indent, compute property/atom, compute reduce, dump custom |
gpu |
输入与提交#
第一组的输入如下。单位、边界条件和参数以对应 in.lammps 为准。
# small Peridynamic cylinder hit by projectile
units si
boundary s s s
atom_style peri
atom_modify map array
neighbor 0.0010 bin
# small target
lattice sc 0.0005
region target cylinder y 0.0 0.0 0.0050 -0.0050 0.0 units box
create_box 1 target
create_atoms 1 region target
pair_style peri/eps
pair_coeff * * 14.9e9 14.9e9 0.0015001 0.0005 0.25 10.0e8
set group all density 2200
set group all volume 1.25e-10
velocity all set 0.0 0.0 0.0 sum no units box
fix 1 all nve
# spherical indenter to shatter target
variable y0 equal 0.00155
variable vy equal -100
variable y equal "v_y0 + step*dt*v_vy"
fix 2 all indent 1e17 sphere 0.0000 v_y 0.0000 0.0015 units box
compute 1 all damage/atom
timestep 1.0e-7
thermo 100
#dump 1 all custom 100 dump.peri id type x y z c_1
#dump 2 all image 50 image.*.jpg type type &
# axes yes 0.8 0.02 view 80 -30 adiam 0.0006
#dump_modify 2 pad 4
#dump 3 all movie 50 movie.mpg type type &
# axes yes 0.8 0.02 view 80 -30 adiam 0.0006
#dump_modify 3 pad 4
# Own native time-resolved exports; source constitutive parameters unchanged.
compute avgdamage all reduce ave c_1
compute dilation all dilatation/atom
compute plastic all plasticity/atom
thermo_style custom step atoms ke pe etotal c_avgdamage
thermo 100
dump history all custom 100 atoms-history.dump id type x y z vx vy vz fx fy fz c_1 c_dilation c_plastic
dump_modify history sort id format float %.16e
run 1000
write_data final.data
在附件根目录提交第一组或所选条件。
sbatch --array=0 run.slurm
# 按 CASES 的完整列表提交
sbatch run.slurm
脚本申请一个 MPI 任务、一个 CPU 核和一张 P100,根据 MODES 加载对应模块。实际调用保存在 cases.json,例如第一组的命令参数为:
lmp -k off -pk omp 1 -echo both -in in.lammps > native.out
查看输出#
结果写入 work-new/条件名。先查看日志中的实际热力学表与结束信息。
cd work-new/legacy-eps
tail -n 35 native.out
本次第一组的原生日志片段如下。
Loop time of 24.1752 on 2 procs for 1000 steps with 3487 atoms
Total wall time: 0:00:24
原始输入若包含 dump、数据表或其他导出命令,相应文件会保存在该条件目录。附件提供的参考数据文件为 final.data。按自己的体系修改输入时,保留对应势函数文件、单位和原子样式设置。
再次运行前,将已有的同名 work-new 条件目录改名保存。
本次输出示例#
第一组原生热力学输出的开头如下,列名由该组输入的 thermo_style 设置。
Step Atoms KinEng PotEng TotEng c_avgdamage
0 3487 0 0 0 0
100 3487 602578.41 247103.03 849681.45 0
200 3487 85080306 1098605.6 86178912 0.0039871737
需要根据你的体系选择资源?联系讨论计算需求。实际可用软件与权限,以当前账户和运行环境为准。