A custom particle packing algorithm was developed (based on a method proposed by Xu et al.1) to generate random close packings of hard disks in 2D and hard spheres in 3D. The algorithm is available for download and has been used as the foundation for subsequent packing studies.
The procedure relies on an iterative swell–contract–minimize cycle:
Animation of the algorithm in action — particles (shown as disks) swell, develop overlaps, and are repositioned by energy minimization. The cycle repeats with a decreasing step size until a random close packing is reached.
Flowchart illustrating the swell–contract–minimize procedure.
An example random close packing of binary 2D disks generated by the algorithm.
This algorithm can produce both monodisperse and polydisperse sphere and disk packings, and has been extended to confined geometries (see Confined RCP).
1 N. Xu, J. Blawzdziewicz, and C.S. O'Hern, Phys. Rev. E 71, 061306 (2005).