Closed sgbaird closed 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
@VasiliBaranov ok, thanks for the comments. Sounds like it requires a bit of tuning to work for arbitrary particle size distributions, which is OK.
Reproducer: https://colab.research.google.com/drive/1wjF6tuGZa3opIWpXIYiKJtmpqBVSpj1E?usp=sharing
Example particle size distribution (100 particles):
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:
If I make the box 2x the summed volume of the particles, sometimes it works, sometimes I get the same ERROR: innerDiameterRatio.