← Back to Home Packing

Random Close Packing Algorithm

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.

Algorithm Overview

The procedure relies on an iterative swell–contract–minimize cycle:

  1. Initialize a random arrangement of non-overlapping particles.
  2. Gradually swell all particles until overlaps appear.
  3. Apply energy minimization to remove overlaps (move particles to nearest non-overlapping configuration).
  4. If energy minimization succeeds, swell again; otherwise contract particles and retry.
  5. Repeat, slowly decreasing the swell/contract step size, until a jammed (RCP) configuration is reached.
Animation showing the RCP algorithm evolving: particles swell, overlap, then minimize energy repeatedly until a jammed configuration is reached

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 of the RCP generation algorithm

Flowchart illustrating the swell–contract–minimize procedure.

Example 2D random close packing of binary disks

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).


← Back to Home