CHAPTER 14. FRACTALS AND KINETIC GROWTH MODELS 554a simple geometrical object (a circle or square) centered at the walker such that none of the clusteris within the object. The walker moves in one step to a site on the boundary of the object. Fora circle the walker can move to any location with equal probability on the circumference. Forthe square we need the probability of moving to various locations on the boundary. To find thelargest object that does not contain a part of the DLA cluster, consider coarse grained lattices.For example, each 2 × 2 group of sites on the original lattice corresponds to one site on the coarserlattice; each 2 × 2 group of sites on the coarse lattice corresponds to a site on an even coarserlattice, etc. If a site is occupied, then any coarse grained site containing this site also is occupied.a. Because we have considered DLA clusters on a square lattice, we use squares centered at thewalker. We first find the probability p(∆x, ∆y, s) that a walker centered on a square of lengthl = 2s + 1, will be displaced by the (∆x, ∆y). This probability can be computed by simulatinga random walk starting at the origin and ending at a boundary site of the square. Repeat thissimulation for many walkers, and then for various values of s. The fraction of walkers thatreach the position (∆x, ∆y) is p(∆x, ∆y, s). Determine p(∆x, ∆y, s) for s = 1 to 16. Store yourresults in a file.b. We next determine the arrays such that for a given value of s and a uniform random numberr, we can quickly find (∆x, ∆y). One way to do so is to create four arrays. The first array liststhe probability determined from part (a) such that the values for s = 1 are listed first. Call thisarray p. For example, p[1] = p(−1, −1, 1), p(2) = p(1)+p(−1, 0, 1), p[3] = p[2]+p(−1, 1, 1),etc. The array start tells us where to start in the array p for each value of s. The arraysdx(i) and dy(i) give the values of ∆x and ∆y corresponding to p[i]. To see how these arraysare used, consider a walker located at (x, y), centered on a square of linear dimension 2s + 1.Generate a random number r and find i = start(s). If r < p[i], then the walker moves to(x + dx(i), y + dy(i)). If not, increment i by unity and check again. Repeat until r ≤ p[i].Write a program to create these four arrays and store them in a file.c. Write a method to determine the maximum value of the parameter s such that a square of size2s + 1 centered at the position of the walker does not contain any part of the DLA cluster. Usecoarse grained lattices to do this determination more efficiently. Modify class DLA to incorporatethis method and the arrays defined part (b). How much faster is your modified program thanthe original class DLA for clusters of 500 and 5000 particles?d. What is the largest cluster you can grow on your computer in a reasonable time? Does thecluster show any evidence for anisotropy? For example, does the cluster tend to extend furtheralong the axes or along any other direction?Project 14.18. Cluster-cluster aggregationIn DLA all the particles that stick to a cluster are the same size (the growth occurs by the additionof one particle at a time), and the cluster that is formed is motionless. In the following, weconsider a cluster-cluster aggregation (CCA) model in which the clusters do a random walk asthey aggregate.Suppose we begin with a dilute collection of N particles. Each of these particles is initially acluster of unit mass and does a random walk until two particles become nearest neighbors. Theythen stick together to form a cluster of two particles. This new cluster now moves as a single
CHAPTER 14. FRACTALS AND KINETIC GROWTH MODELS 555random walker with a smaller diffusion coefficient. As this process continues, the clusters becomelarger and fewer in number. For simplicity, we assume a square lattice with periodic boundaryconditions. The CCA algorithm can be summarized as follows:i. Place N particles at random positions on the lattice. Do not allow a site to be occupied bymore than one particle. Identify the ith particle with the ith cluster.ii. Check if any two clusters have particles that are nearest neighbors. If so, join these two clustersto form a single cluster.iii. Choose a cluster at random. Decide whether to move the cluster as discussed. If so, move itat random to one of the four possible directions. The details will be discussed in the following.iv. Repeat steps (ii) and (iii) for the desired number of steps or until there is only a single cluster.What rule should we use to decide whether to move a cluster? One possibility is to select acluster at random and simply move it. This possibility corresponds to all clusters having the samediffusion coefficient, regardless of their mass. A more realistic rule is to assume that the diffusioncoefficient of a cluster is inversely related to its mass s, for example, D s ∝ s −x with x ≠ 0.A common assumption is x = 1. If we assume that D s is inversely proportional to the lineardimension (radius) of the cluster, an assumption consistent with the Stokes-Einstein relation, thenx = 1/d, where d is the spatial dimension. However, because the resultant clusters are fractals, wereally should take x = 1/D, where D is the fractal dimension of the cluster.To implement the cluster-cluster aggregation algorithm, we need to store the position of eachparticle and the cluster to which each particle belongs. In class CCA, which can be downloadedfrom ch14 directory, the position of a particle is given by its x and y coordinates and stored in thearrays x and y respectively. The array element site[x][y] equals zero if there is no particle at(x, y); otherwise the element equals the label of the cluster to which the particle at (x, y) belongs.The labels of the clusters are found as follows. The array element firstParticle(k) gives theparticle label of the first particle in cluster k. To determine all the particles in a given cluster, we usea data structure called a linked list. We implement the linked list using the array nextParticle,so that the value of an element of this array is the index for the next element in the linkedlist. The array nextParticle contains a series of linked lists, one for each cluster, such thatnextParticle[i] equals the particle label of another particle in the same cluster as particle i. IfnextParticle[i] = −1, there are no more particles in the cluster. To see how these arrays work,consider three particles 5, 9, and 16 which constitute cluster 4. We have firstParticle[4] = 5,nextParticle[5] = 9, nextParticle[9] = 16, and nextParticle[16] = -1.As the clusters undergo a random walk, we need to check if any pair of particles in differentclusters have become nearest neighbors. If such a situation occurs, their respective clusters haveto be merged. The check for nearest neighbors is done in method checkNeighbors. If site[x][y]and site[x+1][y] are both nonzero and are not equal, then the two clusters associated with thesesites need to be combined. To do so, we add the particles of the smaller cluster to those of thelarger cluster. We use another array, lastParticle, to keep track of the last particle in a cluster.The merger can be accomplished by the following statements:// l i n k l a s t p a r t i c l e o f l a r g e r c l u s t e r to f i r s t p a r t i c l e o f s m a l l e r c l u s t e rn e x t P a r t i c l e [ l a s t p a r t i c l e [ l a r g e r C l u s t e r L a b e l ] ] = f i r s t P a r t i c l e [ s m a l l e r C l u s t e r L a b e l ] ;