Segregation in quasi-two-dimensional granular systems

Segregation for two granular species is studied numerically in a vertically vibrated quasi-two-dimensional (quasi-2D) box. The height of the box is smaller than two particle diameters so that particles are limited to a submonolayer. Two cases are considered: grains that differ in their density but have equal size, and grains that have equal density but different diameters, while keeping the quasi-2D condition. It is observed that in both cases, for vibration frequencies beyond a certain threshold—which depends on the density or diameter ratios—segregation takes place in the lateral directions. In the quasi-2D geometry, gravity does not play a direct role in the in-plane dynamics and gravity does not point to the segregation directions; hence, several known segregation mechanisms that rely on gravity are discarded. The segregation we observe is dominated by a lack of equipartition between the two species; the light particles exert a larger pressure than the heavier ones, inducing the latter to form clusters. This energy difference in the horizontal direction is due to the existence of a fixed point characterized by vertical motion and hence vanishing horizontal energy. Heavier and bigger grains are more rapidly attracted to the fixed point and the perturbations are less efficient in taking them off the fixed point when compared to the lighter grains. As a consequence, heavier and bigger grains have less horizontal agitation than lighter ones. Although limited by finite size effects, the simulations suggest that the two cases we consider differ in the transition character: one is continuous and the other is discontinuous. In the cases where grains differ in mass on varying the control parameter, partial segregation is first observed, presenting many clusters of heavier particles. Eventually, a global cluster is formed with impurities; namely lighter particles are present inside. The transition looks continuous when characterized by several segregation order parameters. On the other hand, when grains differ in size, there is no partial segregation and the global cluster has a much smaller concentration of impurities. The segregation order parameters change discontinuously and metastability is observed.


Introduction
Segregation is a ubiquitous phenomenon in granular systems but it is still not completely understood. When energy is injected into a mixture of two species of grains differing in size, mass, shape or mechanical properties, they have a tendency to segregate. Different mechanisms have been proposed to explain this phenomenon. The diversity of proposed mechanisms comes from the plethora of conditions under which segregation occurs, in different geometries and driving mechanisms, as becomes evident in the present volume (see the reviews [1] and [2][3][4][5][6][7][8][9][10][11][12][13][14][15] for a description of some of the dominant mechanisms).
Many of the driving mechanisms found in the literature appeal, directly or indirectly, to the presence of gravity, which imposes a segregation preferred direction. Buoyancy, void filling and arching explicitly require the action of gravity. Also, other phenomena like convection, the difference of avalanche angles or even segregation driven by the restitution coefficient difference rely on gravity. Hence it is interesting to consider the geometries and configurations where gravity has a negligible role in order to, firstly, determine whether segregation takes place and, secondly, identify which mechanism(s) are acting.
Quasi-two-dimensional (quasi-2D) systems with horizontal dimensions much larger than the vertical one, driven by vertical vibrations, are an adequate geometry to conduct such a study. Spherical grains inside such a shallow box gain energy by colliding with the top and bottom plates and transferring energy to the horizontal in-plane directions through collisions. When twice the particle diameter is greater than the height of the box, we have a particular and relevant case: no two particles can be on top of one another. A collection of grains under this constraint is usually referred to as a submonolayer. In the quasi-2D geometry, gravity does not play a direct role in the in-plane dynamics and the indirect effects can be controlled and reduced by means of increasing the box acceleration. More importantly, gravity is perpendicular to the eventual segregation directions, allowing us to discard many known segregation mechanisms.
The energy that particles gain by collisions with the plates is partly lost by dissipation in collisions between grains and with the walls, and it is partly transferred to the in-plane motion. The balance between energy injection, dissipation and transfer can lead to several dynamic regimes. Our study focuses on the existence and dynamics of segregation when two different types of particles initially mixed can, for some values of the parameters, segregate, creating regions rich in one type of particle.
This particular geometry has some highly relevant advantages that motivate its use. In experiments, it allows the dynamics of the granular layer to be fully visualized by imaging the system, as all particles can be seen and recorded with a camera from the top. This makes it possible to accurately study the system in a microscopic way, as the particles' positions and velocities can be measured for most particles at any time; also, the collective behaviour can be captured [16][17][18][19][20]. For example, it has been observed that a particular phase separation takes place in this geometry: grains form solid-like regions surrounded by fluid-like ones, having high contrasts in density, local order and granular temperature [16]. This phase separation is driven by the negative compressibility of the effective 2D fluid [17]. In general, granular systems do not obey energy equipartition [21]. In particular, in shallow systems, the horizontal kinetic energy of the grains can be quite different from the vertical kinetic energy.
It has recently been reported that energy bursts take place when two particle species of equal size but different mass are placed in a vertically vibrated shallow box [22]. These energy bursts develop once the system is at least partly segregated and clusters of the heavy particles In this case, L x = L y L z , with L z being between one and two particle diameters, thus named quasibidimensional. The complete box is vertically vibrated with amplitude A and frequency ω. PBCs are used in the lateral directions.
have formed. The bursts are characterized by sudden peaks of the-otherwise small-horizontal kinetic energy of the heavy particles together with a rapid expansion of the corresponding cluster. The process repeats once segregation takes place again. These events take place because there exists a fixed point for an isolated particle bouncing with only vertical motion between the top and bottom walls. The horizontal energy peaks occur when the energy stored in the vertical motion is partly transformed to horizontal energy through a chain reaction of collisions between heavy particles [22].
In this paper, using numerical simulations, we (i) focus on the conditions under which there is segregation in the quasi-2D geometry, (ii) characterize its dynamics and (iii) provide some insights into the driving mechanisms. Two cases are considered: spherical grains of the same size but differing in their mass density, and spherical grains of the same mass density but different size. In both cases, segregation is observed although with some important differences in the geometry of the resulting clusters and the degree of segregation. We studied a third case in which grains differ in their restitution coefficient only, but no segregation was observed; this case is not reported here. The plan of the paper is as follows. In section 2, we describe the system's geometry, the main control parameters, the simulation method and the initial conditions used. In section 3, various order parameters used in the characterization are described. In sections 4 and 5, the segregation process for both cases is analysed. Section 6 discusses the continuity of the presented transitions. Finally, the conclusions are presented in section 7.

Geometry and system parameters
The system under study consists of a shallow box, of dimensions L x × L y × L z , with the vertical dimension L z L x , L y (see figure 1). The box is vertically vibrated with an amplitude A and angular frequency ω. Flat and rigid surfaces are placed on the top and bottom borders and periodic boundary conditions (PBC) are used in the xand y-directions. PBC allows us to work with fewer particles (and thus speed up simulations) as no border effects are presentall particles belong to the bulk.
Grains are considered as perfectly hard spheres with both translation and rotational degrees of freedom. In the hard sphere model, the interaction is given by an infinitely steep force, rendering particle overlapping impossible. Grains only interact at contact and instantaneously, making all interactions binary. When in contact, the velocity of both particles is modified using a collision rule that considers both the translation and the rotational degrees of freedom, and it is characterized by the normal and tangential restitution coefficients, r n and r t , and the dynamic and static friction coefficients, µ d and µ s . The collision rule, which is built to conserve linear and angular momentum, but to dissipate energy, is described in [23,24].
The following study considers the case of a binary mixture of grains. The two types of particles are generically called A and B and these two species have different masses (m A and m B ) and different diameters (σ A and σ B ). The condition of submonolayer sets limits on the height of the container L z given by the diameter of the particles, that is, Units are chosen such that the mass and diameter of A particles are set to one, σ A = m A = 1. The time is also scaled so that g = 1, although we will usually use the base oscillation period T = 2π/ω as the time unit because it corresponds to a more characteristic time scale of the system.
The large number of parameters of the system makes it practically impossible to perform an exhaustive study of segregation. There are more than 30 independent parameters that define the geometric properties of the container and the particles, particle numbers, friction and restitution coefficients between particles and with walls, the mass of both types of particles, the properties of the box oscillation and gravity. This makes it mandatory to choose a small region of the control parameter space and make some general considerations to constrain this space.
We consider that the base plate and top lid are made with the same material; hence all friction and restitution coefficients for particle-wall collisions are the same. In experiments, a transparent material is used for the top lid (for particle tracking) and a metal is used for the bottom and lateral walls. In most cases, the friction and restitution coefficients of these materials are quite similar [22,25].
The role of gravity is quantified by the dimensionless acceleration, Our study considers 2 10, high enough to allow particles to collide with the top of the box and low enough to be experimentally possible. In this range of acceleration, gravity cannot be completely discarded, as shown below. Other parameters are also fixed to allow for a systematic study, with values that are experimentally feasible: restitution coefficients are fixed to r n = r t = 0.8, friction coefficients are µ s = 0.3 and µ d = 0.15, the oscillation amplitude is A = 0.15, the box height is L z = 1.82 and its horizontal dimensions are L x = L y = 40. The number of grains of each species (N A and N B ) is given different values but all of our present simulations are in regimes of high packing fraction. We further choose N B < N A such that in the case of total segregation of the species, a single circular cluster of Bs is expected.
The two cases that we consider are the case of mixtures in which the grains have the same diameter but different masses, m B > m A ; and the case of grains that have the same mass density but different diameters, σ B > σ A . In both cases, therefore, the B grains are heavier than the As.

Simulation method
In the present work, the system is studied using an event-driven molecular dynamics simulation algorithm. In the event-driven approach, time is advanced in steps from collision to collision, as the trajectory of particles and times of collision can be determined analytically; thus there is no need to simulate particles during their free flight time. Specifically, we use an algorithm developed by Marín et al and subsequent improvements [26,27]. Using a sinusoidal movement for the base presents precision and speed problems in simulations. Thus, we choose to approximate the oscillatory movement by a biparabolic waveform.

Initial conditions
Although the choice of the initial condition should not be crucial for the segregation dynamics, a poor choice can block or retard segregation processes and it would prevent having large particle densities. Particles are initially placed in a slightly random distorted triangular lattice (see figure 2(a)). The choice of an initially crystalline configuration allows one to place grains at high packing fraction in an efficient way. The vertical position is set at a small random height from the bottom wall. Usually we use a value of the number of particles N lower than the number of particles that a perfectly ordered hexagonal monolayer would allow. In this case, particles are removed randomly from the lattice. In the other case-when the N particles do not fit in a hexagonal monolayer-the remaining ones are placed in a second layer at the centre of the triangles formed by the lower particles (remember that L z < 2σ ). In some cases, it is necessary to increase the lattice parameter so that upper particles fit without touching the top wall (see figure 2(b)).
In the case σ B > σ A , sometimes the optimal organization is one where the spacing between the bigger particles allows placement of the smaller particles around the big ones in a hexagonal arrangement (see figure 2(c)).
Linear and angular particle velocities are taken from Gaussian distributions for each species at temperature T = 0.1. Dissipative systems like ours forget their initial condition and thus a transient state is observed where the system dissipates or gains energy until an energy injection-dissipation balance is reached.

7
In many of the cases that we study, the system tends to a segregated final state characterized by a single cluster of B particles. However, reaching such a state may take several days of computing time for an average simulation: the cluster coalescence process is extremely slow. Hence, sometimes an initially segregated configuration, like the one in figure 2(d), is chosen as the initial condition. This initial configuration is useful for the study of such a state without having to wait for the coalescence process.

Single-particle fixed point and energy distribution
A single inelastic particle bouncing in a shallow box vibrating at a frequency ω may evolve to a fixed point for a wide range of parameters: the bouncing movement becomes periodic with the same frequency ω and, because of the friction with the horizontal walls, the particle does not move horizontally, nor does it rotate. Namely, all of its kinetic energy is vertical energy.
Periodic trajectories are relevant to the collective behaviour of the many-particle system, as different grains in the box can have the same value of the vertical coordinate z at all times even if there is no interaction between them. If we consider the dilute limit when there are no particle-particle collisions, all particles will eventually share the same value of their z-coordinate. If perturbations due to particle collisions are small or sufficiently infrequent, periodic trajectories are still highly relevant since particles would be constantly tending towards a common vertical position, effectively creating z-correlations. Moving vertically in phase with small horizontal velocities implies that the collisions among particles are inefficient in transferring energy from the vertical to the horizontal direction.
When the particles of one of the species (species B) are much heavier than those of the other one, these B particles end up having a periodic in-phase vertical movement, with negligible perturbation from the other particles. On the other hand, the light particles are easily taken off the fixed point, keeping a significant horizontal energy; hence their pressure is larger than that produced by the heavy particles. When the heavier grains are also larger, they have less free space for the vertical motion, producing a faster approach to the fixed point.
The external pressure exerted by the light particles leads the heavy ones to form dense clusters, acting as a driving mechanism for segregation.
In [22], it was shown that this attraction towards the fixed point and the subsequent coherent motion of heavy particles can be destroyed by rare oblique collisions. The energy stored in the vertical direction is then rapidly transformed to horizontal motion in the form of a chain reaction of B-B collisions, expanding the clusters.

Order parameters
In this section, we define several order parameters to characterize the segregation processes that take place in a vibrated quasi-2D binary system.
When segregation takes place, we have seen that it is not perfect, in part due to the large fluctuations in granular systems. As a consequence, the clusters have intruders of other species and are far from circular. These peculiarities make it necessary to define appropriate order parameters that can quantify the degree of segregation of the system, particularly when there is partial segregation with many clusters.
Several order parameters are defined to compare different segregation criteria and see their relevance in different situations. These order parameters fall into two general categories: macroscopic, which at some level use a coarse graining procedure; and microscopic, which take into account the clusters of the system and depend mainly on the neighbours of each particle.
All of the order parameters that we use are based on the 2D projection; that is, we discard the vertical motion or vertical distances to determine whether the species are segregated or not.

Coarse grained density overlap
If at any time the position vectors of the grains are r i , the coarse grained densities can be defined as where K is a normalized kernel. For simplicity, we choose K to be a Gaussian K ( r ) = e −r 2 /a 2 /πa 2 of width a > σ A , σ B and a = 2. With these fields, it is possible to compute a segregation order parameter as a density overlap [15], If the species are completely segregated, the densities do not overlap and δ K ≈ 1. On the other hand, if the species are completely mixed so that the system remains homogeneous, then δ K vanishes. For the homogeneous system, negative values can be obtained because of the large density fluctuations that develop.

Cluster definition
Microscopic order parameters are based on the cluster structure of the minority species (B grains). Neighbours are defined as those particles that belong to the same triangle in the Delaunay construction, and a cluster is defined as the set of neighbours of the same particle type (see figure 3). The advantage of this method is that it includes no measure of distance. The selection of neighbours comes from purely topological considerations, without arbitrary 9 parameters. This is useful in cases where the density of clusters fluctuates-as is the case when there are energy bursts [22]-because particles remain in the cluster even if the average distance between particles increases significantly. Having identified the clusters, we compute the average number N l of clusters of size l.

Fraction of grains in clusters
Simple cluster statistics on N l have the disadvantage that cluster fission/fusion processes modify the statistics, but the species are equally segregated. To overcome this problem, a segregation order parameter is defined that considers the fraction of B particles that belong to clusters of at least two particles, Note that a system can be completely segregated (δ Cs = 1) even if there is more than one cluster. The threshold value (l = 2) has been arbitrarily chosen, but its choice does not affect the results qualitatively. Other values give similar results.

The number of clusters
To quantify the ability of the system to reach a single cluster, another segregation order parameter can be defined by the number of B-clusters in the system, If all B particles coalesce into one big cluster (N cB = 1), then δ Cn ≈ 1 for N B 1.

Neighbours segregation
Finally, we consider a definition of an order parameter based on the identification of neighbour types. If segregation takes place, each B particle would tend to have more neighbours of the same type. We define therefore where N AB is the sum of the number of A Delaunay neighbours that B particles have, double counting the A particles that are neighbours of different B particles. If the system is perfectly mixed, the expected number of neighbours would be roughly N AB ≈ 6N A N B /N , where it has been assumed that each particle has 6 Delaunay neighbours on average. In this case, δ N ≈ 0.
On the other hand, if only one cluster is present in the system, then N AB would only include particles that belong to the boundary of the cluster, a negligible quantity compared to the total number of neighbours of B particles; thus δ N ≈ 1.

Qualitative description
First we consider a mixture of grains of equal size σ but different masses. The control parameters are the mass ratio m r = m B /m A that is varied in the range 2 m r 14 and the base frequency ω. We consider binary systems with twice and four times as many lighter particles as heavier particles. The total number of particles is N = N A + N B = 1500 in both cases. A transition from mixed to segregated states is observed when ω is increased for a fixed mass ratio m r . The transition is evident considering well-evolved configurations. In figure 4, four snapshots of segregated and mixed states are presented for fixed ω and different m r at t = 10 6 T . For low values of ω, heavy particles present a degree of mixing compatible with the expected fluctuations. Clusters that have finite lifetime appear when ω is raised. They present fusion/fission processes. Their size and stability in time increase when ω is further increased, although no permanent clusters are observed. For a large enough value of ω, one big stable cluster of heavy particles with dimensions comparable to the system size is obtained, containing a large fraction of B particles: this is what we call a global cluster. We shall call these three final states mixed, partly segregated and completely segregated states. A similar classification of segregated states was established previously by Reis et al while describing a horizontally shaken polydisperse granular submonolayer [28,29]. The same qualitative transition sequence is observed when m r is increased with a fixed ω, for 5 m r 8.
From the snapshots in figure 4, it is possible to see that global clusters have a peculiar geometry. B particles present crystallographic order altered by domains of light particles. The intruders limit the segregation level that can be reached, since A particles will always be present inside clusters (see section 4.3). It was observed that these states are not transient states, at least in the timescale of 10 6 T . Depending on the relative concentration N B /N A , the cluster may also lose its circular geometry and connect through the PBCs. Computational time constraints made it impossible to study these long time behaviours extensively. Nevertheless, a few cases were studied, and quantitatively, segregation did not change considerably.

Behaviour of the order parameters
The different segregation order parameters show clear signs of the transition and each one has particularities that can lead to a deeper understanding of the transition. In figure 5, all parameters are shown for the region of m r explored, and for 4 ω 10.
For low vibration frequencies, the segregation order parameters show a slight increase with ω, until a value is reached when the δ parameters increase at a higher rate until a saturation plateau is attained. The frequency at which the order parameters increase beyond the values obtained for homogeneous systems allows one to define a critical frequency ω * for the transition. It is quite clear that ω * depends on m r . As m r increases, ω * decreases.
The intensity of the transition-quantified by the rate at which the segregation order parameters increase and the final plateau value-is larger for larger mass ratios m r . The segregation is not perfect, however: δ K and δ N are far from 1-the expected value for perfect segregation-but the cluster segregation order parameters δ Cs and δ Cn do reach values close to 1.

12
All of this put together implies that the segregation is characterized by the clusterization of B particles into a single cluster that includes most B particles, but this cluster is highly ramified with many inclusions of A particles. Due to the form of the transition, it was not possible to quantitatively discriminate between partial and complete segregations described in the previous section since it looks rather like a continuous transition.
As already stated, the critical frequency ω * for which segregation occurs varies with m r . It also depends on the parameters of energy injection, the height of the box, the total number of particles and the mechanical properties of the grains and the walls, but we did not perform a systematic study on this dependence.
After the critical frequency ω * , the segregation order parameters continue to increase until they reach a constant, stable value, except for δ K , which presents fluctuations due to the energy bursts described in the introduction [22]. The order parameters δ Cs and δ Cn are not affected by the expansion produced in energy bursts, as clusters are defined using the Delaunay criteria. Segregation continues to increase slightly after a global cluster exists, mainly due to the decrease in the number of small clusters. This can be seen also by comparing panels (c) and (d) of figure 4, where fewer and smaller isolated clusters are seen for higher ωs.
The segregation order parameters present similar behaviour for the segregation transition by varying m r with a fixed ω, for 2 15 . Beyond a mass ratio m * r that depends on ω, the segregation order parameters begin to increase rapidly though continuously. In this case, the plateau values of the segregation parameters that are reached for large m r are independent of ω.

Cluster internal density
Clusters made of B particles have some A particles inside the cluster. This seems to correspond to the balance in effective chemical potential between the solid and gas phases. Here, we measure the final density and study its dependence on the initial condition.
To be sure that we are dealing with the final density, two initial conditions are used: one in which the system starts segregated, with a perfectly circular cluster made of B particles, and a mixed state (see figure 2). A mixed state eventually segregates and reaches a stable state (with energy bursts), but also the segregated initial state starts to evolve, as A particles move inside the B cluster and reduce its density. After a sufficiently long evolution, the two systems present equivalently segregated states. Cluster density is defined as the ratio of the number of B particles in the cluster to the total number of particles in the cluster N c , A c is the number of intruders in the cluster, that is, the A particles that are inside the cluster. Intruders are defined as A particles that have more than three B neighbours that belong to the cluster. In this case, the Delaunay triangulation is particularly useful as energy bursts tend to expand clusters. The late evolution is similar in both cases, reaching a final state with high fluctuations about an average value. For the initially mixed system, a value of n c = 0.69 ± 0.02 is obtained, while for the initially segregated system, n c = 0.72 ± 0.02, values that agree within the error. The order parameters also show the convergence of both systems to a common intruder density, within fluctuations. In figure 6, δ K is plotted for the two systems. Both systems converge to a common value δ K ∼ 0.3 at t ∼ 3 × 10 5 T , showing that the final state is not perfectly segregated but has a cluster of heavy particles with a number of light particles inside.  Figure 6. Evolution of the density-overlap order parameter δ K in a system that presents global clustering. It is seen that δ K converges to a value of about 0.3, already at 2 × 10 5 T , for both an initially mixed system (black) and an initially segregated system (red), with m r = 10 and ω = 7.

Phase space
Systems with two different concentrations of B particles and the same global density were considered to build the phase diagram in the (ω, m B ) control parameter plane. These two systems were defined with twice and four times as many lighter particles as heavier particles. The order parameters δ are observed to be independent of the concentration of Bs, indicating that-in the region explored-the transition is not much sensitive to the concentration of B particles in the system. Figure 7 presents the values of the order parameters in the (ω, m r ) plane, computed for the case where N A = 1000 and N B = 500. Figure 5 shows that δ K has a steeper variation about the transition from a mixed to a segregated state. The location of the steepest point allows us to obtain a transition curve in the (ω, m r ) space. The level curve δ K = 0 is fitted by a law of the form yielding ω c = 5.35 ± 0.1 and m c r = 7.72 ± 0.06. The fitted curve is shown in figure 7. The base value of the frequency ω c sets a lower limit for observing segregation. The mass ratio also presents a critical value m c r , below which no segregation was observed. In the case ω 1, the transition becomes independent of m r and m * r = m c r . If, on the other hand, m r 1, then the transition becomes independent of ω, and ω * = ω c . Thus we see that there is competition between ω and m r for relevance in the transition. If particles are massive, then injecting more energy becomes irrelevant, since AB collisions hardly influence the motion of B particles and they will anyway reach their fixed point. Note that the timescales of the system vary when the frequency is changed. On the other hand, if the energy injection is very high, it dominates the dynamics, making the motion of the system highly vertical, thus rendering irrelevant the role of the mass ratio, reducing the perturbation role of AB collisions, since B particles will anyway reach the fixed point. Figure 7 indicates that transition value m r becomes independent of ω for large enough values of the frequency. Increasing ω is equivalent to decreasing the relevance of gravity. Therefore, the presence of segregation at high frequency values confirms that gravity is not relevant to trigger the formation of clusters. For smaller values of ω, the effect of gravity increases, until segregation is completely suppressed for ω < ω c .

The fixed point and energy ratios
Velocity and vertical position distributions for both types of particles-obtained in the final stages-are presented in figure 8. All quantities are measured at the same phase of oscillation, when the base is at its lowest position. The distributions show a clear tendency of the B particles to approach the fixed point and move synchronously as m r is increased: most of B particles have the same velocity and vertical position when snapshots are taken stroboscopically. The number of particles close to the periodic trajectory does not change abruptly, but it increases considerably at m * r = 8.5. The velocity distribution of A particles (not shown) is generally wider than that of B particles and remains fairly constant as m r is increased before the transition. At m r = 8.0, just before the transition, the velocity distribution for the A particles presents a small peak at the same value as for the B particles. This peak continuously grows as m r is further increased. This fact coincides with the existence of global clusters of B particles. Global clusters reduce the number of AB collisions as all B particles tend to be together and closely packed. They also increase the free volume for A particles, since B particles rapidly reduce their free volume when they are part of a cluster. This has the effect of reducing the horizontal kinetic energy of A particles as particles suffer fewer energetic perturbations, and thus allows some A particles to reach their own fixed point. Horizontal velocity distributions (not shown) confirm the tendency of B particles to reduce their horizontal energy and of A particles to increase their horizontal energy [22].
The variation in the horizontal and vertical energies, K h and K v , respectively, for both species is seen in figure 9 as a function of m r . First, K Ah and K Bh increase their values in relation to the homogeneous system energy. Vertical energies, on the other hand, show a different behaviour: K Bv increases as K Av decreases. Heavier particles concentrate their motion in the vertical direction as m r is increased, as can be seen by observing the velocity squared: vertical velocities increase and horizontal velocities decrease. This should be expected, remembering that the only source of horizontal energy is the collision between particles, and as B particles become more massive, AB collisions become less relevant for B particles and thus their squared horizontal velocity decreases. The effect on K Ah is exactly the opposite as collisions with B particles become more relevant. The total average horizontal velocity squared (considering both types of particles) decreases with m r , while the total average vertical velocity squared increases; thus energy globally starts to concentrate in the vertical direction.
With growing m r , K Av becomes for the first time larger than the value for a homogeneous system at the transition value. At this transition, the ratio of horizontal energies crosses 1, showing that only in completely segregated systems K Ah > K Bh .

System dynamics
In the previous particular picture of the segregation transition, three types of behaviour are observed: systems that present no considerable segregation and thus remain in a mixed state throughout the simulation time; systems that present partial segregation but do not converge to a state with a global cluster; and systems that eventually converge to a global cluster state, leading to a highly segregated state. Now we focus on the dynamics and evolution to these states. Three systems are considered with ω = 7, one for each particular behaviour, with m r = 7 for the mixed case, m r = 8.2 for the partly segregated case and m r = 10 for the completely segregated case. The time dependence of the number of clusters is shown in figure 10. In the mixed system, the number of clusters fluctuates about 20% from an average value that is constant throughout the simulation. The partly segregated system already presents a slight decrease in the number of clusters, but the number of clusters remains high when compared to the completely segregated system, in which the number of clusters N cB decreases for a lapse of about 10 5 T until it reaches a base value and fluctuates when N cB ∼ 20.
The velocity and position distributions show a quick alignment of B particles because of the existence of a periodic trajectory for the one-particle system. Nevertheless, the variance of the position distribution continues to decrease throughout the simulation, and the velocity distributions become steeper, as can be seen by comparing with figure 8. As bigger clusters are formed through the process of coalescence, in a much longer timescale, fluctuations due to AB collisions decrease and thus the alignment of the heavy particles and their coincidence in the velocities increase.
Thus, the general picture of the early evolution of the system is as follows: small clusters are formed that keep merging until a stable state is reached. In this process, K Bh decreases, K Bv increases and, of course, the number of clusters in the system decreases.

Qualitative description
We now turn our attention to the case when the two particle types differ only in their size, while the mass density of the particles is the same. That is, σ A = 1, σ B > 1; m A = 1 and the mass of the B particle is obtained imposing the same mass density as the As: The other simulation parameters are the same as those used previously, whereas σ r ≡ σ B /σ A , N A , N B , and ω will be changed. The total number of particles is adjusted to keep the 2D (horizontal) density fixed, ρ s ∼ 0.644. Size difference was studied in the range 1 < σ r 1.5, and segregation was found at σ r 1.3. Bigger particles form global clusters that may involve almost all of the B particles in the system, as can be seen in figure 4. Contrary to the mass segregation case, clusters present just a few small particles inside; thus systems reach much higher segregation values.
In general, we see a sharper transition from mixed to completely segregated states in this case than in the mass segregation case. When there is segregation, a global cluster appears, i.e. there is no partial segregation, and the number of particles that belong to that cluster increases when ω is increased (see figure 4). In the mass difference case, contrary to the partially mixed systems, the partial segregation states are unstable, and eventually all systems that present segregation create a global cluster.
The parameter space is limited by the existence of frozen states: final states where all particles are in the fixed point and there is no horizontal energy in the system. For monodisperse particles, as the size of the particles increases, there is less space for horizontal movement and also the angle of collision between particles becomes narrower, increasing the horizontal energy dissipation. In the mass difference case, the region of the parameter space that leads to the frozen state is much smaller, although it still exists. This is expected as A particles conserve their horizontal agitation, and AB collisions help to maintain the system with horizontal energy. In practice, the frozen states limit the range of frequencies in order to have horizontal agitation: ω 5.5 for σ r 1.4 and ω < 7.0 for σ r < 1.4.

Behaviour of the order parameters
The segregation transition quantified by the different order parameters is presented in figure 11 as a function of ω for several different values of σ r . There is an abrupt change in all order parameters at a critical value ω * (in the case of σ r , there is an interval in frequencies for the transition). This should be compared to the mass difference case in which the order parameters do not present a discontinuity at the critical mass ratio. The continuous transition in the mass difference case becomes a discontinuous transition when there is a size difference. Consistent with a discontinuous transition, the order parameters can take two different values (and not the values in between as if they were transient states) depending on the initial condition, for a range of frequencies.
The critical frequency ω * at which segregation takes place is strongly dependent on σ r : decreasing with increasing σ r . On varying ω, the situation changes as the critical size ratio σ * r depends only weakly on ω.

Velocity and position distributions
The vertical velocity distributions show that, contrary to the mass segregation case, the alignment of B particles is not a necessary condition for segregation to take place. This can be explained by considering that bigger particles have less free space between the top and bottom walls and thus their movement is more controlled by the oscillation of the walls, more so when the particles form a cluster and the number of AB collisions decreases. In conclusion, bigger particles can be misaligned and even present segregation; the existence of a periodic trajectory in the one-particle system is not a necessary condition for segregation in the different-size case.

Systems dynamics
The evolution of the density-overlap order parameter δ K is presented in figure 12 for simulations with σ r = 1.3 and ω = 5.5 (that is, in the region where the order parameters show bistability). Three simulations that start with the mixed initial condition but different random numbers are shown. Metastability is observed, consistent with the discontinuous transition described by the order parameters. Furthermore, one of the three simulations had not begun the segregation process at t = 10 6 . A visual exploration of the simulations shows that the systems remain mixed with no apparent segregation until a high enough density fluctuation triggers the segregation process.

Continuity of the transitions
Simulations suggest that when grains differ in mass, the order parameters change continuously, whereas when grains differ in size, the order parameters change discontinuously. As supplementary evidence, two simulations, one with mass difference and the other one with size difference, are performed with parameters in the transition region, starting with a mixed initial condition. In both cases, the segregation parameter δ Cn , computed as a function of time, is shown in figure 13. Videos of both simulations can be found in the supplementary data (available from stacks.iop.org/NJP/13/055018/mmedia): see movie 1 for the mass difference case and movie 2 for the size difference case. It is observed that when grains differ in mass, the order parameter grows monotonically from the initial time until the final state is reached. The corresponding video shows small clusters that rapidly develop, grow in size and, later, slowly coalesce. The evolution of the order parameter, and the corresponding video, looks like the spinodal decomposition. When grains differ in size, on the other hand, the order parameter fluctuates for a long time until a threshold value is reached, where it starts growing continuously. The video shows that, in a first stage, small clusters form and disappear rapidly, and when a large enough cluster is created by the fluctuations, it grows slowly until the final size is reached. Once the cluster is created, no secondary clusters appear. This evolution is characteristic of a nucleation process.
Nucleation and the spinodal decomposition can be found in first-order transitions of a conserved order parameter, as is the case here, since the number of particles of each species is conserved. A first-order transition, however, can become continuous if the control parameters are moved so as to cross the critical point, in which case the dynamics are purely driven by the spinodal decomposition. Therefore, both segregation processes could be first order, but in the case of the mass difference, the transition implies crossing the critical point (or quite close to it). The classification into continuous and discontinuous transitions-although suggested by the simulation results-should be verified in detail considering larger systems. Indeed, finite size effects, present in the simulations, can soften discontinuities in the order parameters and their derivatives. Also, eventual divergent time or length scales or the development of sharp hysteresis loops is not conclusive in finite systems.

Conclusions
Numerical simulations of binary granular mixtures in a vertically vibrated quasi-2D box show that segregation takes place when the two species differ in either mass density or size. The restricted geometry, where the box height does not allow two grains to be on top of one another, reduces drastically the role of gravity in segregation. Therefore, it is necessary to conceive new mechanisms to explain the segregation driven by difference in size or mass density. In the case when grains differ only in their mass, the analysis of the simulation results suggests that the lack of energy equipartition between the two species and between the vertical and horizontal scales is a key factor. The ratio of the horizontal energy of the heavy grains to that of the light grains becomes smaller than unity at the transition point. This implies that the horizontal pressure of the light grains becomes higher, compressing any cluster of heavy grains that is created spontaneously. This allows the creation of denser clusters and their subsequent coalescence. The origin of the energy difference is the existence of a fixed point in the vertical dynamics, in which grains collide in phase with the walls at the same frequency with vanishing horizontal motion. The mass contrast makes it easier for the heavy particles to reach the fixed point, while the light grains are easily taken off from it.
When grains differ in size, there is also a mass difference, but comparing with the previous case, segregation is observed for smaller mass contrasts. Therefore, geometrical factors also play a role. Bigger particles have a smaller free space between the plates, having a higher convergence speed to the fixed point. For simple geometrical reasons, collisions with bigger particles transfer mainly horizontal momentum and therefore the fixed point is less perturbed.
These two reasons make it easier for the size difference case to create a horizontal kinetic energy difference between the species and therefore segregation is obtained for smaller mass ratios.
The two cases under discussion present an important difference in the character of the transition. Simulations suggest that one transition is continuous and the other one is discontinuous. When grains differ in mass, the segregation parameters change continuously, whereas when grains differ in size, the segregation parameters change discontinuously. Consistent with this, metastability is observed in the second case. If the driving mechanism is the pressure difference between the two species, the large-scale dynamics could be driven by negative compressibility and therefore nucleation or spinodal decomposition can be obtained depending on the control parameters. If the parameters are changed in such a way that the critical point is crossed in the spinodal region, a continuous transition is obtained, but if the metastable region is reached, a discontinuous transition is obtained with nucleation dynamics. More analysis is needed to verify whether the transition is driven by pressure differences and whether effectively the different dynamics are those of continuous and discontinuous transitions. It must be remarked that simulations are performed for finite systems, for which continuous and discontinuous transitions cannot be absolutely differentiated. Simulations of larger systems are necessary to clarify these issues.
In all of the observed cases, segregation is not perfect, although in the case of size difference, clusters of the minority phase are nearly circular and have a small number of inclusions of the other species. On the other hand, when species differ in their density, clusters are highly fragmented, with a large proportion (up to 30%) of inclusions inside the clusters. Not one but several clusters develop with fusion/fission processes taking place.
Our results provide relevant information for describing collective or coarse grained effective 2D dynamics. The fixed point associated with the vertical motion, which has the role of storing energy and reducing the horizontal motion, is crucial for correctly describing the effective 2D dynamics. The fast and small-scale dynamics related to the vertical motion, although invisible when the system is seen from above, need to be coupled with the slow and large scale-hydrodynamic-like-2D dynamics.