feat(granregion): 重构漏斗示例并添加两阶段仿真流程
* 修改 in.granregion.funnel: - 将颗粒尺寸从 [0.25, 0.5] 调整为 [0.2, 0.3] - 接触模型从 hertz/history 更改为 hooke - 增加单次注入颗粒数量从 2000 到 8000 - 添加邻域列表设置 neigh_modify one 10000 * 新增两阶段仿真文件: - in.granregion_init.funnel: 初始化阶段,颗粒注入并生成重启文件 - in.granregion_run.funnel: 运行阶段,从重启文件继续仿真 * 其他调整: - 去除初始化阶段的颗粒注入步骤注释 - 添加边界区域重新定义逻辑 - 优化热力学数据输出设置
This commit is contained in:
@ -31,8 +31,8 @@ variable radconehi equal 20
|
||||
# Particle sizes
|
||||
################################################
|
||||
|
||||
variable rlo equal 0.25
|
||||
variable rhi equal 0.5
|
||||
variable rlo equal 0.2
|
||||
variable rhi equal 0.3
|
||||
variable dlo equal 2.0*${rlo}
|
||||
variable dhi equal 2.0*${rhi}
|
||||
|
||||
@ -76,13 +76,13 @@ variable logfreq equal 1000
|
||||
|
||||
newton off
|
||||
atom_style sphere
|
||||
|
||||
neigh_modify one 10000
|
||||
boundary p p f
|
||||
|
||||
region boxreg block ${xlo} ${xhi} ${ylo} ${yhi} ${zlo} ${zhi}
|
||||
create_box 1 boxreg
|
||||
|
||||
pair_style gran/hertz/history &
|
||||
pair_style gran/hooke &
|
||||
${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1
|
||||
pair_coeff * *
|
||||
|
||||
@ -120,7 +120,7 @@ fix 1 all nve/sphere
|
||||
fix hopper3 all wall/gran/region hertz/history &
|
||||
${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg
|
||||
|
||||
fix ins all pour 2000 1 42424 region insreg &
|
||||
fix ins all pour 8000 1 42424 region insreg &
|
||||
diam range ${dlo} ${dhi} dens ${density} ${density}
|
||||
|
||||
#dump 1 all custom ${dumpfreq} ${name}.dump &
|
||||
|
||||
148
examples/granregion/in.granregion_init.funnel
Normal file
148
examples/granregion/in.granregion_init.funnel
Normal file
@ -0,0 +1,148 @@
|
||||
# pour particles into cone-shaped funnel, settle them, let them run out bottom
|
||||
|
||||
variable name string funnel_pour
|
||||
|
||||
thermo_modify flush yes
|
||||
units si
|
||||
variable PI equal 3.141592653589
|
||||
variable seed equal 14314
|
||||
|
||||
###############################################
|
||||
# Geometry-related parameters
|
||||
###############################################
|
||||
|
||||
variable xlo equal 10
|
||||
variable xhi equal 40
|
||||
variable ylo equal 10
|
||||
variable yhi equal 40
|
||||
variable zlo equal -20
|
||||
variable zhi equal 50
|
||||
|
||||
variable xc equal 25
|
||||
variable yc equal 25
|
||||
|
||||
variable zconehi equal 50
|
||||
variable zconelo equal 10
|
||||
variable zcyllo equal 0
|
||||
variable radconelo equal 2
|
||||
variable radconehi equal 20
|
||||
|
||||
################################################
|
||||
# Particle sizes
|
||||
################################################
|
||||
|
||||
variable rlo equal 0.25
|
||||
variable rhi equal 0.5
|
||||
variable dlo equal 2.0*${rlo}
|
||||
variable dhi equal 2.0*${rhi}
|
||||
|
||||
variable skin equal ${rhi}
|
||||
|
||||
###############################################
|
||||
# Granular contact parameters
|
||||
###############################################
|
||||
|
||||
variable coeffRes equal 0.1
|
||||
variable coeffFric equal 0.5
|
||||
|
||||
variable density equal 1.0
|
||||
variable EYoung equal 10^5
|
||||
variable Poisson equal 2.0/7.0
|
||||
variable GShear equal ${EYoung}/(2*(1+${Poisson}))
|
||||
|
||||
variable gravity equal 1.0
|
||||
|
||||
variable reff equal 0.5*(${rhi}+${rlo})
|
||||
variable meff equal ${density}*4.0/3.0*${PI}*${reff}^3
|
||||
variable min_mass equal ${density}*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo}
|
||||
variable max_mass equal ${density}*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi}
|
||||
|
||||
## Typical way to set kn, kt, etc.:
|
||||
variable kn equal 4.0*${GShear}/(3*(1-${Poisson}))
|
||||
variable kt equal 4.0*${GShear}/(2-${Poisson})
|
||||
|
||||
variable a equal (-2.0*log(${coeffRes})/${PI})^2
|
||||
variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a))
|
||||
variable gamma_t equal ${gamma_n}*0.5
|
||||
|
||||
variable tcol equal ${PI}/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0)
|
||||
|
||||
variable dt equal ${tcol}*0.05
|
||||
timestep ${dt}
|
||||
|
||||
###############################################
|
||||
variable dumpfreq equal 1000
|
||||
variable logfreq equal 1000
|
||||
|
||||
newton off
|
||||
atom_style sphere
|
||||
|
||||
boundary p p f
|
||||
|
||||
region boxreg block ${xlo} ${xhi} ${ylo} ${yhi} ${zlo} ${zhi}
|
||||
create_box 1 boxreg
|
||||
|
||||
pair_style gran/hooke &
|
||||
${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1
|
||||
pair_coeff * *
|
||||
|
||||
neighbor ${skin} multi
|
||||
thermo ${logfreq}
|
||||
|
||||
comm_style brick
|
||||
comm_modify mode multi group all vel yes
|
||||
balance 1.1 shift xyz 20 1.1
|
||||
fix bal all balance 10000 1.1 shift xyz 20 1.01
|
||||
|
||||
####################### Options specific to pouring #########################
|
||||
|
||||
# insertion region for fix/pour
|
||||
|
||||
region insreg cylinder z ${xc} ${yc} 10 30 50 side in units box
|
||||
|
||||
# define cone and cylinder regions - see lammps doc on region command
|
||||
# note new open options
|
||||
|
||||
region cylreg cylinder z ${xc} ${yc} ${radconelo} &
|
||||
${zcyllo} ${zconelo} side in units box &
|
||||
open 2 #Top is open
|
||||
|
||||
region conereg cone z ${xc} ${yc} ${radconelo} ${radconehi} &
|
||||
${zconelo} ${zconehi} side in units box &
|
||||
open 1 open 2 #Bottom and top are open
|
||||
|
||||
region hopreg union 2 conereg cylreg
|
||||
|
||||
fix grav all gravity ${gravity} vector 0 0 -1
|
||||
fix 1 all nve/sphere
|
||||
|
||||
|
||||
fix hopper3 all wall/gran/region hertz/history &
|
||||
${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg
|
||||
|
||||
fix ins all pour 2000 1 42424 region insreg &
|
||||
diam range ${dlo} ${dhi} dens ${density} ${density}
|
||||
|
||||
#dump 1 all custom ${dumpfreq} ${name}.dump &
|
||||
# id type mass diameter x y z
|
||||
|
||||
#dump 2 all image 4000 image.*.jpg type type &
|
||||
# axes yes 0.8 0.02 view 60 -30 zoom 3.0 &
|
||||
# box no 0.0 axes no 0.0 0.0
|
||||
#dump_modify 2 pad 6
|
||||
|
||||
thermo_style custom step cpu atoms ke
|
||||
thermo_modify flush yes lost warn
|
||||
|
||||
# 导出dump文件,用paraview检查
|
||||
dump 1 all custom ${dumpfreq} ${name}.dump id type mass diameter x y z
|
||||
|
||||
# Initial run to fill up the cone
|
||||
# 运行以插入颗粒
|
||||
run 20000
|
||||
# unfix ins
|
||||
|
||||
# 插入完成后,写入作为初始状态给run用
|
||||
write_restart tmp.restart
|
||||
|
||||
|
||||
164
examples/granregion/in.granregion_run.funnel
Normal file
164
examples/granregion/in.granregion_run.funnel
Normal file
@ -0,0 +1,164 @@
|
||||
# pour particles into cone-shaped funnel, settle them, let them run out bottom
|
||||
|
||||
variable name string funnel_pour
|
||||
|
||||
thermo_modify flush yes
|
||||
units si
|
||||
variable PI equal 3.141592653589
|
||||
variable seed equal 14314
|
||||
|
||||
###############################################
|
||||
# Geometry-related parameters
|
||||
###############################################
|
||||
|
||||
variable xlo equal 10
|
||||
variable xhi equal 40
|
||||
variable ylo equal 10
|
||||
variable yhi equal 40
|
||||
variable zlo equal -20
|
||||
variable zhi equal 50
|
||||
|
||||
variable xc equal 25
|
||||
variable yc equal 25
|
||||
|
||||
variable zconehi equal 50
|
||||
variable zconelo equal 10
|
||||
variable zcyllo equal 0
|
||||
variable radconelo equal 2
|
||||
variable radconehi equal 20
|
||||
|
||||
################################################
|
||||
# Particle sizes
|
||||
################################################
|
||||
|
||||
variable rlo equal 0.25
|
||||
variable rhi equal 0.5
|
||||
variable dlo equal 2.0*${rlo}
|
||||
variable dhi equal 2.0*${rhi}
|
||||
|
||||
variable skin equal ${rhi}
|
||||
|
||||
###############################################
|
||||
# Granular contact parameters
|
||||
###############################################
|
||||
|
||||
variable coeffRes equal 0.1
|
||||
variable coeffFric equal 0.5
|
||||
|
||||
variable density equal 1.0
|
||||
variable EYoung equal 10^5
|
||||
variable Poisson equal 2.0/7.0
|
||||
variable GShear equal ${EYoung}/(2*(1+${Poisson}))
|
||||
|
||||
variable gravity equal 1.0
|
||||
|
||||
variable reff equal 0.5*(${rhi}+${rlo})
|
||||
variable meff equal ${density}*4.0/3.0*${PI}*${reff}^3
|
||||
variable min_mass equal ${density}*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo}
|
||||
variable max_mass equal ${density}*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi}
|
||||
|
||||
## Typical way to set kn, kt, etc.:
|
||||
variable kn equal 4.0*${GShear}/(3*(1-${Poisson}))
|
||||
variable kt equal 4.0*${GShear}/(2-${Poisson})
|
||||
|
||||
variable a equal (-2.0*log(${coeffRes})/${PI})^2
|
||||
variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a))
|
||||
variable gamma_t equal ${gamma_n}*0.5
|
||||
|
||||
variable tcol equal ${PI}/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0)
|
||||
|
||||
variable dt equal ${tcol}*0.05
|
||||
timestep ${dt}
|
||||
|
||||
###############################################
|
||||
variable dumpfreq equal 1000
|
||||
variable logfreq equal 1000
|
||||
|
||||
newton off
|
||||
atom_style sphere
|
||||
|
||||
boundary p p f
|
||||
|
||||
# region boxreg block ${xlo} ${xhi} ${ylo} ${yhi} ${zlo} ${zhi}
|
||||
# create_box 1 boxreg
|
||||
read_restart tmp.restart
|
||||
|
||||
pair_style gran/hooke &
|
||||
${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1
|
||||
pair_coeff * *
|
||||
|
||||
neighbor ${skin} multi
|
||||
thermo ${logfreq}
|
||||
|
||||
comm_style brick
|
||||
comm_modify mode multi group all vel yes
|
||||
balance 1.1 shift xyz 20 1.1
|
||||
fix bal all balance 10000 1.1 shift xyz 20 1.01
|
||||
|
||||
####################### Options specific to pouring #########################
|
||||
|
||||
# insertion region for fix/pour
|
||||
|
||||
# region insreg cylinder z ${xc} ${yc} 10 30 50 side in units box
|
||||
|
||||
# define cone and cylinder regions - see lammps doc on region command
|
||||
# note new open options
|
||||
|
||||
region cylreg cylinder z ${xc} ${yc} ${radconelo} &
|
||||
${zcyllo} ${zconelo} side in units box &
|
||||
open 2 #Top is open
|
||||
|
||||
region conereg cone z ${xc} ${yc} ${radconelo} ${radconehi} &
|
||||
${zconelo} ${zconehi} side in units box &
|
||||
open 1 open 2 #Bottom and top are open
|
||||
|
||||
region hopreg union 2 conereg cylreg
|
||||
|
||||
fix grav all gravity ${gravity} vector 0 0 -1
|
||||
fix 1 all nve/sphere
|
||||
|
||||
|
||||
fix hopper3 all wall/gran/region hertz/history &
|
||||
${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg
|
||||
|
||||
# fix ins all pour 2000 1 42424 region insreg &
|
||||
# diam range ${dlo} ${dhi} dens ${density} ${density}
|
||||
|
||||
#dump 1 all custom ${dumpfreq} ${name}.dump &
|
||||
# id type mass diameter x y z
|
||||
|
||||
#dump 2 all image 4000 image.*.jpg type type &
|
||||
# axes yes 0.8 0.02 view 60 -30 zoom 3.0 &
|
||||
# box no 0.0 axes no 0.0 0.0
|
||||
#dump_modify 2 pad 6
|
||||
|
||||
thermo_style custom step cpu atoms ke
|
||||
thermo_modify flush yes lost warn
|
||||
|
||||
# Initial run to fill up the cone
|
||||
|
||||
|
||||
# run 20000
|
||||
# unfix ins
|
||||
# 继续运行
|
||||
run 150000
|
||||
|
||||
# dump 1 all custom 1 cpu.dump id type mass diameter x y z vx vy vz fx fy fz
|
||||
|
||||
# run 1
|
||||
|
||||
# remove "plug" - need to redefine cylinder region & union
|
||||
|
||||
region cylreg delete
|
||||
region hopreg delete
|
||||
region cylreg cylinder z ${xc} ${yc} ${radconelo} &
|
||||
${zcyllo} ${zconelo} side in units box &
|
||||
open 1 open 2 #Bottom & top are open
|
||||
|
||||
region hopreg union 2 cylreg conereg
|
||||
|
||||
unfix hopper3
|
||||
fix hopper3 all wall/gran/region hertz/history &
|
||||
${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg
|
||||
|
||||
run 100000
|
||||
Reference in New Issue
Block a user