1 Introduction

Random sequential adsorption (RSA) is one of numerical protocols that allow to generate random packing of any objects [1, 2]. It is based on the iteration of two simple steps:

  • a virtual particle is created. Its position and orientation within a packing is selected randomly.

  • the virtual particle is tested for overlaps with any of the other particles in the packing. If no overlap is found, it is added to the packing and holds its position and orientation until the end of simulations. Otherwise, the virtual particle is removed from the packing and abandoned.

A random packing is saturated when there is no possibility to place another particle in it. The name of RSA is related to irreversible adsorption processes where particles are randomly placed on a surface or interface [3,4,5] – one iteration of RSA algorithm corresponds to one adsorption attempt of a single particle. However, RSA applications are much wider including soft matter [6], telecommunication [7], information theory [8] and mathematics [9].

The main problem of RSA is its efficiency when packing is almost saturated. For such packings the probability of placing another particle is very small. Therefore, a large number of iterations is needed to add a particle and packing’s growth becomes very slow. According to Feder’s law, density of particles in an infinite packing changes with the number of adsorption attempts according to the following relation [10,11,12,13]:

$$\begin{aligned} \rho (t) = \rho - A t^{-1/d}. \end{aligned}$$

Here, \(\rho \) is the density of particles in a saturated packing, \(\rho (t)\) is the density of particles in a packing after time t, A is a positive constant and d equals to packing dimension in case of spherically symmetric shapes (line segments in one dimension, disks in two dimensions, spheres in three dimensions, etc.).

The time t equals to the number of attempts of adding a particle per unit length for one dimensional packings, area for two dimensional packings, volume for three dimensional packings, etc.

The relation (1) was tested numerically to be valid for large enough, but finite packings [1, 14,15,16]. It is commonly used to estimate the number of particles at jamming, however it does not give any hints related to the number of RSA iterations needed to saturate a packing.

Recently, Zhang et al. have improved RSA algorithm, and showed that it is possible to generate saturated random packings of spherically symmetric particles in a reasonable simulation time [17]. The algorithm is based on tracking the area where placing subsequent particles is possible. The idea comes from earlier works concerning RSA on discrete lattices [18] and deposition of oriented squares on a continuous surface [19]. When particle is added to the packing this available area decreases. When it vanishes completely the packing is saturated. Because a single sampling of a particle centre from the available area of size s is equivalent to S / s samplings from the whole packing, this method makes it possible to determine number of RSA iterations in original protocol needed to saturate finite packing.

The aim of this paper is to analyse properties of this number as a random variable. In particular, it is interesting to investigate how it depends on packing size, since a recent study suggests that its median scales according to the power-law with an exponent equal to packing dimension [20].

2 Details of Numerical Simulations

Saturated random packing were generated using method described in detail in [17]. Line segments, disks and spheres, were packed onto a large line segment, square, and cube, respectively. In all these cases, periodic boundary conditions were used. The size (length, area or volume depending on a packing dimension) of packings varied from \(10^4\) to \(4 \times 10^7\) and a single shape had a unit volume. For each particular set-up at least 100 of independent packings were created. For each of the saturated packings, the value of t was recorded at the moment when the last particle was added.

3 Results and Discussion

3.1 Distribution of Simulation Time

Example of distributions of time needed to get saturated packings of line segments, disks, and spheres obtained from RSA simulations are shown in Fig. 1. To study the time after which simulation ends lets focus on the probability of placing a particle in the packing, as the inverse of this probability is proportional to the expected number of iterations needed to find a large enough place for that particle. This probability has already been studied by Pomeau [10] and Swendsen [11]. For sufficiently long times, in a non-saturated packing, there are separate regions where subsequent particles can be placed (see Fig. 2). Swendsen assumed that independently of packing dimension, the linear size of such regions is uniformly distributed [11], which has been recently confirmed in numerical experiments for two dimensional random packings [20]. This assumption leads to the following distribution of regions sizes:

$$\begin{aligned} p_\mathrm {s}(x) = \frac{x^{-\frac{d - 1}{d}}}{d \, {s_{0}}^\frac{1}{d}}, \end{aligned}$$

where s is a random variable denoting the volume of a region, \(s_0\) is the volume of the largest region, and

$$\begin{aligned} p_\mathrm {s}(x) \equiv \lim _{dx\rightarrow 0} \frac{Prob(x< s < x+dx)}{dx}. \end{aligned}$$

To saturate a packing all such regions should be filled. Probability of placing a centre of a particle inside a region is proportional to its area. Because these regions are well separated, placing a subsequent disk in one region does not affect the probability of filling any other region. This means that, statistically, smaller regions will be filled later than larger ones; thus, the last region to be filled should be the smallest one. Therefore, the distribution of iterations needed to generate saturated packing is directly related to the distribution of the sizes of the smallest region. The cumulative distribution function of region area size is

$$\begin{aligned} F_\mathrm {s}(x) \equiv Prob(s<x) = \int _0^x p_\mathrm {s}(t) dt = \left( \frac{x}{s_{0}} \right) ^{\frac{1}{d}}. \end{aligned}$$
Fig. 1
figure 1

Histograms of RSA iterations per unit area needed to saturate d-dimensional packings. Dots represent numerical data obtained from numerically generated \(10^4\) packings of size \(S=10^6\) for \(d=1\) and \(d=2\), and \(S=10^5\) for \(d=3\). Lines correspond to power fits: \(2.23 \times 10^{15} \cdot t^{-2}\), \(2.41 \times 10^{21} \cdot t^{-1.5}\) and \(1.06 \times 10^{24} \cdot t^{-1.333}\) for \(d=1\), 2, and 3, respectively

Fig. 2
figure 2

Fragment of a non-saturated two-dimensional packing of disks with regions (the triangle-like areas) where centres of subsequent disks can be placed. On the right the magnification of one such region. The diameter of circles is twice as large as the diameter of disks

The probability that a random variable \(s_\mathrm {min}\), being the minimum of n independent random variables s is smaller than a given value x is:

$$\begin{aligned} Prob(s_\mathrm {min}<x)= & {} 1 - \underbrace{Prob(s>x)\cdot Prob(s>x) \cdot \dots \cdot Prob(s>x)}_{n \,\,\mathrm { times}} \nonumber \\= & {} 1 - \left[ 1 - Prob(s<x) \right] ^n. \end{aligned}$$

Thus, the cumulative distribution function of the \(s_\mathrm {min}\), is equal to:

$$\begin{aligned} F_\mathrm {s_\mathrm {min}}(x) = 1 - \left[ 1 - F_\mathrm {s}(x) \right] ^n = 1 - \left[ 1 - \left( \frac{x}{s_{0}} \right) ^{\frac{1}{d}} \right] ^n, \end{aligned}$$

and the probability distribution function of \(s_\mathrm {min}\) is

$$\begin{aligned} p_\mathrm {s_\mathrm {min}}(x) = \frac{n}{d {s_0}^{\frac{1}{d}}} \, x^{\frac{1}{d}-1} \left[ 1 - \left( \frac{x}{s_0}\right) ^\frac{1}{d}\right] ^{n-1}. \end{aligned}$$

Note that asymptotically for \(x \ll s_0\), the expression in square brackets is practically equal to 1, thus, \(p_\mathrm {s_\mathrm {min}}(x) \sim x^{1/d - 1}\). As noted previously, the number of iterations \(t_\mathrm {max}\) needed to create saturated packing is inversely proportional to \(s_\mathrm {min}\): \(t_\mathrm {max} \sim 1 / s_\mathrm {min}\). Thus, taking into account the above relation, asymptotically

$$\begin{aligned} p_\mathrm {t_\mathrm {max}}(x) \sim x^{-1-\frac{1}{d}}, \end{aligned}$$

which is in a quite good agreement with numerical experiments (see Fig. 1).

3.2 Median of Simulation Time

To explain recently observed scaling of the median of \(t_\mathrm {max}\) with packing size [20], it is necessary to move back to Eq. (6) and solve the equation \(F_\mathrm {s_\mathrm {min}}(x) = 1/2\), which gives the median of \(s_\mathrm {min}\).

$$\begin{aligned} M[s_\mathrm {min}] = s_0 \left[ 1 - \left( \frac{1}{2}\right) ^{\frac{1}{n}} \right] ^d. \end{aligned}$$

Again, as \(t_\mathrm {max} \sim 1 / s_\mathrm {min}\), which is monotonic, then \(M[t_\mathrm {max}] \sim 1 / M[s_\mathrm {min}]\), thus

$$\begin{aligned} M[t_\mathrm {max}] \sim \left[ 1 - \left( \frac{1}{2}\right) ^{\frac{1}{n}} \right] ^{-d}. \end{aligned}$$

Number of regions n that have to be filled scales linearly with packing size S. Moreover, the expression in square brackets may be expanded in the series \([1 - (1/2)^{1/n}] = \ln 2 / n - 1/2 (\ln 2 / n)^2 + o(1/n^2)\). Thus, asymptotically for large S (and small 1 / n):

$$\begin{aligned} M[t_\mathrm {max}] \sim \left[ \frac{\ln 2}{S} \right] ^{-d} \sim S^d. \end{aligned}$$
Fig. 3
figure 3

The dependence of the median of time needed to obtain saturated packing on packing size for segments (\(d=1\)), disks (\(d=2\)), and spheres (\(d=3\)). Dots represent data obtained from numerical analysis of \(10^2\) packings of size \(S \in [10^4, 4 \times 10^8]\). Lines corresponds to fits: \(0.474587 \cdot S\), \(0.214991 \cdot S^2\) and \(0.0320608 \cdot S^3\) for \(d=1\), 2, and 3, respectively

Numerical confirmation of this result is shown in Fig. 3. It is rather obvious that generating larger packings needs more computational time. But, the plot also shows that RSA in higher dimensions may be extremely time consuming as the time needed to generate a packing of the same size grows with dimension, as well as it scales with packing size with higher exponent. Moreover, packing fraction decreases with the growth of packing dimension [14, 17], which additionally spoils statistics in numerical simulations. Additionally, it is worth noting that Feder’s law (1) seems to be valid also for fractional packing’s dimensions [15, 16]. As its derivation bases on the same assumption as made here, namely (2), presented results should be valid also for fractional d’s. At last, the relation (1) works also for anisotropic shapes [21, 22], with parameter d denoting a number of degrees of freedom of adsorbed particle instead of packing dimension [16]. Therefore, the question arises if relations (8) and (11) are valid for anisotropic particles. But to answer it, the algorithm that generates saturated random packing in reasonable computational time is needed.

4 Conclusions

The number of RSA iterations needed to generate finite saturated random packing of spherically symmetric objects seems to subject to Pareto distribution with an exponent \(-(1+1/d)\) where d is packing dimension. The median of this distribution scales with packing size according to the power-law characterized by exponent d. Obtained results can be used to optimize and control time complexity of RSA simulations. In particular, together with results described in [20], they allow to design an RSA simulation that gives possibly the most accurate results within existing time limits.