以下为in文件内容
#fix ywalls polymer wall/lj126 ylo 0.0 T_my[6] myseed[6] mygamma[6] cutoff[6] myvx[6]
###########################################################################
units lj
boundary p f p
neighbor 1.0 bin
neigh_modify every 1 delay 0 check yes
atom_style sphere
pair_style hybrid/overlay dpd 1.0 1.0 343587 lj/cut 1.0
comm_modify mode single vel yes
log 01.log
variable vx equal 0.1
variable vx_up equal ${vx}/2
variable vx_down equal -${vx}/2
# ----------------- Atom Definition Section -----------------
read_data "system.data"
# ----------------- Settings Section -----------------
group fluid type 1
group small type 2
group large type 3
group particle type 2 3
set group small density 7.639437
set group large density 7.639437
pair_coeff 1 1 dpd 25 200 1.0
pair_coeff 1 2 dpd 0.0 200 1.0
pair_coeff 1 3 dpd 0.0 200 1.0
pair_coeff 2 2 dpd 0.0 200 2.15
pair_coeff 2 3 dpd 0.0 200 2.55
pair_coeff 3 3 dpd 0.0 200 2.95
pair_coeff 2 2 lj/cut 1.8 25000 2.15
pair_coeff 2 3 lj/cut 1.8 25000 2.55
pair_coeff 3 3 lj/cut 1.8 25000 2.95
# ----------------- Run Section -----------------
compute mytemp_bais all temp/partial 0 1 1
compute myTemp all temp/profile 1 0 0 y 50
compute pxy_all all pressure myTemp
fix 1 particle recenter 11.0 11.0 11.0 units box
fix 2 fluid recenter 11.0 11.0 11.0 units box
run 1
unfix 1
unfix 2
timestep 0.000001
velocity all create 1.0 672748 temp mytemp_bais rot yes dist gaussian
velocity all ramp vx ${vx_down} ${vx_up} y -1.0363 22.9637 sum yes units box
compute pxy_atom all stress/atom myTemp
variable begin equal ylo+5
variable end equal yhi-5
region part block INF INF ${begin} ${end} INF INF units box
compute pxy_region all reduce/region part sum c_pxy_atom[4]
variable pxy_region equal -c_pxy_region/(lx*lz*(ly-10))
thermo 100
thermo_style custom step temp c_myTemp c_pxy_all[4] v_pxy_region
thermo_modify temp mytemp_bais
dump mydump all custom 1000000 dump.lammpstrj id type diameter x y z
fix mynve all nve
fix ywall_down all wall/lj126 ylo EDGE 1.0 342387 10.0 5.0 ${vx_down} units box
fix ywall_up all wall/lj126 yhi EDGE 1.0 305390 10.0 5.0 ${vx_up} units box
run 50000000
reset_timestep 0
compute cc1 fluid chunk/atom bin/1d y lower 1.0 units box
fix 2 fluid ave/chunk 1 10000000 10000000 cc1 vx norm sample file rho_vx_fluid.profile
compute cc2 particle chunk/atom bin/1d y lower 1.0 units box
fix 3 particle ave/chunk 1 10000000 10000000 cc2 vx norm sample file rho_vx_particle.profile
run 10000000
了解更多代码详情,请扫描下方二维码!
PS:推荐一个巨好用的科研小程序“元素魔方”,专注【材料测试+模拟计算】科研服务,承接第一性原理、分子动力学、量子化学计算等服务,有需要的朋友可以点击文章开头小程序,了解详情哦~
如需投稿或合作
发送邮箱YlmmEditor@ylmm-tech.com
获取更多科研硬货可关注公众号
获取更多福利、经验交流可加群
声明:来源于lammps全能助手,如有侵权,可联系删除。