Cleaning up granular restitution example

This commit is contained in:
jtclemm
2025-04-11 11:14:34 -06:00
parent e1ba18aff9
commit f786707699
4 changed files with 228 additions and 112 deletions

View File

@ -1,18 +0,0 @@
Python generated LAMMPS data file
2 atoms
1 atom types
0 0.08 xlo xhi
0 0.04 ylo yhi
0 0.08 zlo zhi
Atoms # sphere
1 1 0.004 2500 0.04 0.02 0.04 0 0 0
2 1 0.004 2500 0.04 0.02 0.04416 0 0 0
Velocities
1 0.0 0.0 1 0 0 0
2 0.0 0.0 -1 0 0 0

View File

@ -1,24 +1,43 @@
units si
atom_style sphere
comm_modify vel yes
boundary p p p
boundary p p f
region box block 0 80e-3 0 40e-3 0 80e-3 open 3 open 4
region box block -0.01 0.01 -0.01 0.01 0 0.08
create_box 2 box
read_data data.particles add append
group mb type 1
create_atoms 1 single 0.0 0.0 0.04
create_atoms 1 single 0.0 0.0 0.04416
set group all diameter 0.004 density 2500
pair_style granular
pair_coeff * * hertz/material 1e6 0.8 0.4 tangential mindlin NULL 0.0 0.5 damping coeff_restitution
# pair_coeff * * hooke 1e6 0.5 tangential mindlin 1 1.0 0.0 damping coeff_restitution
comm_modify vel yes
pair_coeff * * hertz/material 1e6 0.8 0.4 &
tangential mindlin NULL 0.0 0.5 &
damping coeff_restitution
#pair_coeff * * hooke 1e6 0.5 &
# tangential mindlin 1 1.0 0.0 &
# damping coeff_restitution
timestep 1e-9
fix 1 all nve/sphere
compute s all stress/atom NULL pair
group a1 id 1
group a2 id 2
velocity a1 set 0 0 1.0
velocity a2 set 0 0 -1.0
compute z1 a1 reduce sum z
compute z2 a2 reduce sum z
compute v1 a1 reduce sum vz
compute v2 a2 reduce sum vz
compute f1 a1 reduce sum fz
compute f2 a2 reduce sum fz
variable dz equal c_z1 - c_z2
# dump 1 all custom 2000000 op.dump id x y z vx vy vz
#dump_modify 1 pad 8
thermo_style custom step ke
run_style verlet
run 10000000
thermo 10000
thermo_style custom step ke v_dz c_v1 c_v2 c_f1 c_f2
run 1000000

View File

@ -1,80 +0,0 @@
LAMMPS (17 Apr 2024 - Development - patch_17Apr2024-93-g4e7bddaa0b)
using 1 OpenMP thread(s) per MPI task
units si
atom_style sphere
boundary p p f
region box block 0 80e-3 0 40e-3 0 80e-3 open 3 open 4
create_box 2 box
Created orthogonal box = (0 0 0) to (0.08 0.04 0.08)
1 by 1 by 1 MPI processor grid
read_data data.particles add append
Reading data file ...
orthogonal box = (0 0 0) to (0.08 0.04 0.08)
1 by 1 by 1 MPI processor grid
reading atoms ...
2 atoms
reading velocities ...
2 velocities
read_data CPU = 0.002 seconds
group mb type 1
2 atoms in group mb
pair_style granular
pair_coeff * * hertz/material 1e6 0.8 0.4 tangential mindlin NULL 0.0 0.5 damping coeff_restitution
# pair_coeff * * hooke 1e6 0.5 tangential mindlin 1 1.0 0.0 damping coeff_restitution
comm_modify vel yes
timestep 1e-9
fix 1 all nve/sphere
compute s all stress/atom NULL pair
#dump 1 all custom 2000000 op.dump id x y z vx vy vz
#dump_modify 1 pad 8
thermo_style custom step ke
run_style verlet
run 10000000
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 0.005
ghost atom cutoff = 0.005
binsize = 0.0025, bins = 32 16 32
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair granular, perpetual
attributes: half, newton on, size, history
pair build: half/size/bin/atomonly/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 10.1 | 10.1 | 10.1 Mbytes
Step KinEng
0 8.3775804e-05
10000000 5.3616513e-05
Loop time of 5.99782 on 1 procs for 10000000 steps with 2 atoms
77.9% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.60235 | 0.60235 | 0.60235 | 0.0 | 10.04
Neigh | 0.00021965 | 0.00021965 | 0.00021965 | 0.0 | 0.00
Comm | 1.7939 | 1.7939 | 1.7939 | 0.0 | 29.91
Output | 2.5955e-05 | 2.5955e-05 | 2.5955e-05 | 0.0 | 0.00
Modify | 1.7622 | 1.7622 | 1.7622 | 0.0 | 29.38
Other | | 1.839 | | | 30.66
Nlocal: 2 ave 2 max 2 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 0
Ave neighs/atom = 0
Neighbor list builds = 14
Dangerous builds = 0
Total wall time: 0:00:06

View File

@ -0,0 +1,195 @@
LAMMPS (4 Feb 2025)
units si
atom_style sphere
comm_modify vel yes
boundary p p p
region box block -0.01 0.01 -0.01 0.01 0 0.08
create_box 2 box
Created orthogonal box = (-0.01 -0.01 0) to (0.01 0.01 0.08)
1 by 1 by 1 MPI processor grid
create_atoms 1 single 0.0 0.0 0.04
Created 1 atoms
using lattice units in orthogonal box = (-0.01 -0.01 0) to (0.01 0.01 0.08)
create_atoms CPU = 0.000 seconds
create_atoms 1 single 0.0 0.0 0.04416
Created 1 atoms
using lattice units in orthogonal box = (-0.01 -0.01 0) to (0.01 0.01 0.08)
create_atoms CPU = 0.000 seconds
set group all diameter 0.004 density 2500
Setting atom values ...
2 settings made for diameter
2 settings made for density
pair_style granular
pair_coeff * * hertz/material 1e6 0.8 0.4 tangential mindlin NULL 0.0 0.5 damping coeff_restitution
#pair_coeff * * hooke 1e6 0.5 # tangential mindlin 1 1.0 0.0 # damping coeff_restitution
timestep 1e-9
fix 1 all nve/sphere
group a1 id 1
1 atoms in group a1
group a2 id 2
1 atoms in group a2
velocity a1 set 0 0 1.0
velocity a2 set 0 0 -1.0
compute z1 a1 reduce sum z
compute z2 a2 reduce sum z
compute v1 a1 reduce sum vz
compute v2 a2 reduce sum vz
compute f1 a1 reduce sum fz
compute f2 a2 reduce sum fz
variable dz equal c_z1 - c_z2
# dump 1 all custom 2000000 op.dump id x y z vx vy vz
thermo 10000
thermo_style custom step ke v_dz c_v1 c_v2 c_f1 c_f2
run 1000000
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 0.005
ghost atom cutoff = 0.005
binsize = 0.0025, bins = 8 8 32
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair granular, perpetual
attributes: half, newton on, size, history
pair build: half/size/bin/atomonly/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 9.998 | 9.998 | 9.998 Mbytes
Step KinEng v_dz c_v1 c_v2 c_f1 c_f2
0 8.3775804e-05 -0.00416 1 -1 0 0
10000 8.3775804e-05 -0.00414 1 -1 0 0
20000 8.3775804e-05 -0.00412 1 -1 0 0
30000 8.3775804e-05 -0.0041 1 -1 0 0
40000 8.3775804e-05 -0.00408 1 -1 0 0
50000 8.3775804e-05 -0.00406 1 -1 0 0
60000 8.3775804e-05 -0.00404 1 -1 0 0
70000 8.3775804e-05 -0.00402 1 -1 0 0
80000 8.3775804e-05 -0.004 1 -1 0 0
90000 8.3411065e-05 -0.003980019 0.99782075 -0.99782075 -0.023914747 0.023914747
100000 8.2852688e-05 -0.0039600945 0.9944753 -0.9944753 -0.032005131 0.032005131
110000 8.2139641e-05 -0.0039402463 0.99018672 -0.99018672 -0.039875404 0.039875404
120000 8.1272296e-05 -0.0039204934 0.98494496 -0.98494496 -0.048007824 0.048007824
130000 8.0246788e-05 -0.0039008551 0.97871113 -0.97871113 -0.056503872 0.056503872
140000 7.9058986e-05 -0.0038813518 0.97144075 -0.97144075 -0.065373554 0.065373554
150000 7.7705654e-05 -0.0038620047 0.9630903 -0.9630903 -0.074595879 0.074595879
160000 7.6184906e-05 -0.0038428357 0.95361959 -0.95361959 -0.084137355 0.084137355
170000 7.4496418e-05 -0.0038238676 0.94299284 -0.94299284 -0.093958893 0.093958893
180000 7.2641536e-05 -0.0038051239 0.93117907 -0.93117907 -0.10401872 0.10401872
190000 7.0623328e-05 -0.0037866285 0.91815243 -0.91815243 -0.11427372 0.11427372
200000 6.8446602e-05 -0.003768406 0.90389221 -0.90389221 -0.12468011 0.12468011
210000 6.6117901e-05 -0.0037504812 0.88838298 -0.88838298 -0.13519381 0.13519381
220000 6.3645478e-05 -0.0037328791 0.87161455 -0.87161455 -0.14577066 0.14577066
230000 6.1039243e-05 -0.003715625 0.85358204 -0.85358204 -0.1563666 0.1563666
240000 5.8310702e-05 -0.0036987442 0.83428576 -0.83428576 -0.16693776 0.16693776
250000 5.5472871e-05 -0.003682262 0.8137313 -0.8137313 -0.17744066 0.17744066
260000 5.2540172e-05 -0.0036662033 0.79192936 -0.79192936 -0.18783225 0.18783225
270000 4.9528314e-05 -0.003650593 0.76889577 -0.76889577 -0.19807012 0.19807012
280000 4.6454158e-05 -0.0036354555 0.74465137 -0.74465137 -0.20811258 0.20811258
290000 4.3335566e-05 -0.0036208149 0.71922195 -0.71922195 -0.21791884 0.21791884
300000 4.0191232e-05 -0.0036066944 0.69263807 -0.69263807 -0.22744912 0.22744912
310000 3.7040511e-05 -0.0035931168 0.66493499 -0.66493499 -0.23666485 0.23666485
320000 3.390323e-05 -0.0035801042 0.63615249 -0.63615249 -0.24552878 0.24552878
330000 3.0799488e-05 -0.0035676776 0.60633473 -0.60633473 -0.25400513 0.25400513
340000 2.7749462e-05 -0.0035558573 0.57553002 -0.57553002 -0.26205979 0.26205979
350000 2.4773197e-05 -0.0035446626 0.54379063 -0.54379063 -0.2696604 0.2696604
360000 2.1890403e-05 -0.0035341116 0.51117262 -0.51117262 -0.27677654 0.27677654
370000 1.9120254e-05 -0.0035242212 0.47773551 -0.47773551 -0.28337983 0.28337983
380000 1.6481181e-05 -0.0035150072 0.44354212 -0.44354212 -0.28944409 0.28944409
390000 1.3990689e-05 -0.0035064841 0.40865822 -0.40865822 -0.29494544 0.29494544
400000 1.1665166e-05 -0.003498665 0.37315233 -0.37315233 -0.2998624 0.2998624
410000 9.5197195e-06 -0.0034915617 0.33709536 -0.33709536 -0.304176 0.304176
420000 7.5680136e-06 -0.0034851844 0.30056032 -0.30056032 -0.30786987 0.30786987
430000 5.8221324e-06 -0.003479542 0.26362205 -0.26362205 -0.31093026 0.31093026
440000 4.2924559e-06 -0.0034746417 0.22635684 -0.22635684 -0.31334618 0.31334618
450000 2.9875585e-06 -0.0034704894 0.18884214 -0.18884214 -0.31510936 0.31510936
460000 1.9141264e-06 -0.0034670891 0.15115621 -0.15115621 -0.31621432 0.31621432
470000 1.0768988e-06 -0.0034644437 0.11337783 -0.11337783 -0.31665837 0.31665837
480000 4.786302e-07 -0.0034625541 0.075585893 -0.075585893 -0.31644161 0.31644161
490000 1.2007709e-07 -0.0034614198 0.037859142 -0.037859142 -0.31556689 0.31556689
500000 6.3727744e-12 -0.0034610388 0.0002758068 -0.0002758068 -0.31403982 0.31403982
510000 1.1522726e-07 -0.0034614073 -0.03708671 0.03708671 -0.31186864 0.31186864
520000 4.6064472e-07 -0.0034625203 -0.074152149 0.074152149 -0.30906426 0.30906426
530000 1.029334e-06 -0.0034643709 -0.1108457 0.1108457 -0.30564009 0.30564009
540000 1.812635e-06 -0.0034669512 -0.14709431 0.14709431 -0.30161199 0.30161199
550000 2.8002645e-06 -0.0034702513 -0.18282695 0.18282695 -0.29699817 0.29699817
560000 3.9804448e-06 -0.0034742603 -0.21797491 0.21797491 -0.29181905 0.29181905
570000 5.3400475e-06 -0.0034789659 -0.25247202 0.25247202 -0.28609717 0.28609717
580000 6.8647484e-06 -0.0034843545 -0.28625495 0.28625495 -0.27985701 0.27985701
590000 8.5391931e-06 -0.003490411 -0.31926339 0.31926339 -0.2731249 0.2731249
600000 1.0347171e-05 -0.0034971194 -0.35144026 0.35144026 -0.2659288 0.2659288
610000 1.2271792e-05 -0.0035044627 -0.38273192 0.38273192 -0.25829822 0.25829822
620000 1.429567e-05 -0.0035124225 -0.41308835 0.41308835 -0.25026402 0.25026402
630000 1.6401103e-05 -0.0035209797 -0.44246327 0.44246327 -0.24185823 0.24185823
640000 1.8570255e-05 -0.0035301142 -0.47081428 0.47081428 -0.23311393 0.23311393
650000 2.078533e-05 -0.0035398052 -0.498103 0.498103 -0.22406507 0.22406507
660000 2.3028745e-05 -0.003550031 -0.52429514 0.52429514 -0.21474628 0.21474628
670000 2.5283288e-05 -0.0035607695 -0.54936056 0.54936056 -0.20519274 0.20519274
680000 2.7532278e-05 -0.0035719977 -0.57327337 0.57327337 -0.19544002 0.19544002
690000 2.9759697e-05 -0.0035836926 -0.59601193 0.59601193 -0.18552392 0.18552392
700000 3.1950329e-05 -0.0035958303 -0.61755887 0.61755887 -0.17548034 0.17548034
710000 3.408987e-05 -0.0036083869 -0.63790112 0.63790112 -0.16534511 0.16534511
720000 3.6165032e-05 -0.0036213382 -0.65702988 0.65702988 -0.15515392 0.15515392
730000 3.8163631e-05 -0.00363466 -0.67494058 0.67494058 -0.14494218 0.14494218
740000 4.0074659e-05 -0.0036483277 -0.69163285 0.69163285 -0.13474489 0.13474489
750000 4.1888343e-05 -0.0036623172 -0.7071105 0.7071105 -0.1245966 0.1245966
760000 4.3596185e-05 -0.0036766041 -0.7213814 0.7213814 -0.11453133 0.11453133
770000 4.5190996e-05 -0.0036911645 -0.73445747 0.73445747 -0.1045825 0.1045825
780000 4.6666906e-05 -0.0037059745 -0.74635458 0.74635458 -0.094782939 0.094782939
790000 4.8019368e-05 -0.0037210109 -0.75709246 0.75709246 -0.085164857 0.085164857
800000 4.9245153e-05 -0.0037362507 -0.76669467 0.76669467 -0.075759891 0.075759891
810000 5.0342325e-05 -0.0037516713 -0.77518852 0.77518852 -0.066599178 0.066599178
820000 5.1310215e-05 -0.003767251 -0.78260499 0.78260499 -0.057713474 0.057713474
830000 5.2149388e-05 -0.0037829686 -0.78897875 0.78897875 -0.049133335 0.049133335
840000 5.2861601e-05 -0.0037988035 -0.79434809 0.79434809 -0.040889384 0.040889384
850000 5.3449761e-05 -0.0038147361 -0.79875498 0.79875498 -0.03301269 0.03301269
860000 5.3917883e-05 -0.0038307476 -0.80224517 0.80224517 -0.025535302 0.025535302
870000 5.4271056e-05 -0.0038468201 -0.80486832 0.80486832 -0.018491033 0.018491033
880000 5.4515415e-05 -0.0038629369 -0.80667827 0.80667827 -0.011916591 0.011916591
890000 5.4658137e-05 -0.0038790822 -0.80773352 0.80773352 -0.00585333 0.00585333
900000 5.4707463e-05 -0.0038952416 -0.80809791 0.80809791 -0.00035001143 0.00035001143
910000 5.4672786e-05 -0.003911402 -0.80784176 0.80784176 0.0045325009 -0.0045325009
920000 5.4564826e-05 -0.0039275517 -0.80704376 0.80704376 0.0087126344 -0.0087126344
930000 5.4396015e-05 -0.0039436807 -0.80579439 0.80579439 0.012070422 -0.012070422
940000 5.4181322e-05 -0.0039597811 -0.80420264 0.80420264 0.014404618 -0.014404618
950000 5.3940325e-05 -0.0039758475 -0.80241211 0.80241211 0.015295834 -0.015295834
960000 5.3704817e-05 -0.0039918778 -0.8006585 0.8006585 0.013305187 -0.013305187
970000 5.3616513e-05 -0.0040078808 -0.79999999 0.79999999 0 0
980000 5.3616513e-05 -0.0040238808 -0.79999999 0.79999999 0 0
990000 5.3616513e-05 -0.0040398808 -0.79999999 0.79999999 0 0
1000000 5.3616513e-05 -0.0040558808 -0.79999999 0.79999999 0 0
Loop time of 0.572025 on 1 procs for 1000000 steps with 2 atoms
99.3% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.1248 | 0.1248 | 0.1248 | 0.0 | 21.82
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.21166 | 0.21166 | 0.21166 | 0.0 | 37.00
Output | 0.00057419 | 0.00057419 | 0.00057419 | 0.0 | 0.10
Modify | 0.12695 | 0.12695 | 0.12695 | 0.0 | 22.19
Other | | 0.108 | | | 18.89
Nlocal: 2 ave 2 max 2 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 1 ave 1 max 1 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 1
Ave neighs/atom = 0.5
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:01