LAMMPS 介电、状态方程与滤波操作
用实际完成的 LAMMPS 输入展示参数、提交和结果文件,附各条件的操作记录。
阅读本篇目录
下载输入、Slurm 作业与实际结果。本例使用 LAMMPS 30 Sep 2026 的 P100 构建。附件保存 4 个已完成条件,按输入保留相互作用与操作参数。
选择条件#
解压并进入 lammps-dielectric-eos-filter-and-segment-operations。CASES 每行对应一个作业数组索引,inputs 保存条件输入,reference 保存实际输出。gpu 条件使用 GPU 构建,其中普通 CPU 样式按输入直接运行;kokkos 条件启用 Kokkos。
| 条件目录 | 主要样式 | 运行模式 |
|---|---|---|
corrected-strain-v100-ULSPH-initial-compression-accumulated-strain |
pair_style hybrid/overlay, fix smd/wall_surface, fix setforce, fix smd/adjust_dt, fix smd/integrate_ulsph, compute smd/rho, compute smd/ulsph/num/neighs, compute smd/contact/radius, compute smd/triangle/vertices, dump custom, compute smd/internal/energy, compute reduce, fix balance, compute smd/ulsph/effm, compute smd/ulsph/strain/rate, compute smd/ulsph/stress, compute smd/ulsph/strain |
gpu |
p100-tabulated-internal-energy-equation-of-state |
pair_style dpd/fdt/energy, fix dpd/energy, fix nve, fix eos/table, compute dpd, compute dpd/atom, dump custom |
gpu |
p100-peptide-corotational-RESPA-filter |
pair_style lj/charmm/coul/long, bond_style harmonic, angle_style charmm, dihedral_style charmm, improper_style harmonic, kspace_style pppm, fix nvt, fix filter/corotate, dump custom |
gpu |
v100-polymer-segment-repulsive-potential |
bond_style harmonic, pair_style hybrid, fix nve, dump custom |
gpu |
输入与提交#
第一组的输入如下。单位、边界条件和参数以对应 in.lammps 为准。
####################################################################################################
#
# ULSPH example: water flow through a complex geometry read from a .STL file
#
# The boundary dump file (see below) can be converted into VTK format using the conversion
# tool dump2vtk_tris from the tools/smd directory.
#
# unit system: GPa / mm / ms
#
####################################################################################################
####################################################################################################
# MATERIAL PARAMETERS
####################################################################################################
variable c0 equal 10.0 # speed of sound for fluid
variable rho equal 1.0e-6 # initial mass density
variable q1 equal 0.06 # standard artificial viscosity linear coefficient
variable q2 equal 0.0 # standard artificial viscosity quadratic coefficient
variable hg equal 0.0 # hourglass control coefficient
variable cp equal 1.0 # heat capacity of material -- not used here
variable K equal ${c0}*${rho}^2
variable contact_stiffness equal 0.1*${K}
####################################################################################################
# INITIALIZE LAMMPS
####################################################################################################
dimension 3
units si
boundary f f f # simulation box boundaries
atom_style smd
atom_modify map array
comm_modify vel yes
comm_style tiled
neigh_modify every 10 delay 0 check yes exclude type 2 2 one 10000
newton off
####################################################################################################
# CREATE INITIAL GEOMETRY
####################################################################################################
variable l0 equal 5.0 # lattice spacing for creating particles
lattice sc ${l0}
region box block -110 60 -30 220 -90 130 units box
create_box 2 box
region particles cylinder y 0 -30 47 135 200 units box
create_atoms 1 region particles
group water type 1
####################################################################################################
# DISCRETIZATION PARAMETERS
####################################################################################################
variable h equal 2.01*${l0} # SPH smoothing kernel radius
variable vol_one equal ${l0}^3 # volume of one particle -- assuming unit thickness
variable skin equal 0.1*${h} # Verlet list range
neighbor ${skin} bin
variable cr equal ${l0}/2
# 完整输入见附件
在附件根目录提交第一组或所选条件。
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/corrected-strain-v100-ULSPH-initial-compression-accumulated-strain
tail -n 35 native.out
本次第一组的原生日志片段如下。
Step Temp E_pair E_mol TotEng Press
Loop time of 1.996e-06 on 1 procs for 0 steps with 13350 atoms
Loop time of 0.503001 on 1 procs for 100 steps with 13350 atoms
Total wall time: 0:00:00
原始输入若包含 dump、数据表或其他导出命令,相应文件会保存在该条件目录。附件提供的参考数据文件为 原生日志 native.out。按自己的体系修改输入时,保留对应势函数文件、单位和原子样式设置。
再次运行前,将已有的同名 work-new 条件目录改名保存。
本次输出示例#
第一组原生热力学输出的开头如下,列名由该组输入的 thermo_style 设置。
Step Temp E_pair E_mol TotEng Press
0 0 0 0 0 0
Loop time of 1.996e-06 on 1 procs for 0 steps with 13350 atoms
需要根据你的体系选择资源?联系讨论计算需求。实际可用软件与权限,以当前账户和运行环境为准。