1 Introduction

Modelling self-organisation of dense granular matter (DGM) is essential to many natural phenomena and technological applications. This is a key problem because both the dense flow dynamics and the large-scale properties of consolidated DGM, e.g. permeability [1], catalysis, heat exchange, fuel cell functionality [2], depend strongly on the particle-scale structure [1, 3,4,5,6,7]. Here, we address this issue and develop structural evolution equations for quasi-static two-dimensional (2D) particulate systems.

Structural evolution of DGM proceeds via continual making and breaking of intergranular contacts, modifying the intergranular force transmission, which in turn drives the evolution. The contact network is a graph containing cells, which are the smallest voids enclosed by grains (aka irreducible loops), and they are characterised by the number of grains enclosing it—its order. We develop here a theory for the evolution of the cell order distribution (COD), which has been argued [8] and shown [9, 10] to converge to a universal form. This theory can be extended to model other structural descriptors. We construct the evolution equations and solve them, under some assumptions, first analytically for both very dense closed systems and closed systems approaching a steady state, and then numerically for general cases. A comparison of our predictions with simulations of sheared systems supports the theory.

2 The evolution equations

In the following, we focus on 2D systems of convex particles, but the theory can be extended straightforwardly to star-like particles. A quasi-statically evolving system of such particles has a well-defined contact network at every moment. Since the stress relaxes faster than any other process, such systems practically transit from one stress state to another. Each cell in the network is characterised by its ‘order’, defined as the number of grains surrounding it.

Fig. 1
figure 1

Making a contact, which occurs at rate \(q_{10,6}\), splits a 10-cell into two 6-cells and vice versa at rate \(p_{6,6}\). For simplicity, we consider convex particles, but the extension to star-like non-convex particles is straightforward

We consider systems free of gravity and body forces. In the concluding discussion, we argue that including these simplifies the following formalism. The structure evolves through making and breaking of these contacts, which we call contact events (CEs). The former splits a cell into two smaller ones and the latter merges two cells into a larger one. If a CE involves two rattler-free neighbour cells of orders i and j, the two processes satisfy \((i)+(j)\rightleftharpoons { } (i+j-2)\), exemplified in Fig. 1. Analogously, if the mother cell, i.e. the cell to be split, contains a rattler that participates in the event, the process sum rule is \((i)+(j)\rightleftharpoons { } (i+j-4)\). To model the dynamics of the COD, we define \(n_k\) as the total number of k-cells in the system and their fraction of the total cell population, \(N_c\), as \(Q_k = n_k/N_c\). We also define the following rates, which we assume are system size-independent: \(p_{i,j}\) = the merging rate of an i- and a j-cell into an \(i+j-2\)-cell; \(q_{k,i}\) = the splitting rate of a \(k=i+j-2\)-cell into an i- and a \(k-i+2\)-cell; \(r_{i,j}\) = the merging rate of an i- and a j-cell, containing a rattler, into a \(k=i+j-4\)-cell; and \(s_{k,i}\) = the splitting rate of a k-cell, containing a rattler, into an i- and a \((k-i+4)\)-cell. The COD evolves via four basic CEs. Two of creation: a k-cell is either a merger of j and \(k-j+2\), or an offspring of a split large-order cell, and two of annihilation: either by splitting into two offsprings or merging to make a larger cell. Each of these processes has an equivalent when the combined cell contains a rattler, in which case the rates \(p_{j,k-j+2}\) and \(q_{k,j}\) are replaced, respectively, by the rates \(r_{j,k-j+4}\) and \(s_{k,j}\).

If very large cells are rare then the occurrence of cells containing more than one rattler is very low and we ignore such events in the following. Then the evolution equations are:

$$\begin{aligned} \dot{n}_k & = \frac{1}{2} \sum _{i=3}^{k-1}\big \{ \left[ n_in_{k-i+2}\tilde{p}_{i,k-i+2} - n_k \tilde{q}_{k,i}\right] \left( 1 + \delta _{i,k-i+2}\right) \nonumber \\&\quad + \, \left[ n_in_{k-i+4}\tilde{r}_{i,k-i+4} - n_k \tilde{s}_{k,i}\right] \left( 1 + \delta _{i,k-i+4}\right) \big \} \nonumber \\&\quad + \, \sum _{i=k+1}^{\infty } \big \{\left[ n_i \tilde{q}_{i,k} - n_kn_{i-k+2}\tilde{p}_{k,i-k+2}\right] \left( 1+ \delta _{i,2k-2}\right) \nonumber \\&\quad + \, \left[ n_i \tilde{s}_{i,k} - n_kn_{i-k+4}\tilde{r}_{k,i-k+4}\right] \left( 1+\delta _{i,2k-4}\right) \big \} . \end{aligned}$$
(1)

The 1/2 factor corrects for double counting and the terms containing \(\delta\)-functions account for loss (gain) of two same order cells upon creation (annihilation) of a larger cell. The ‘tilded’ parameters in (1) are related directly to the size-independent rates: \(\tilde{p}_{i,j}\equiv p_{i,j}/N_c\), \(\tilde{q}_{k,i}\equiv q_{k,i}/N_c\), \(\tilde{r}_{i,j}\equiv r_{i,j}/N_c\), \(\tilde{s}_{k,i}\equiv s_{k,i}/N_c\). To simplify the following analysis, we ignore rattlers and set \(r_{i,j}=s_{i,j}=0\). Including the more realistic rattler-related terms is straightforward, but it would result in cumbersome expressions without adding any more insight. This amounts to assuming that the average number of rattlers per cell type is constant and therefore so is the number of non-rattlers. This assumption is indeed borne out by our numerical simulation results.

From Eq. (1), we note that \(\sum _k (k-2) n_k = E\) is a conserved quantity. This quantity has a physical interpretation: \(\sum _k n_k \equiv N_c\) and \(\sum _k k n_k\equiv Nz\) is twice the number of contacts, with z as the mean coordination number and N as the number of grains. We use Euler’s topological expression in the plane to relate the numbers of vertices (=N grains), edges (=Nz/2), and cells, \(N_c\), \(N-Nz/2+N_c = {\mathcal {O}}(\sqrt{N})\), in which \({\mathcal {O}}(\sqrt{N})\) are boundary terms. It follows that \(E=2N+{\mathcal {O}}(\sqrt{N})\). Embedding the system on the surface of a sphere, \(E=2(N-1)\) exactly.

To eliminate size dependence, we convert Eq. (1) to describe the dynamics of cell fractions, \(Q_k\equiv n_k/N_c\). We first define the deviation of the rattler-free steady state process \((i)+(j)\rightleftharpoons { } (i+j-2)\) from a ‘detailed balance’-like steady state,

$$\begin{aligned} \eta _{i,j} \equiv p_{i,j} Q_i Q_j - q_{i+j-2,i} Q_{i+j-2} . \end{aligned}$$
(2)

When \(\eta _{i,j}=0\), the ‘reaction’ \((i)+(j) \rightarrow (i+j-2)\) and ‘back-reaction’ \((i+j-2) \rightarrow (i)+(j)\) occur at the same rate, satisfying the definitions of Lewis and Ter Haar for detailed balance in thermodynamic systems [11, 12]. The sign of \(\eta _{i,j}\) determines which direction of the process \((i)+(j)\leftrightharpoons (i+j-2)\) is more frequent. Generically, dilation or compression correspond to positive and negative \(\eta _{i,j}\), respectively. Similarly, \(\zeta _{i,j} \equiv r_{i,j} Q_i Q_j - s_{i+j-4,i} Q_{i+j-4}\) is the deviation of the rattler-involving steady state process \((i)+(j)\rightleftharpoons { } (i+j-4)\) from a detailed balance-like state.

Noting that \(\dot{Q}_k=\left( \dot{n}_k-Q_k\dot{N}_c\right)\), the equations for the cell fractions become

$$\begin{aligned} \dot{Q_k}&= \frac{1}{2}\sum _{i=3}^{k-1} \eta _{i,k-i+2} \left( 1 + \delta _{i,k-i+2}\right) \nonumber \\&\quad - \sum _{i=k+1}^{\infty } \eta _{k,i-k+2} \left( 1+ \delta _{i,2k-2}\right) + Q_k \sum _{\begin{array}{c} \text {all possible} \\ \text {processes } i,j \end{array}}\eta _{i,j} , \end{aligned}$$
(3)

in which we used

$$\begin{aligned} \dot{N}_c = \sum _{k=3}^{\infty } \dot{n}_k = -N_c \sum _{\begin{array}{c} \text {all possible} \\ \text {processes } i,j \end{array}} \eta _{i,j} . \end{aligned}$$
(4)

Equation (3) are now conveniently system size-independent. In practice, cell orders in realistic quasi-static systems cannot exceed an upper bound \({\mathcal {C}}\) and remain mechanically stable.

Focusing on closed systems with constant particle number \(N={\mathrm {constant}}\) (\(\gg 1\)), we use Euler’s relation again to derive a relation between the rates of change of \(N_c\) and the mean coordination:

$$\begin{aligned} \frac{\dot{N}_c}{N_c} = \frac{\dot{z}}{z-2} . \end{aligned}$$
(5)

3 The evolution of dense systems

We next solve Eqs. (3) and (4) for very dense systems, comprising only cells of orders 3 and 4. In such systems, contact events give rise to two processes only: merging of two 3-cells into a 4-cell and splitting of a 4-cell into two 3-cells. Assuming a uniform spatial distribution of cells, the rate of change of 4-cells is

$$\begin{aligned} \dot{n}_4 = N_c \left( Q_3^2 p_{3,3} - Q_4 p_{4,3} \right) . \end{aligned}$$
(6)

The first term on the r.h.s.—a creation term—is proportional to the occurrence rate of contact breaking between 3-cells, \(p_{3,3}\) and to the probability of two 3-cells being neighbours, \(Q_3^2\). The second—an annihilation term—is proportional to the rate of 4-cells splitting, \(p_{4,3}\), and the concentration of 4-cells. The evolution equations are:

$$\begin{aligned} \dot{n}_3 & = 2 N_c \left( -Q_3^2 p_{3,3} + Q_4 p_{4,3} \right) = -2 N_c \eta _{3,3} \nonumber \\ \dot{n}_4 & = N_c \left( Q_3^2 p_{3,3} - Q_4 p_{4,3} \right) = N_c \eta _{3,3} , \end{aligned}$$
(7)

with \(\eta _{3,3}\equiv Q_3^2 p_{3,3} - Q_4 p_{4,3}\) and the factor of \(-\,2\) between \(\dot{n}_3\) and \(\dot{n}_4\) indicating that one is the back-process of the other and that each process involves one 4-cell and two 3-cells. Using \(N_c=n_3 + n_4\) provides the rate of change of \(N_c\):

$$\begin{aligned} \dot{N}_c&= - N_c (Q_3^2 p_{3,3} + Q_4 p_{4,3}) = - N_c \eta _{3,3} \end{aligned}$$
(8)

and the fraction equations are

$$\begin{aligned} \dot{Q}_3 & = (Q_3-2)(Q_3^2 p_{3,3} - Q_4 p_{4,3}) = (Q_3-2)\eta _{3,3} \nonumber \\ \dot{Q}_4 & = (Q_4+1)(Q_3^2 p_{3,3} - Q_4 p_{4,3}) = (Q_4+1)\eta _{3,3} . \end{aligned}$$
(9)

Using Eq. (4), we also have

$$\begin{aligned} \dot{z} = -(z - 2)\eta _{3,3} . \end{aligned}$$
(10)

The normalisation, \(Q_3+Q_4=1\), makes Eq. (9) dependent, reducing the set (9)–(10) into two equations that can be integrated straightforwardly:

$$\begin{aligned} 2 - Q_3(t) = 1 + Q_4(t) = \frac{4}{z(t)-2} . \end{aligned}$$
(11)

Using the definition of \(\eta _{3,3}\), the equations decouple and we obtain

$$\begin{aligned} \dot{Q_3} = \left( Q_3 - 2\right) \left[ p_{3,3}Q_3^2 + q_{4,3}Q_3 - q_{4,3}\right] , \end{aligned}$$
(12)

which can be solved for \(t(Q_3)\)

$$\begin{aligned} t-t_0 = \frac{1}{p_{3,3}}\ln \left[ \left( Q_3-a\right) ^\alpha \left( Q_3-b\right) ^\beta \left( Q_3-2\right) ^\upgamma \right] , \end{aligned}$$
(13)

with \(t_0\) the initial time, a and b the roots of \(p_{3,3}Q_3^2 + q_{4,3}Q_3 - q_{4,3}\), and \(\alpha =[(a-2)(a-b)]^{-1}\), \(\beta =[(b-2)(b-a)]^{-1}\), and \(\upgamma =[(a-2)(b-2)]^{-1}\). From (11) and (13) we can obtain \(Q_4\) and z. Examples of these solutions are shown in Fig. 2. We note that different initial states converge to the same steady state for the same rates. As we show below, the steady state is unique and is uniquely determined by the rates for all systems with \({\mathcal {C}}\le 6\). We also illustrate this feature for several 3–4–5 systems in Fig. 4b and discuss it in more detail below.

Fig. 2
figure 2

Evolution of the COD of the \(3\text{-}4\) system for rates: \(p_{3,3}=0.6\) and \(q_{4,3}=0.4\). a \(Q_3\) (red) and \(Q_4\) (blue); b z. Starting from three different initial states, the solutions converge to the same steady state (color figure online)

4 The steady state

At steady state, all the time derivatives vanish and, to investigate the characteristics of steady states, we first note that the number of relevant \(\eta _{i,j}\) processes in systems of cell orders up to \({\mathcal {C}}\), is \(({\mathcal {C}}-3)({\mathcal {C}}-1)/4\), when \({\mathcal {C}}\) is odd, and \(({\mathcal {C}}-2)^2/4\), when \({\mathcal {C}}\) is even. Comparing to the \({\mathcal {C}}-2\) equations in (2) available to determine the \(\eta _{i,j}\)s, as we do in Table 1, we see that these are determined uniquely only for \({\mathcal {C}}\le 6\) and are under-determined otherwise. This provides two significant results: when \({\mathcal {C}}\le 6\) the steady state is unique and it satisfies \(\eta _{i,j}=0\) for all ij. The latter points to a detailed balance–like state—a very surprising result in systems that are manifestly far from conventional equilibrium. For systems with \({\mathcal {C}}\ge 7\), there are infinitely many steady state solutions, in addition to the detailed balance-like one. For example, for systems in which \({\mathcal {C}}=7\), the steady states need only satisfy \(\eta _{4,5}=\eta _{3,6}=0\) and \(\eta _{4,4}=-\eta _{3,4}=-\eta _{3,5}=\eta _{3,3}\). While \(\eta _{3,3}=0\) is a detailed balance-like steady state, the infinitely many steady states, for which \(\eta _{3,3}\) is an arbitrary constant, are not.

Table 1 The numbers of equations and possible \(\eta _{i,j}\) processes for different maximal cell orders \({\mathcal {C}}\): for \(C\ge 7\) there are more processes than equations and hence a detailed balance-like state is not the only solution

5 The phase diagram

For \({\mathcal {C}}\le 6\) the steady state can be uniquely expressed in terms of the ratios \(p_{i,j}/q_{i+j-2,i}\). Multiplying all the rates by a constant factor does not affect then the steady state and only modifies the time it takes to reach the steady state. This allows us to scale the rates and represent the steady state cell fractions, \(Q_k\), and the mean coordination number, z, as contours in a phase space spanned by the rate fractions. For example, the phase diagram of a system containing only 3-, 4- and 5-cells can be conveniently represented as in Fig. 3. In this phase diagrams we show both the steady state fraction of 3-cells and contours of mean coordination numbers z. Such phase diagrams are useful, e.g. to provide guidelines for designing specific packing protocols.

Fig. 3
figure 3

Phase diagrams of the steady-state values of 3–4–5 systems in the phase space spanned by \(p_{3,3}/q_{4,3}\) and \(p_{3,4}/q_{5,3}\). Shown also are contours of: a \(Q_3\) and b z

6 The approach to steady state

It is useful to understand the approach to the steady state, as well as its stability. Near this state, \(Q_k(t)=Q_k^s + \delta Q_k(t)\) is only slightly different from its steady state value, \(Q_k^s\), with \(|\delta Q_k |\ll Q_k^s\). Defining \(\vec {Q}(t) = \vec {Q}^s + \delta \vec {Q}(t)\), with \(\vec {Q} \equiv (Q_3, \dots , Q_{{\mathcal {C}}})\), and expanding the r.h.s of Eq. (3) to linear order, we obtain for \(\delta \vec {Q}(t)\)

$$\begin{aligned} \delta \dot{\vec {Q}}(t) = A\cdot \vec {Q}(t) , \end{aligned}$$
(14)

in which the components of the constant matrix A are cumbersome combinations of \(p_{i,j}\), \(q_{i,j}\), and the steady state fractions \(Q_k^s\).

Denoting the ith eigenvector and eigenvalue of A, respectively, by \(\vec {v}_i\) and \(\lambda _i\), we have near the steady state

$$\begin{aligned} \vec {Q}(t) = \vec {Q}^s + \sum _i \, (\vec {v}_i^\dagger \cdot \delta \vec {Q}(t_0)) e^{\lambda _i t} \cdot \vec {v}_i \end{aligned}$$
(15)

with some initial time \(t_0\).

Before continuing, we show that: (i) all the eigenvalues, \(\lambda _i\), are real, (ii) there is no positive eigenvalue, and there is at least one negative eigenvalue. Firstly, since all \(0\le Q_k, Q_k^s\le 1\) are real for all k, then the eigenvectors, which are linear combination of them, are also real. Since all the components of the matrix A are also real we get from the relation

$$\begin{aligned} A \vec {v}_i = \lambda _i \vec {v}_i = {\mathrm {Re}}\{\lambda _i \vec {v}_i\} \end{aligned}$$
(16)

that \(\lambda _i\) must be real for all i. Further, since the \(Q_k\)s are normalised, then at least one \(\lambda _i\) must be non-zero before reaching steady state.

Next, to show that the steady state is not unstable, i.e. \(\lambda _i \le 0\) for all i, it can be shown that \(\sum _k \delta Q_k = 0\) [13], whence it follows that \(\sum _k Q_k\) remains normalised to this order at all times also to first order. Suppose then that a specific eigenvalue, \(\lambda _k>0\). Then the kth eigenvector would grow until, at some finite time, \(\tau < \infty\), this growth must stop abruptly due to the normalisation condition. In that case, at least one \(\dot{Q}_k\) must diverge at \(t=\tau\). But this cannot happen because the r.h.s. of the master equations are finite at all times. It follows that there is no positive eigenvalue. Combined with the observation that there must be at least one non-zero eigenvalue, we conclude that the steady state is stable. This conclusion is supported by all the particular examples we studied numerically, all of which converged to a stable steady state.

To determine the unique steady state solution of the \(3\text{-}4\) system, we use the normalisation and detailed balance–like condition, \(\eta _{3,3}^s = 0\), to find \({Q_3^s=[-\theta _{3,3}+\sqrt{\theta _{3,3}^2+4\theta _{3,3}}]/2}\), with \(\theta _{i,j}\equiv q_{i+j-2,i}/p_{i,j}\). The normalisation condition confines the dynamics to a line in the \(Q_3\text{-}Q_4\) plane, with the steady state a unique stable fixed point on it, which is independent of the initial state. This was tested numerically for several systems and is illustrated in Fig. 4a, in which the arrow lengths represent the rate of approach to the steady state for \(p_{3,3}=q_{4,3}=1\).

Fig. 4
figure 4

The convergence to the unique steady state. a The dynamics of \(3\text{-}4\) systems are confined to the line \(Q_3 + Q_4 = 1\). We show the generic case \(p_{3,3}=q_{4,3}=1\). b The dynamics of \(3\text{-}4\text{-}5\) system are confined to the plane \(Q_3+Q_4+Q_5=1\). Illustrated are two sets of rates: \(p_{3,3}=1\), \(q_{4,3}=1\), \(p_{3,4}=1\), \(q_{5,3}=1\) (solid red arrows) and \(p_{3,3}=7\), \(q_{4,3}=1\), \(p_{3,4}=10\), \(q_{5,3}=1\) (dashed blue arrows) (color figure online)

The dynamics of \(3\text{-}4\text{-}5\) systems can be analysed similarly. Using \(\eta _{3,3}^s=\eta _{3,4}^s=0\) and the normalisation condition, the steady state solution satisfies

$$\begin{aligned} (Q_3^s)^3 + \theta _{3,4}(Q_3^s)^2 + \theta _{3,3}\theta _{3,4}Q_3^s = \theta _{3,3}\theta _{3,4} , \end{aligned}$$
(17)

and

$$\begin{aligned} Q_4^s = \frac{1}{\theta _{3,3}} Q_3^s; \quad Q_5^s = 1 - Q_3^s - Q_4^s . \end{aligned}$$
(18)

Due to the positivity of the \(Q_k\), the uniqueness of the steady state can be established by studying the position of the extrema of (17) [14] and it is determined by the rate fractions, \(\theta _{i,j}\). The normalisation confines the dynamics to the plane \(Q_3+Q_4+Q_5=1\) and the approach to steady state in this plane is illustrated in Fig. 4b for two different sets of rates, which give two distinct steady states.

For \({\mathcal {C}} \ge 6\), the dynamics take place on the hypersurface \(\sum _k Q_k = 1\), on which there is at least one detailed balance-like steady state. As discussed above, for \({\mathcal {C}}\ge 7\), there may be additional steady states. Moreover, since all the steady states are stable, then, if they exist, they must be distinctly separate on the hypersurface.

7 Simulations

To test the theory, we carried out numerical simulations of quasi-static two-dimensional simple shear between parallel plates. We use a dissipative spheres model [15, 16] and the implementation of the model was provided by the open source project LIGGGHTS [17]. Within this implementation, we used a Hertz force model for the grain–grain and grain–walls interactions, with: Young’s Modulus \(5\times 10^{6}\) Pa, restitution coefficient 0.2, Poisson’s ratio 0.5, and friction coefficient 0.5. The system consisted of \(N=21{,}690\) spheres restricted to move in the plane \(z=0\) of four different diameters, 7 mm (5402 grains), 9 mm (5400), 11 mm (6120) and 14 mm (4770), respectively.

The system has a length of 1.65 m and periodic boundary conditions in the x-direction. The initial state was generated by compressing the grains from an initially loose random distribution by a flat surface at constant pressure, \(P_{\mathrm {initial}}=54.45\) kg/m, in the y-direction until their total kinetic energy fell below \(10^{-12}\) J per particle. This state was regarded as mechanically stable. Then, maintaining the confining pressure, shear started in the x direction, with shear velocity \(v_{\upgamma }=0.06\) m/s. No gravitational field was applied.

The time-step was \(10^{-6}\) s and the grain positions and velocities were saved every 200 time-steps for collecting detailed data on the contact network evolution.

At each stop, cells and the grains surrounding them were identified, from which we tracked the evolution of the COD and obtained the rates of contact events, \(p_{ij}\) and \(q_{ij}\). Cells of orders higher than 13 occurred very rarely and, therefore, were excluded from the analysis.

8 Analysis of the simulation data

The rates were determined from the numbers, \(N^{(p)}_{i,j}\equiv p_{i,j} \, Q_i Q_j N_c \Delta t\) and \(N^{(q)}_{i,j}\equiv q_{i+j-2,i}\, Q_{i+j-2} N_c \Delta t\), of the events \({(i)+(j)\leftrightharpoons {} (i+j-2)}\) during a time interval \(\Delta t\). In general, the rates should depend on the force distribution and the shear rate, both of which changed slightly during the simulation as the system dilated before reaching a steady state. Since the above analysis is for constant rates, this could complicate a direct comparison between the analytical solutions and the simulation data. Fortunately, the rates changed little after the first 0.1s and their time dependence could be neglected. Fewer than 15 cells of a specific CO or fewer than 40 events per 0.1 s of any specific process \(\eta _{i,j}\), defined in Eq. (2), lead to large statistical errors and were ignored. Interestingly, in spite of the long simulation time, the rates fluctuated significantly, \(30{-}65\,\%\), perhaps because of the  sensitivity to small changes in \(Q_k\). Smaller fluctuations may be achieved in larger systems with more contact events. Figure 5 shows the rate diagram, calculated from data collected during intervals of 0.1 s and averaged over the entire evolution process. Such rate diagrams characterise uniquely a dynamic process.

Fig. 5
figure 5

The rates p and q, computed from the simulation, are used to solve the equations. Note that \(p_{i,j}\) and \(q_{i+j-2,i}\) are symmetric under exchanging i and j

Using the calculated rates, shown in Fig. 5, we solved the evolution equations (3) numerically, with the initial COD determined by averaging over the first 0.1s in the simulation. While there was a reasonably good agreement between the solution and the simulation data when using the computed mean rates, we found that an even better agreement was achieved by correcting only \(q_{6,4}\) by \(10\,\%\). Note that this correction is much smaller than the aforementioned statistical fluctuations of the rates. The good agreement between our solution and the simulation data after this minor correction is shown in Fig. 6.

Fig. 6
figure 6

The evolution of a the COD for cell orders 3–8 (from top to bottom) and b the mean coordination number, \(\bar{z}=2e/(e-2)\) with \(e=\sum _k k Q_k\). The continuous simulation results (light lines) agree with the shown averages taken over intervals of 0.1 s. The error bars represent the standard deviation during those intervals. The solution of Eq. (3) (dashed lines) agrees well with the simulation results

9 Clapping

A particular phenomenon, observed extensively in all the simulations we ran, is the occurrence of ‘clapping’, namely, events involving pairs of particles repeatedly coming into and out of contact. An illustrating example from the simulation described above is shown in this movie clip [18]. For simplicity, we defined non-clapping events in our analysis as events that occur only once during the entire considered dynamics. For practical purposes, non-clapping events are defined as those occurring only once during the simulation or experiment, which is the definition we used in our simualtions.

Occurrence of clapping means that the clappers did not move away from one another and, therefore, that the local configuration may have not changed much. This suggests that clapping events hardly affect the COD and only add noise to the event statistics. The probability that a pair of grains moves away from one another and comes back at a later time is expected to be very low. Indeed, tracking 500 clapping pairs throughout the entire simulation, we have not observed any such event.

A potential problem with the above definition is that events occurring close to the end of the simulation could be identified wrongly as non-clapping because the grains do not have the time to clap. This should not affect the statistics much because it means that half a clap has been counted as a non-clapping event and we just missed the other half of the clap. This would be significant only if the clap affects two cell types whose splitting or merging is rare. Nevertheless, to avoid this potential error, it would be prudent to disregard contact events too near the end of a simulation run.

It is important to note that clapping does not contribute to the structural evolution on the coarse-grained time scale, which the master equations describe. Clapping obeys straightforwardly ‘detailed balance’—the number of contact making equals the number of contact breaking and hence \(\eta _{i,j}^{\mathrm {clap}}=0\). Furthermore, the master equations (3), \(\dot{Q}_k = f(\{\eta _{i,j}\})\), are linear in the \(\eta\)s , which means that the contribution of the clapping events to \(\dot{Q}\) in the master equations vanishes on a coarse-grained time scale that is sufficiently longer than the time between clapping events. Intriguingly, we found both in our shear and bi-axial (see below) simulations that most clapping pairs were active for some duration, went dormant, and became active again sometime later. We illustrate this in Fig. 7 for the bi-axial system below.

10 Bi-axial compression simulation

To confirm that clapping is a genuine phenomenon and study the effect of the driving on it, we analysed a long-time DEM simulation of a bi-axial compression. The simulated system consisted of 22,381 discs, whose diameters were distributed log-normally [9, 10]. The disc interaction was harmonic, with tangential and normal spring constants \(k_{\mathrm {t}}\) and \(k_{\mathrm {n}}\), respectively, obeying \(k_{\mathrm {t}}/k_{\mathrm {n}}=1/4\). The mean overlap at the contacts is estimated as \(d/D=\sigma _c/k_n=10^{-5}\), where \(\sigma _c\) is the initial confining pressure. This overlap is much smaller than the one used for the simple shear simulation. The restitution coefficient was set to 0.98—much larger than in the simple shear simulations. The initial configuration was prepared with a very low inter-particle friction. At the start of the simulation, the particles were assigned a friction coefficient of \(\mu =0.5\), the same as in the simple shear simulation. The system was periodic in both dimensions and was subjected to a gradual vertical compression keeping the lateral confinement pressure constant. This resulted in a quasi-static dilation with diagonal shear.

The particle stiffness and the high restitution coefficient enhance clapping, making it a good system to study this phenomenon. We chose to trace 448 individual clapping pairs throughout the simulation, as tracing all pairs would have been too time-consuming. Again, we found that a pair can indulge in repeated clapping, disengage for a while, and become active again later. To demonstrate this, we traced 10 arbitrarily picked, clapping pairs throughout the simulation. In Fig. 7 we show the inverse time between claps of each of these pairs as a function of the simulation. We found that clapping dominated overwhelmingly the contact events in this simulation—only \(0.7\,\%\) of all events were non-clapping! This suggests that the structure hardly changed within large regions of the system. In this respect, the dilation process in the simple shear simulation differs significantly from the shear in the bi-axial compression process, which does not mix the system quite as well.

Fig. 7
figure 7

10 clapping pairs traced throughout the time evolution: each colour indicates a specific pair of grains. The y-axis shows the inverse time between subsequent claps. It can be observed that some clapping pairs, e.g. the blue (filled squares) and orange pairs (empty circles), are active for a while, lay dormant and become active again at a later stage (color figure online)

Plotting in Fig. 8 the histogram of the time intervals between claps of a specific pair in this simulation, as a function of \(\log\)(time), we find it to have a very long tail, demonstrating that this is not an artefact of the simulation.

Fig. 8
figure 8

Histogram of the time intervals between claps \(t_c\): short times can be associated with claps in one sequence while large times correspond to the separation between subsequent cascades of claps

Unfortunately, the bi-axial simulation does not reach a steady state in which the rates remain constant. The most likely reason is that the boundary forces change continually with time. This changes the statistics of the intergranular contact force distribution, which should affect the rates \(p_{i,j}\), \(q_{i,j}\). Indeed, we found that the rates decay with time exponentially, \(\sim e^{-t/T}\), with T ranging from 0.2 to 2.2, depending on the specific cell orders involved. Since the theory presented is limited to constant rates, we have not pursued a detailed modelling of the COD evolution of this simulation. The continual decay of rates, in spite of the long time simulation, further suggests that a steady state may not be reached before the dilation disrupts mechanical equilibrium. This highlights the fact that not every simulation of granular dynamics is bound to reach a steady state.

11 Conclusion

To conclude, we have constructed master equations to describe the evolution of a key structural characteristic of granular media—the cell order distribution (COD)—from any initial state, given the cell merging and splitting rates. The equations yield a surprising result: the steady states of the non-equilibrium dynamics of granular systems, with cell order no higher than \({\mathcal {C}}=6\) satisfy a detailed balance-like condition. This detailed balance-like steady state is unique and stable. Systems including cell orders of 7 and higher can converge to this steady state, as well as to other solutions that do not support detailed balance, all of which are stable.

We validated the theory by running a long simulation of a sheared system, determining the rates, and using those to solve the master equations. Indeed, the calculated solution agrees nicely with the simulated COD evolution, in spite of large fluctuations in the rates computed from the simulations. These fluctuations may be caused by ‘clappers’: Particle pairs that make and break their common contact repeatedly. We plan an experiment to study the relative contributions of clappers and non-clappers to the rate statistics.

In our analysis, we assumed constant rates throughout the dynamic process. This is unlikely to be the general case and extending the theory to time-dependent rates is the next step. Such time dependence is expected because the contact event rate is likely to be sensitive to the intergranular force distribution, which is position- and time-dependent. Indeed, it has been argued [10, 19] that the structural evolution of a granular system is a self-organisation process coupled to the evolution of the intergranular forces. Therefore, these equations and their extension form an important step towards a complete understanding of the structure-forces co-evolution. Another extension would be to open systems, when the number of particles is not conserved. This extension could be related to a grand-canonical statistical mechanical description of granular ensembles [20]. While we focussed on convex particles, our theory can be extended readily to star-like and flat-surface non-convex particles [21, 22] by defining inter-particle contact breaking when all the double contact disappears for the former, and any contact, point or line, disappears for the latter. Although the evolution Eqs. (1) include effects of rattlers, we disregarded these in the analysis for clarity. Indeed, very dense systems with low values of \({\mathcal {C}}\) should be almost entirely rattler-free. It should be emphasized that including gravity and body forces obviates the rattler terms in Eq. (1) because then all the grains transmit forces and make cells, with the rattlers making mainly low orders ones. Finally, the theory can be extended to three-dimensions, in which case the main hurdle—cell classification—can be overcome using existing methods [23, 24].