VasiliBaranov / packing-generation

Hard-sphere packing generation in C++ with the Lubachevsky–Stillinger, Jodrey–Tory, and force-biased algorithms and packing post-processing.
MIT License
107 stars 44 forks source link

packing.nfo not generated for packing with high max/min diameter ratios #36

Closed sgbaird closed 2 years ago

sgbaird commented 2 years ago

Reproducer: https://colab.research.google.com/drive/1wjF6tuGZa3opIWpXIYiKJtmpqBVSpj1E?usp=sharing

Example particle size distribution (100 particles): image

/content/packing-generation/_Release
615eef3f-a50e-4c5a-8a02-f4c8664219c0
LittleEndian
The current working directory is /content/packing-generation/_Release/615eef3f-a50e-4c5a-8a02-f4c8664219c0.

N is 100
dimensions are 12.690938 12.690938 12.690938
generation mode: start
seed 0
steps to write intermediate state 1000
boundaries mode is 1

Reading particle diameters from a file 'diameters'...
done.
Contraction rate is 0.001
Total volume of particles is 2044
Theoretical porosity is -6.66134e-14
Global minimum is 0.0567202
Step 0. Inner diameter ratio is 0.268534564590648. Outer diameter ratio is 1.061595910613429. Writing int. packing state...Contraction rate: 1.000000e-03
done.
Checking...
Calc. porosity is 0.340363
Theoretical porosity is -6.66134e-14
Checking min particle distance in a naive way...
Finish:
Calc. porosity is  0.3403630721933
Theoretical porosity is -6.66134e-14
Inner diameter ratio is 0.870499087313286
Time: 0.038238 s, iterations are 280
Calculating contraction energies

LittleEndian
The current working directory is /content/packing-generation/_Release/615eef3f-a50e-4c5a-8a02-f4c8664219c0.

N is 100
dimensions are 12.690938 12.690938 12.690938
generation mode: continue
seed 0
steps to write intermediate state 1000
boundaries mode is 1

file '/content/packing-generation/_Release/615eef3f-a50e-4c5a-8a02-f4c8664219c0/packing.xyzd' was opened
Contraction rate is 0.001
Total volume of particles is 2044
Theoretical porosity is -6.66134e-14
Global minimum is 0.870499
Time: 2.03234, reduced pressure: 41.7863, actual temperature: 0.247458
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.872531425504190, expected: 0.858219203256746. Closest pair: 0, 24
Step 0. Inner diameter ratio is 0.872531425504190. Outer diameter ratio is 1.000000000000000. Writing int. packing state...Contraction rate: 1.000000e-03
done.
Time: 2.13149, reduced pressure: 35.1547, actual temperature: 0.240431
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.874662915641840, expected: 0.872177081019122. Closest pair: 0, 24
Time: 1.96991, reduced pressure: 39.2017, actual temperature: 0.241937
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.876632821154769, expected: 0.869545286185858. Closest pair: 0, 24
Time: 2.07057, reduced pressure: 35.0467, actual temperature: 0.238651
Time: 2.11641, reduced pressure: 39.2801, actual temperature: 0.245527
Time: 2.24999, reduced pressure: 34.7249, actual temperature: 0.241917
Time: 1.78438, reduced pressure: 45.0099, actual temperature: 0.243565
Time: 1.24223, reduced pressure: 73.0244, actual temperature: 0.251057
Time: 0.725597, reduced pressure: 137.603, actual temperature: 0.258058
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.886821990946570, expected: 0.885993058823642. Closest pair: 0, 24
Time: 0.437007, reduced pressure: 251.462, actual temperature: 0.266015
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.887258997665456, expected: 0.887201322803208. Closest pair: 24, 43
Time: 0.318485, reduced pressure: 340.885, actual temperature: 0.265023
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.887577483108028, expected: 0.887410321181915. Closest pair: 3, 43
Time: 0.198538, reduced pressure: 575.626, actual temperature: 0.26969
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.887776021441742, expected: 0.887718405947486. Closest pair: 0, 24
Time: 0.128877, reduced pressure: 911.541, actual temperature: 0.272404
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.887904898471758, expected: 0.887823032976059. Closest pair: 0, 24
Time: 0.0720396, reduced pressure: 1825.02, actual temperature: 0.284634
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.887976938063059, expected: 0.887950103595420. Closest pair: 0, 24
Time: 0.0453309, reduced pressure: 3304.67, actual temperature: 0.302389
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888022268953569, expected: 0.887865869458824. Closest pair: 0, 24
Time: 0.0300462, reduced pressure: 5235.14, actual temperature: 0.310321
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888052315133730, expected: 0.888015029004775. Closest pair: 0, 24
Time: 0.0197428, reduced pressure: 8317.68, actual temperature: 0.317995
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888072057891825, expected: 0.888071749194321. Closest pair: 24, 43
Time: 0.0143102, reduced pressure: 12137.2, actual temperature: 0.329141
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888086368081621, expected: 0.888057579659688. Closest pair: 0, 24
Time: 0.00969165, reduced pressure: 18096.4, actual temperature: 0.331215
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888096059735518, expected: 0.888095377352793. Closest pair: 24, 43
Time: 0.00727614, reduced pressure: 24139.7, actual temperature: 0.331535
Time: 0.00497973, reduced pressure: 34675, actual temperature: 0.327911
Time: 0.0040525, reduced pressure: 44165.4, actual temperature: 0.33571
Time: 0.00304223, reduced pressure: 58646, actual temperature: 0.335015
Time: 0.00239103, reduced pressure: 75175.2, actual temperature: 0.336697
Time: 0.00167042, reduced pressure: 102965, actual temperature: 0.32711
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888119471781860, expected: 0.888119184108935. Closest pair: 0, 24
Time: 0.00124611, reduced pressure: 143073, actual temperature: 0.334821
Time: 0.000978815, reduced pressure: 179563, actual temperature: 0.331695
Time: 0.000768301, reduced pressure: 229508, actual temperature: 0.332386
Time: 0.000595227, reduced pressure: 307196, actual temperature: 0.340684
Time: 0.000463368, reduced pressure: 394442, actual temperature: 0.34059
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888123523604581, expected: 0.888123123126956. Closest pair: 24, 43
Time: 0.000349462, reduced pressure: 529488, actual temperature: 0.343559
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888123873066098, expected: 0.888123678510602. Closest pair: 0, 24
Time: 0.000263891, reduced pressure: 679090, actual temperature: 0.336015
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124136956680, expected: 0.888123913935708. Closest pair: 3, 43
Time: 0.000194821, reduced pressure: 936191, actual temperature: 0.340077
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124331777806, expected: 0.888124281620214. Closest pair: 0, 24
Time: 0.000151705, reduced pressure: 1.19606e+06, actual temperature: 0.338882
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124483482476, expected: 0.888124470268674. Closest pair: 0, 24
Time: 0.00011394, reduced pressure: 1.61981e+06, actual temperature: 0.342943
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124597422171, expected: 0.888124401022787. Closest pair: 0, 24
Time: 8.33956e-05, reduced pressure: 2.14501e+06, actual temperature: 0.335595
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124680817750, expected: 0.888124652371488. Closest pair: 0, 24
Time: 6.49978e-05, reduced pressure: 2.84382e+06, actual temperature: 0.343306
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124745815579, expected: 0.888124547362719. Closest pair: 0, 24
Time: 4.8273e-05, reduced pressure: 3.74341e+06, actual temperature: 0.337917
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124794088578, expected: 0.888124735293913. Closest pair: 0, 24
Time: 3.78682e-05, reduced pressure: 4.70468e+06, actual temperature: 0.334686
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124831956825, expected: 0.888124802186537. Closest pair: 24, 43
Time: 2.78163e-05, reduced pressure: 6.34725e+06, actual temperature: 0.332664
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124859773153, expected: 0.888124834308312. Closest pair: 0, 24
Time: 2.13031e-05, reduced pressure: 8.52998e+06, actual temperature: 0.339208
Time: 1.66588e-05, reduced pressure: 1.06895e+07, actual temperature: 0.334574
Time: 1.27605e-05, reduced pressure: 1.4238e+07, actual temperature: 0.339164
Time: 9.47277e-06, reduced pressure: 1.90207e+07, actual temperature: 0.337231
Time: 7.40091e-06, reduced pressure: 2.47026e+07, actual temperature: 0.340654
Time: 5.64896e-06, reduced pressure: 3.19593e+07, actual temperature: 0.33768
Time: 4.40068e-06, reduced pressure: 4.08692e+07, actual temperature: 0.336829
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124937418823, expected: 0.888124929900271. Closest pair: 0, 24
Time: 3.35764e-06, reduced pressure: 5.49978e+07, actual temperature: 0.343093
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124940776465, expected: 0.888124940008457. Closest pair: 24, 43
Time: 2.45967e-06, reduced pressure: 7.36557e+07, actual temperature: 0.33851
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124943236132, expected: 0.888124937441880. Closest pair: 0, 24
Time: 1.91418e-06, reduced pressure: 9.78534e+07, actual temperature: 0.346605
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124945150310, expected: 0.888124943077989. Closest pair: 0, 24
Time: 1.36807e-06, reduced pressure: 1.30483e+08, actual temperature: 0.335118
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124946518377, expected: 0.888124946270800. Closest pair: 0, 24
Time: 1.0529e-06, reduced pressure: 1.70777e+08, actual temperature: 0.33678
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124947571277, expected: 0.888124943230314. Closest pair: 0, 24
Time: 7.85988e-07, reduced pressure: 2.27036e+08, actual temperature: 0.335043
Time: 6.43238e-07, reduced pressure: 2.83682e+08, actual temperature: 0.340189
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124949000503, expected: 0.888124945147121. Closest pair: 0, 24
Time: 4.48803e-07, reduced pressure: 3.87193e+08, actual temperature: 0.329281
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124949449306, expected: 0.888124949390370. Closest pair: 0, 24
Time: 3.75199e-07, reduced pressure: 4.84951e+08, actual temperature: 0.339523
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124949824505, expected: 0.888124949538411. Closest pair: 24, 43
Time: 2.67878e-07, reduced pressure: 6.60908e+08, actual temperature: 0.333275
Time: 2.10428e-07, reduced pressure: 8.46048e+08, actual temperature: 0.334524
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950302810, expected: 0.888124950139057. Closest pair: 0, 24
Time: 1.63319e-07, reduced pressure: 1.11551e+09, actual temperature: 0.339825
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950466129, expected: 0.888124949949867. Closest pair: 24, 43
Time: 1.20645e-07, reduced pressure: 1.48859e+09, actual temperature: 0.336508
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950586774, expected: 0.888124949737184. Closest pair: 0, 24
Time: 8.99664e-08, reduced pressure: 1.96458e+09, actual temperature: 0.332916
Time: 7.2708e-08, reduced pressure: 2.52827e+09, actual temperature: 0.341964
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950749449, expected: 0.888124950495066. Closest pair: 0, 24
Time: 5.2762e-08, reduced pressure: 3.46758e+09, actual temperature: 0.340827
Time: 4.05673e-08, reduced pressure: 4.42268e+09, actual temperature: 0.336274
Time: 3.10054e-08, reduced pressure: 5.77232e+09, actual temperature: 0.335707
Time: 2.32128e-08, reduced pressure: 7.69072e+09, actual temperature: 0.335152
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950896996, expected: 0.888124950888010. Closest pair: 0, 24
Time: 1.78001e-08, reduced pressure: 1.00927e+10, actual temperature: 0.336561
Time: 1.43013e-08, reduced pressure: 1.22378e+10, actual temperature: 0.330788
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950929097, expected: 0.888124950904982. Closest pair: 24, 43
Time: 9.70123e-09, reduced pressure: 1.84016e+10, actual temperature: 0.335122
Time: 8.44097e-09, reduced pressure: 2.1086e+10, actual temperature: 0.334469
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950947240, expected: 0.888124950946906. Closest pair: 0, 24
Time: 6.04786e-09, reduced pressure: 2.96615e+10, actual temperature: 0.336224
Time: 4.68453e-09, reduced pressure: 3.86747e+10, actual temperature: 0.338533
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950957972, expected: 0.888124950951997. Closest pair: 0, 24
Time: 3.52576e-09, reduced pressure: 5.08445e+10, actual temperature: 0.336077
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950961498, expected: 0.888124950960737. Closest pair: 0, 24
Time: 2.76544e-09, reduced pressure: 6.60226e+10, actual temperature: 0.340324
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950964263, expected: 0.888124950963174. Closest pair: 0, 24
Time: 2.11439e-09, reduced pressure: 8.57608e+10, actual temperature: 0.338719
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950966378, expected: 0.888124950959801. Closest pair: 0, 24
Time: 1.5897e-09, reduced pressure: 1.13562e+11, actual temperature: 0.337687
Time: 1.17189e-09, reduced pressure: 1.52802e+11, actual temperature: 0.335822
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950969139, expected: 0.888124950967753. Closest pair: 3, 43
Time: 9.21799e-10, reduced pressure: 1.97296e+11, actual temperature: 0.339406
Time: 7.05235e-10, reduced pressure: 2.55421e+11, actual temperature: 0.337189
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950970766, expected: 0.888124950969074. Closest pair: 0, 24
Time: 5.18631e-10, reduced pressure: 3.40506e+11, actual temperature: 0.332728
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950971285, expected: 0.888124950970460. Closest pair: 24, 43
Time: 4.05305e-10, reduced pressure: 4.33934e+11, actual temperature: 0.331828
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950971690, expected: 0.888124950971187. Closest pair: 24, 43
Time: 3.16502e-10, reduced pressure: 5.66165e+11, actual temperature: 0.336002
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972007, expected: 0.888124950971782. Closest pair: 24, 43
Time: 2.28905e-10, reduced pressure: 7.86642e+11, actual temperature: 0.337095
Time: 1.84083e-10, reduced pressure: 9.76206e+11, actual temperature: 0.336626
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972420, expected: 0.888124950972354. Closest pair: 24, 43
Time: 1.34849e-10, reduced pressure: 1.32361e+12, actual temperature: 0.335107
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972555, expected: 0.888124950972484. Closest pair: 0, 24
Checking...
Calc. porosity is 0.299477
Theoretical porosity is -6.66134e-14
Checking min particle distance in a naive way...
Finish:
Calc. porosity is 0.299477298386542
Theoretical porosity is -6.66134e-14
Inner diameter ratio is 0.888124950972555
Time: 0.970371 s, iterations are 85
Calculating contraction energies

LittleEndian
The current working directory is /content/packing-generation/_Release/615eef3f-a50e-4c5a-8a02-f4c8664219c0.

N is 100
dimensions are 12.690938 12.690938 12.690938
generation mode: continue
seed 0
steps to write intermediate state 1000
boundaries mode is 1

file '/content/packing-generation/_Release/615eef3f-a50e-4c5a-8a02-f4c8664219c0/packing.xyzd' was opened
Contraction rate is 0.001
Total volume of particles is 2044
Theoretical porosity is -6.66134e-14
Global minimum is 0.888125
Time: 2.11903e-10, reduced pressure: 5.27718e+11, actual temperature: 0.267858
Step 0. Inner diameter ratio is 0.888124950972696. Outer diameter ratio is 1.000000000000000. Writing int. packing state...Contraction rate: 1.000000e-03
done.
Time: 9.94528e-11, reduced pressure: 1.4181e+12, actual temperature: 0.293674
Suppress growth
Time: 8.24691e-11, reduced pressure: 2.50277e+12, actual temperature: 0.2
Time: 7.97127e-11, reduced pressure: 2.52863e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972692. Closest pair: 0, 24
Time: 8.54122e-11, reduced pressure: 2.44521e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972783. Closest pair: 0, 24
Time: 8.57076e-11, reduced pressure: 2.39202e+12, actual temperature: 0.2
Time: 8.61671e-11, reduced pressure: 2.39651e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972634. Closest pair: 0, 24
Time: 8.32993e-11, reduced pressure: 2.49758e+12, actual temperature: 0.2
Time: 7.97459e-11, reduced pressure: 2.55133e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972691. Closest pair: 0, 24
Time: 8.13841e-11, reduced pressure: 2.51685e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972725. Closest pair: 24, 43
Time: 8.33295e-11, reduced pressure: 2.55027e+12, actual temperature: 0.2
Time: 8.60635e-11, reduced pressure: 2.35038e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972197. Closest pair: 0, 24
Time: 8.15678e-11, reduced pressure: 2.49466e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972780. Closest pair: 0, 24
Time: 8.23471e-11, reduced pressure: 2.47745e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972680. Closest pair: 0, 24
Time: 8.57481e-11, reduced pressure: 2.42928e+12, actual temperature: 0.2
Time: 7.94471e-11, reduced pressure: 2.5582e+12, actual temperature: 0.2
Time: 7.84117e-11, reduced pressure: 2.57431e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972748. Closest pair: 0, 24
Time: 8.08902e-11, reduced pressure: 2.43232e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972772. Closest pair: 24, 43
Time: 8.23015e-11, reduced pressure: 2.55082e+12, actual temperature: 0.2
Time: 7.81757e-11, reduced pressure: 2.55738e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972781. Closest pair: 0, 24
Time: 8.66154e-11, reduced pressure: 2.38603e+12, actual temperature: 0.2
Time: 7.88405e-11, reduced pressure: 2.53131e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972553. Closest pair: 0, 24
Time: 7.86924e-11, reduced pressure: 2.56776e+12, actual temperature: 0.2
Time: 8.9915e-11, reduced pressure: 2.35421e+12, actual temperature: 0.2
Time: 8.26465e-11, reduced pressure: 2.55301e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972757. Closest pair: 24, 43
Time: 7.96781e-11, reduced pressure: 2.48309e+12, actual temperature: 0.2
Time: 8.38392e-11, reduced pressure: 2.46671e+12, actual temperature: 0.2
Time: 8.07626e-11, reduced pressure: 2.53379e+12, actual temperature: 0.2
Time: 8.45101e-11, reduced pressure: 2.50441e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972431. Closest pair: 0, 24
Time: 8.04457e-11, reduced pressure: 2.46429e+12, actual temperature: 0.2
Time: 7.26846e-11, reduced pressure: 2.58405e+12, actual temperature: 0.2
Time: 7.99804e-11, reduced pressure: 2.48177e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972676. Closest pair: 0, 24
Time: 8.06201e-11, reduced pressure: 2.50764e+12, actual temperature: 0.2
Time: 7.98475e-11, reduced pressure: 2.47912e+12, actual temperature: 0.2
Time: 8.03389e-11, reduced pressure: 2.51578e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972440. Closest pair: 0, 24
Time: 8.53934e-11, reduced pressure: 2.46788e+12, actual temperature: 0.2
Time: 8.32802e-11, reduced pressure: 2.40697e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972551. Closest pair: 0, 24
Time: 7.84948e-11, reduced pressure: 2.43838e+12, actual temperature: 0.2
Time: 8.00278e-11, reduced pressure: 2.54963e+12, actual temperature: 0.2
Time: 8.00572e-11, reduced pressure: 2.52122e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972770. Closest pair: 0, 24
Time: 8.13443e-11, reduced pressure: 2.48355e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972740. Closest pair: 24, 43
Time: 8.3293e-11, reduced pressure: 2.4641e+12, actual temperature: 0.2
Time: 7.66313e-11, reduced pressure: 2.6338e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972769. Closest pair: 0, 24
Time: 8.484e-11, reduced pressure: 2.46763e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972721. Closest pair: 0, 24
Time: 7.58448e-11, reduced pressure: 2.70016e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972750. Closest pair: 0, 24
Time: 8.3999e-11, reduced pressure: 2.43183e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972763. Closest pair: 24, 43
Time: 8.43668e-11, reduced pressure: 2.41867e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972618. Closest pair: 0, 24
Time: 8.4066e-11, reduced pressure: 2.52918e+12, actual temperature: 0.2
Time: 8.40129e-11, reduced pressure: 2.58678e+12, actual temperature: 0.2
Time: 8.21225e-11, reduced pressure: 2.48699e+12, actual temperature: 0.2
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.888124950972795, expected: 0.888124950972730. Closest pair: 0, 24
Time: 8.11861e-11, reduced pressure: 2.50615e+12, actual temperature: 0.2
Time: 8.36447e-11, reduced pressure: 2.51575e+12, actual temperature: 0.2
Equilibration lasted for 50 rounds, but pressure is still high. Packing is almost jammed.
Checking...
Calc. porosity is 0.299477
Theoretical porosity is -6.66134e-14
Checking min particle distance in a naive way...
Finish:
Calc. porosity is 0.299477298385973
Theoretical porosity is -6.66134e-14
Inner diameter ratio is 0.888124950972795
Time: 0.6503 s, iterations are 52
Calculating contraction energies

d8f54687-5eec-432e-b3ee-9118e80236eb
LittleEndian
The current working directory is /content/packing-generation/_Release/d8f54687-5eec-432e-b3ee-9118e80236eb.

N is 100
dimensions are 10.906808 10.906808 10.906808
generation mode: start
seed 1
steps to write intermediate state 1000
boundaries mode is 1

Reading particle diameters from a file 'diameters'...
done.

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<timed exec> in <module>

<timed exec> in <listcomp>(.0)

[<ipython-input-70-847338fa7ea5>](https://localhost:8080/#) in particle_packing_simulation(means, stds, comps, num_particles, contraction_rate, seed, data_dir, util_dir, uid)
     88     f.writelines(lines)
     89 
---> 90   os.remove(packing_nfo_fpath)
     91   run_simulation("-ls", util_dir=util_dir, data_dir=data_dir, uid=uid)
     92 

FileNotFoundError: [Errno 2] No such file or directory: './d8f54687-5eec-432e-b3ee-9118e80236eb/packing.nfo'

I've tried playing around with the box size with no luck. If I make it small (half that of the sum of all particle volumes), I get the above issue. If I make it large (five times the sum of all particle volumes), I get:

WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 1.548295491247849, expected: 1.337333252206016. Closest pair: 16, 24
Time: 0, reduced pressure: inf, actual temperature: 0.200085
WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 1.548295491247849, expected: 1.337333252206016. Closest pair: 16, 24
Checking...
Calc. porosity is 0.257679
Theoretical porosity is 0.8
Checking min particle distance in a naive way...
ERROR: innerDiameterRatio 1.5483 is not equal to min normalized distance from naive computation 1.33733 in the pair 16 24. Probably bugs in distance provider.
InnerDiameterRatio is not equal to min normalized distance from naive computation.

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<timed exec> in <module>

<timed exec> in <listcomp>(.0)

[<ipython-input-74-bf6ac0b55a01>](https://localhost:8080/#) in particle_packing_simulation(means, stds, comps, num_particles, contraction_rate, seed, data_dir, util_dir, uid)
     91   run_simulation("-ls", util_dir=util_dir, data_dir=data_dir, uid=uid)
     92 
---> 93   os.remove(packing_nfo_fpath)
     94   run_simulation("-lsgd", util_dir=util_dir, data_dir=data_dir, uid=uid)
     95 

FileNotFoundError: [Errno 2] No such file or directory: './cd48c8d8-18f0-41a4-9d50-d134b24ad39b/packing.nfo'

If I make the box 2x the summed volume of the particles, sometimes it works, sometimes I get the same ERROR: innerDiameterRatio.

VasiliBaranov commented 2 years ago

Hi @sgbaird ,

This happens because of this https://github.com/VasiliBaranov/packing-generation/issues/19#issuecomment-640264012 . Quoting from the ticket

It happens because the program uses some heuristics to track nearest neighbors in the LS algorithm and the heuristics breaks at low densities.

This is why you can "pre-generate" a packing with the FBA algorithm at first. But your contraction rate for the FBA seems to be too high (in the combination with the final density you specified), and it doesn't have time to pre-generate a packing.

Please see the last paragraph here: https://github.com/VasiliBaranov/packing-generation#14-note-on-final-diameters . Copy:

You can find the dependence of the final packing density on the contraction rate for packings with different radii distributions (monodisperse and log-normal with relative standard deviations 0.05-0.3) for the Lubachevsky–Stillinger and force-biased algorithms in Figs. 2a and c in Baranau and Tallarek, (2014). Please note that the plot for the FB algorithm assumes a certain dependence of expected packings densities φexp on the contraction rate > γ: φexp = φmin + (φmax - φmin) / (lnγslow - lnγfast) * (lnγfast - lnγ). It is basically a line in the plane (lnγ, φexp) through the points (lnγfast, φmin) and (lnγslow, φmax), where the following parameters were used: γfast = 10-3, φmin = 0.6, γslow = 10-7, φmax = 0.7.

So you can find the dependence of the final density on the contraction rate for the FBA here https://pubs.rsc.org/en/content/articlehtml/2014/sm/c3sm52959b#imgfig2, but as mentioned in the README, it heavily depends on what is the density that has to be achieved. But essentially, for the first FBA run, you can either make the box bigger, or make diameters proportionally smaller (take 80% or so), or play with the contraction rate. Use 1e-4 instead of 1e-3. for example. And when your density after the first FBA run is around 40% or 60% (maybe even less, i don't remember already), you are good to go with the LS algorithm, if you need it at all. You can also achieve the desired density with the FBA algorithm alone (but it's less "physical").

Best Regards, Vasili

sgbaird commented 2 years ago

@VasiliBaranov ok, thanks for the comments. Sounds like it requires a bit of tuning to work for arbitrary particle size distributions, which is OK.