diff --git a/examples/granregion/in.granregion.funnel b/examples/granregion/in.granregion.funnel index ef74ce5109..a9710ab6fe 100644 --- a/examples/granregion/in.granregion.funnel +++ b/examples/granregion/in.granregion.funnel @@ -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 & diff --git a/examples/granregion/in.granregion_init.funnel b/examples/granregion/in.granregion_init.funnel new file mode 100644 index 0000000000..f4f6d2369a --- /dev/null +++ b/examples/granregion/in.granregion_init.funnel @@ -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 + + diff --git a/examples/granregion/in.granregion_run.funnel b/examples/granregion/in.granregion_run.funnel new file mode 100644 index 0000000000..1a49992a22 --- /dev/null +++ b/examples/granregion/in.granregion_run.funnel @@ -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