Theoretical Physics
Discrete simulation models of surface growth
Martin Bjork¨ Erik Deng [email protected] [email protected]
SA104X Degree Project in Engineering Physics, First Level Department of Theoretical Physics Royal Institute of Technology (KTH) Supervisor: Jack Lidmar
May 22, 2014 Abstract In this thesis the time evolution and scaling properties of different discrete models of surface growth using computer simulation is studied. The models are mainly using random deposition at a perpendicular angle to the substrates to model the adsorption process, and both one dimensional and two dimensional surfaces are considered. The Edwards-Wilkinson, Kardar-Parisi-Zhang and Mullins equations are also studied as analytical methods to describe the growth of surfaces. The scaling exponents derived from these equations are used as reference when analysing the exponents calculated from the simulation models studied in this thesis.
We have found that the simulation models do not correspond perfectly with the analytical models for surface growth, suggesting possible flaws in our models or definitions. Despite the possible flaws, the models prove to be powerful tools for analysing the time evolution of surface growth. Furthermore, we have shown that most of the simulation models exhibit the expected scaling properties, which indicates that the surfaces do have the self-affine structure they are presumed to have.
Sammanfattning I denna avhandling har tidsutvecklingen och skalningsegenskaperna hos olika diskreta modeller for¨ yttillvaxt¨ studerats med hjalp¨ av datorsimuleringar. De flesta modellerna anvander¨ slumpmassig¨ deposition vinkelratt¨ mot substraten for¨ att modellera adsorption, och bade˚ en- och tvadimensionella˚ modeller har studerats. Edward-Wilkingson-, Kardar-Parisi-Zhang- och Mullinsekvationen har aven¨ studerats som analytiska modeller for¨ att beskriva yttillvaxt.¨ Skalningsexponenterna som har erhallits˚ fran˚ dessa ekvationer har anvants¨ som referenser vid analysen av exponenterna som har raknats¨ ut fran˚ de simuleringsmodeller som har studerats i denna avhandling.
Vi har kommit fram till att simuleringsmodellerna inte stammer¨ overrens¨ perfekt med de analytiska modellerna, vilket tyder pam˚ ojliga¨ brister i vara˚ modeller eller definitioner. Trots de mojliga¨ bristerna har modellerna visat sig vara kraftfulla verktyg vid analys av tidsutvecklingen av yttillvaxt.¨ Vidare har vi visat att de flesta av simuleringsmodellerna uppvisar de forv¨ antade¨ skalningsegenskaperna, vilket ar¨ ett tecken pa˚ att ytorna har den sjalvaffina¨ struktur de antas ha.
1 Contents
Introduction 3
Background theory 3 Stochastic growth equations ...... 5 Random deposition ...... 5 Edwards-Wilkinson equation ...... 5 Kardar-Parisi-Zhang equation ...... 6 Mullins equation ...... 6
Models of surface growth 7 Random deposition ...... 7 Ballistic deposition ...... 8 Simple surface diffusion ...... 9 Kinetic Monte Carlo ...... 9
Results and discussion 12 Random deposition ...... 12 Ballistic deposition ...... 12 Simple surface diffusion ...... 14 Kinetic Monte Carlo ...... 14
Summary and conclusions 18
References 19
2 Introduction Background theory
Surface growth is often associated with the accretion of In this section, we present the background theory of the a physical surface, such as growing crystals and metals. subject at hand. This theory is presented in its entirety in [9] This is also largely the focus of the area, and there are and [10], but is reiterated here for convenience. We begin many applications of this approach, both in academics by introducing the concept of fractals and self-affinity, and industries [1], including crystal growth [2], biological followed by a presentation of important topics, such as growth [3] and growing snow layers [4]. However, there are roughness and scaling exponents. We conclude this section also other areas where the same general ideas and concepts by presenting different analytical methods for describing are applicable, such as fluid flows [5], fire fronts [6] and surface growth, i.e. the Edwards-Wilkinson equation (EW), bacterial growth [7][8]. the Kardar-Parisi-Zhang equation (KPZ) and the Mullins diffusion equation. The results derived from these equations Generally, surface growth can be considered to be the will be used as references when comparing with the models time evolution of an interface - the interface representing we have used. the growing surface. It has been observed that these interfaces share some common properties in a wide range of When observed at different scales, the morphology of applications, for example the time evolution of the interface fractals does not change, meaning that they look the same roughness and the self-affine structure of the interface [9]. regardless of the scale at which they are being observed. These common properties makes this a very interesting For fractals, the scaling factor is the same in all directions, subject to study because of the wide range of possible but there are also objects that share a lot of properties with applications of the results. fractals, the sole difference being that they have different scaling factors in each direction. Objects with this property In this thesis, we have chosen to study different discrete are called self-affine. Surfaces are an example of self-affine simulation models of surface growth. The main focus has objects; when scaled correctly it is virtually impossible been the implementation of the different models, but we to tell at which magnification the surface is observed. have also investigated the time evolution of the roughness of However, they are not self-affine in the classical sense since each model, as well as their scaling properties. Furthermore, they do not have identical patterns repeating on different we have analysed a number of analytical stochastic growth scales, but they are statistically self-affine; the statistical equations as a comparison to the results obtained from the properties of the surface are conserved when scaling - an simulation models. The equations we have analysed are example of this is shown in 1. This self-affinity can be used the Edward-Wilkinson equation, the Kardar-Parisi-Zhang to determine the scaling properties of the surface. equation and the Mullins equation - each having a different approach accounting for the processes occurring in surface growth. The scaling properties of each equation are com- pared to the simulation models to determine the validity of the different models.
We begin by presenting the background theory of the subject, introducing the most important concepts of surface growth as well as definitions of the properties we study in this thesis and analyses of the stochastic growth equa- tions. We continue by describing the simulation models we have considered and our implementations of them, including a short summary of the strengths and weaknesses of each model. Subsequently, we present our results and a discus- sion, giving a full analysis of each model and their relation with the stochastic growth equations. Lastly, a summary of our findings is presented, concluding this thesis.
Figure 1: An example of a statistically self-affine structure; without a reference it is virtually impossible to tell which image is shown at a higher magnification. Image adapted from [11].
3 The surface roughness, also sometimes called the inter- single value, and by plotting the roughness as a function face width, is defined as the standard deviation of the time of t/t , the systems will be scaled to saturate at the same ⇥ dependent height, as time, as can be seen in figure 3.
d 1 L w(L, t) [h(i, t) h¯(t)]2 , (1) ⌘ vLd u i=1 u X where w is the surfacet roughness, L is the system size, d is the dimension, h(i, t) is the height of the surface at lattice site i and time t, and h¯(t) is the mean height of the surface at time t. For a general surface the roughness increases as a power of time up to a crossover time t , sometimes called ⇥ the saturation time,
w(L, t) t , [t t ] . (2) ⇠ ⌧ ⇥ The exponent is called the growth exponent which de- scribes the time-dependent roughening dynamics. After the crossover time is reached the roughening saturates, giving the saturation value, wsat. The saturation value increases with increased system size L and the dependence also fol- lows a power law,
↵ wsat(L) L , [t t ] , (3) ⇠ ⇥ where ↵ is the roughening exponent that describes the roughening after system saturation. The crossover time also Figure 3: Roughness curves for different system sizes, before and depends on a power law after scaling. The roughness is scaled using the saturation value ↵ wsat L and the time is scaled using the crossover time t z ⇠ ⇥ ⇠ t L , (4) Lz. ⇥ ⇠ where z is called the dynamic exponent. One easy way of estimating t is shown in figure 2. ⇥ This suggests that w(L, t)/wsat(L) is only dependent on t/t , thus giving the general scaling relation of the rough- ⇥ ness, also called the Family-Vicsek scaling relation [12]
t w(L, t) w (L)f ⇠ sat t ✓ ⇥ ◆ t w(L, t) L↵f . (5) ⇠ Lz ✓ ◆ Here the function f(u), with u = t/t , is a scaling function ⇥ satisfying
f(u) u , [u 1] ⇠ ⌧ f(u)=const , [u 1] . (6) The exponents are also related to each other. Con- sider the fitted straight lines in figure 2; Approaching the Figure 2: Two fitted lines, one for the time dependent growth, the other for the saturated value, are used to estimate the crossover crossover point from the left we get w(t ) t , while ap- ⇥ ⇠ ↵⇥ time, t , at their intersection point. proaching from the right gives us w(t ) L , according ⇥ ⇥ ⇠ to (2) and (3). Thus t L↵ and by using (4) we get that ⇥ ⇠ ↵ z = . (7) For different system sizes, by plotting w(L, t)/wsat(L) as a function of time, the saturation values are scaled to a
4 This relation between the exponents holds for any Taking the mean of the square of (11) we get growth process that obeys the scaling relation (5). These h2(xx, t) = C2t2 +2Dt . (13) three scaling exponents ↵, and z characterize the growth h i models and tell us their self-affine structures and morpholo- Thus we get that gies. w2(t)= h2 h 2 =2Dt . (14) h i h i Stochastic growth equations 1 Since w(t) t 2 we have that the roughness exponent for ⇠ Models based on stochastic continuum growth equations are RD is 1 often able to predict the scaling exponents analytically and = . (15) have the general form 2 As stated previously, the ↵ and z exponents are unde- @h(xx, t) = (h,xxx, t)+⌘(xx, t) . (8) fined for this model and can therefore not be calculated. @t Here h(xx, t) is the height at position x and time t, Edwards-Wilkinson equation (h,xxx, t) is a function that reflects the modelled growth To describe models with correlated lattice sites we need process, and ⌘(xx, t) is the noise term corresponding to the to modify the function (h,xxx, t). By using symmetry random fluctuations in the deposition of particles. We only arguments for a surface in equilibrium we can deduce consider Gaussian noise, which is the most simple case for general forms of the growth equation. which the noise has no correlation between the individual lattice sites and thus averages to zero. The noise therefore A surface in equilibrium should be invariant under the satisfies the properties transformations ⌘(xx, t) =0 (9) h i h h + h ! and x x + x (16) ! d t t + t. ⌘(xx, t)⌘(x0,t0) =2D (x x0) (t t0) , (10) ! h i This means that the surface is independent of the origin of d D where is the dimension and is a constant. The form the coordinate system as well as the origin of time, since (h,xxx, t) of varies depending on the models used. We will we should be able to study a surface from any point and present some of the most commonly used forms in the fol- any time and it should still behave consistently. For a sur- lowing sections. face not accounting for empty spaces inside the interface, it should also be symmetric about the origin of the coordinate Random deposition system and the mean height which suggest invariance under the transformations The simplest growth model is when particles are randomly generated at a position and deposited at the top of the col- umn underneath it. This is called the random deposition h h model (RD). The columns of a generated RD surface has ! x xx. (17) no correlation with each other and thus each column grows ! independently. Because of this, we cannot expect the surface The transformations in (16) rules out any explicit depen- to reach any saturated state, meaning that the ↵ and z expo- dence on h, x or t, leaving only derivatives of h, except for nents are undefined and irrelevant. The exponent, how- constants that can safely be ignored. Furthermore, the trans- ever, can be determined if we consider a non-equilibrium formations in (17) rules out any dependence on multiples of approach to the model. Since the columns are uncorrelated odd order derivatives, such as h and ( h)2, leaving only r r the growth rate at each site must equal the average number terms on the form 2ih and ( 2jh)( h)2k for any combi- r r r of particles arriving at each site x, which implies that the nation of positive integers i, j, k. Disregarding higher order function (h,xxx, t) equals a constant, C. Using this and in- terms, the lowest term that satisfies these requirements is tegrating (8) over time we get 2h, which gives us the Edwards-Wilkinson equation [13] r @h(xx, t) t = ⌫ 2h + ⌘(xx, t), (18) h(xx, t)=Ct + ⌘(xx, t0)dt0 (11) @t r Z0 where ⌫ is a diffusion dampening constant. The effect of h(xx, t) = Ct. (12) )h i the Laplacian term is to smooth the profile of the surface,
5 while keeping the mean height unchanged. Particles tend to Kardar-Parisi-Zhang equation relax from a higher to a lower position, and thus this term is EW does not account for growth that occurs at local normals often referred to as the surface relaxation term [9]. of the surface. For a growth rate v along the surface normal, the increase in height is found by using the Pythagorean the- To calculate the exponents ↵, , and z we can make use orem of the symmetry arguments. Assuming that the roughness interface h(xx, t) is self-affine, it should be statistically iden- h = (v t)2 +(v t h)2 tical when rescaling horizontally and vertically as well as r = pv t 1+( h)2 rescaling in time, r ( h)2 = v tp1+ r + ... , (26) x x0 ✏x 2 ! ⌘ ↵ ✓ ◆ h h0 ✏ h (19) ! ⌘ z where we have expanded using the assumption h 1. t t0 ✏ t. |r | ⌧ ! ⌘ This suggests that a non-linear term ( h)2 should be added r Using the relation of Dirac’s delta function, to account for lateral growth. The new equation becomes
1 @h(xx, t) 2 2 d(✏x)= d(x) , (20) = ⌫ h + ( h) + ⌘(xx, t) (27) ✏d @t r 2 r and (19) in (18) we get and is called the Kardar-Parisi-Zhang equation [14].
@(✏↵h) Using renormalization group theory, which is outside the = ⌫ 2(✏↵h)+⌘(✏xx, ✏zt) @(✏zt) r scope of this thesis, the exponents can be derived only in 1+1 dimensions. ↵ z @(h) ↵ 2 2 z ✏ = ✏ ⌫ (h)+⌘(✏xx, ✏ t) . (21) @(t) r 1 3 ↵ 1 ↵ = ; z = ; = = . (28) 2 2 z 3 The second moment of the noise term becomes The values for 2+1 dimensions have only been found z z d z ⌘(✏xx, ✏ t)⌘(✏x0, ✏ t0) =2D (✏(x x0)) (✏ (t t0)) through simulation methods, resulting in the values [9] h i =2D✏ (d+z) d(x x ) (t t ) , ↵ 0 0 (22) ↵ =0.38; z =1.58; = =0.24 . (29) z which implies that
z (d+z)/2 Mullins equation ⌘(✏xx, ✏ t)=✏ ⌘(xx, t) . (23) To account for surface diffusion, we may consider a macro- The scaled equation therefore becomes scopic current of particles on the surface, j(xx, t). The dif- fusion process does not change the number of particles and ↵ z @(h) ↵ 2 2 (d+z)/2 ✏ = ✏ ⌫ (h)+✏ ⌘(xx, t) therefore it must satisfy the continuity equation @(t) r @h @(h) z 2 2 (z d)/2 ↵ = j(xx, t) . (30) = ✏ ⌫ (h)+✏ ⌘(xx, t) . (24) @t @(t) r r · The current will flow from higher to lower potentials, which Since we require invariance under transformation, this equa- suggests that the current must be related to the local chemi- tion must be identical to (18). Therefore, the ✏ factors must cal potential, equal 1 and the exponents are j(xx, t) µ(xx, t) . (31) / r 2 d ↵ 2 d The chemical potential is related to the number of bonds ↵ = ; z = 2; = = . (25) 2 z 4 formed between particles. A particle landing in valleys in the surface, corresponding to a positive surface curvature, For d 2 the predicted values for ↵, 0, which suggests have more neighbours, making that site a favourable place a non-exponential behaviour. Derivations using power spec- to stay at with many bonds between particles. Conversely, tral density functions as well as simulations has shown that hills on the surface, corresponding to a negative surface cur- the behaviour is logarithmic for larger time spans [9][10]. vature, has few neighbours and thus are unfavourable sites with few bonds. These conditions are satisfied when
µ(xx, t) 2h(xx, t) . (32) / r
6 Combining the results (30)- (32) we get Models of surface growth @h = [ ( 2h(xx, t))] In this section, we present the different models of surface @t r · r r growth that we have considered. Our main focus lies on = 4h(xx, t) . (33) simulation models in one and two dimensions; we have cre- r ated the algorithms for the models with inspiration from the This term is sometimes called the Mullins diffusion term [15] sources mentioned below and implemented the algorithms in and can be added to other stochastic growth equation to ac- MATLAB. For the Random deposition (RD), Ballistic depo- count for surface diffusion. This term models a tendency of sition (BD) and Simple surface diffusion (SD) algorithms, the surface to smooth out local valleys in favour of growing the inspiration was drawn from [9], while the inspiration vertically. To extract the scaling exponents from the Mullins for the kinetic Monte Carlo algorithm (KMC) was drawn equation, from [16]. @h(xx, t) One dimensional models are easy to implement and have = 4h + ⌘(xx, t) , (34) @t r theoretical value in fields like fluid flows through porous me- dia [5] and the progress of forest fires [6]. Two dimensional we make use of symmetry principles again to rescale and use models are slightly more complicated to implement, but are the same method as with EW (18) to obtain the equation important in the study of physical surfaces, such as in crystal growth [2], and the formation of snow layers [4]. It is con- @(h) z 4 4 (z d 2↵)/2 = ✏ (h)+✏ ⌘(xx, t) , (35) venient to refer to the surface growth dimension as ”d +1” @(t) r dimensions where ”d ” denotes the substrate surface dimen- giving the exponents sion and the ”+1”is for the growth occurring in an extra dimension [10]. 4 d ↵ 4 d ↵ = ; z = 4; = = . (36) We begin by describing the simple models, RD and BD, 2 z 8 and continue with the slightly more advanced model, SD, before moving on to the most advanced model we have im- plemented, KMC. In each model description, we start by presenting the general concept of the model, as well as a short explanation of our implementation in 1+1 dimension. In the cases where we have also implemented a 2+1 dimen- sional version, we present a short explanation of the 2+1 dimensional implementation as well.
Random deposition The first model we studied was a simple model where parti- cles collide perpendicular to the surface at random positions and attach irreversibly where they are deposited, ignoring lo- cal geometry. This is achieved by repeatedly selecting posi- tions along the surface at random and increment the surface height at that point; that is, select a position i at random, and set height(i) = height(i) + 1. Figure 4 shows how particles interact with the surface. As seen in figure 5, this results in a very rough surface with narrow spikes. This model is not particularly physically plausible since all columns are uncorrelated and grow independently, but it serves as a good starting point for further development of a better model. Particles depositing at random positions each time step is a good model for a homogeneous surface adsorption, and because of its simplicity, it is easy to further develop models that account for more properties of a surface.
7 Figure 4: Visualisation of how particles stick to the surface in RD. Figure 6: Simulation of random deposition in 2+1 dimensions. Both particle A and B fall as far as they can, without interacting 500 000 particles were deposited, and the system size was 200 ⇥ with the other columns on the surface. 200 lattice units.
height(i) = max(height(i-1), height(i) + 1, height(i+1)).
Figure 5: Simulation of random depostion in 1+1 dimension. 10 000 particles were deposited, and the system width was 200 lattice units.
The expansion to 2+1 dimensions of this model is quite straight-forward. As in 1+1 dimensions, a position is chosen Figure 7: Visualisation of how particles stick to the surface in BD. at random along the surface, and the height at that position is Both particle A and B stick to the first particle they encounter; par- incremented; that is, a position (i,j) is chosen at random, ticle A sticks to the top of the neighbouring column, whereas parti- cle B sticks to the column directly underneath itself. and we set height(i,j) = height(i,j) + 1. In figure 7, the particles interaction with the surface is The result can be seen in figure 6. As can be seen, the result shown. This yields a slightly more interesting result with is a dense surface with a lot of spikes. treelike patterns, as can be seen in figure 8. The structure obtained from this model resembles some phenomena in Ballistic deposition nature, for example how snow layers form [4], but the lack of surface diffusion, and the fact that the resulting surfaces As in the previous model we let the particles trajectory be are very porous, are unwanted properties for our more perpendicular to the surface, but this time the particles attach advanced models. as soon as they come in contact with another particle that is already on the surface. A random lattice site is chosen, and As with random deposition, the 2+1 dimensional ballis- a particle is deposited each time step. If the surface is higher tic deposition model is a direct expansion of the correspond- at the points next to this chosen point, the particle will stick ing 1+1 dimensional model. A position is chosen at random, irreversibly next to the highest of these points, otherwise, it and the deposited particle is attached at the same height as will stick to the surface as in the previous model; that is, a the highest of the neighbouring particles; that is, a position position i is chosen randomly, and we set (i,j) is chosen at random, and we set the height at that
8 Simple surface diffusion In reality, particles are not stuck irreversibly to the surface; they can diffuse along the surface or even detach. A very simple model to account for this behaviour is to choose a particle from the top layer of the surface at random each time step and let it try to move one step in an arbitrary di- rection along the surface. The particle is allowed to move along the surface, but not up or down freely - if it reaches an ascent it must overcome an energy barrier to jump up due to the high binding energy, and if it reaches a descent its movement is restrained due to a reflective barrier existing at the edge. These ascents and descents are governed by prob- Figure 8: Simulation of ballistic deposition in 1+1 dimensions. abilities where it is much easier to descend than to ascend, 10 000 particles were deposited, and the system width was 200 whereas moving along a flat surface is always allowed. The units. model does not account for the number of neighbour each particle has. A typical result from a simulation is shown in figure 10. position, h(i,j), to h(i,j) = max(h(i-1,j-1), h(i,j-1), h(i+1,j-1), h(i-1,j), h(i,j) + 1, h(i+1,j), h(i-1,j+1), h(i,j+1), h(i+1,j+1)).
The result can be seen in figure 9. The number of par- Figure 10: Simulation of SD in 1+1 dimensions. 20 000 particles ticles are the same as in figure 6, but the surface is much were deposited, and the system size was 200 lattice units. One higher - apparently the surface is much more porous. This is particle was deposited and 10 particles were moved each time step. the same effect that was seen in the 1+1 dimensional case, The probabilities for ascending was set to 5% and for descending in figures 5 and 8. Note that in the 2+1 dimensional case 20%. we accounted for the nearest neighbours as well as the next- nearest neighbours.
Kinetic Monte Carlo The probabilities are in reality dependent on the binding energies from neighbouring particles, as well as surface potential barriers and the system temperature. To account for this, we use a much more advanced model, the kinetic Monte Carlo method (KMC). It takes into account the binding energies and temperature dependence, but also simulates the real time evolution of the growth process. By using correct values for the different parameters and implementing all possible events that may occur, this model should simulate a physically realistic growth process in a realistic time frame. In our model we only consider the events adsorption, diffusion with different number Figure 9: Simulation of ballistic deposition in 2+1 dimensions. of neighbours, and desorption with different number of 500 000 particles were deposited, the system size is 200 200 ⇥ neighbours, all of which are depicted in figure 11. Due lattice units. Note that, for convenience, only the top layer of each to the nature of KMC, there is no point in discussing the column is shown. number of deposited particles; the interesting quantity is instead time.
9 single particle, and nevent is the number of particles able to carry out the event. In a general KMC algorithm, fevent is recalculated each simulation step, but we have chosen them to be constants; the choice of the constants is discussed later in this section. The number of particles, however, changes every simulation step and is therefore recalculated. The calculated rates are mapped onto a probability scale, as depicted in figure 12, where the total length of the scale Figure 11: The possible events that are considered in the KMC is equal to the sum of all the rates, and the length of each algorithm. Particle A is performing adsorption, particle B is per- scale segment is equal to the corresponding rate. An event forming diffusion and particle C is performing desorption. N illus- is chosen using a uniformly distributed random number in trates the neighbours of particles B and C; B has two neighbours and C has one. the interval of the probability scale and performed.
All temperature dependent factors are based on the Ar- rhenius equation, E f exp 0 , (37) / kBT where E0 is the binding energy, kB is Boltzmann’s constant and T is the temperature in Kelvin. Since the exact value of Figure 12: The rates for arbitrary events 1 to 4 mapped on a line the binding energy is unknown to us, and considering that of length Rtot. The length of Ri corresponds to the total number of the probabilities are dependent on the ratio of the tempera- particles that may execute event i multiplied with the rate for that ture and the energy, the numerical value of the temperature event. in Kelvin is not particularly enlightening. We have therefore chosen to define the temperature as The time advances by a time step chosen from a Poisson E0 T = T 0 , (38) distribution, dt = log(u)/Rtot, where u is a uniform kB random number and Rtot is the total sum of all rates. where T is the temperature in Kelvin and T 0 is the tem- Notice that since Rtot changes at every simulation step, perature in E0/kB, the latter being used throughout this the distribution changes every time step. In other words, if thesis. The binding energy was chosen to E0 =1eV, there are many events that may occur at the given moment giving T 11 600 T 0. During simulations, we were mainly the time step will be small, and conversely, if there are ⇡ using T for convenience, so that value is often also given in few events that may occur at the given moment the time figures for clarity. step will be big in comparison. In reality, many events can occur simultaneously in contrast to the sequential nature The KMC algorithm is basically made up of four steps: of computer simulations; the dynamic time steps takes this into account and therefore gives a realistic time evolution of 1. Calculate the rates of the events. the system. 2. Choose a random event based on the rates and perform it. 3. Increment the time with a random number.
4. Repeat from step 1.
Initially, the rate of each possible event is calculated. The rate of an event is calculated as
revent = fevent nevent , (39) where revent is the rate of the event, fevent is the expected value of the frequency at which the event occurs for one
10 The following pseudo-code illustrates our implementation where D0 is the diffusion coefficient and E0 is an energy of the KMC algorithm. barrier corresponding to the lattice potential existing between two neighbouring particles [9]. The thermal fre- // Initialise all variables, quency A0 and diffusion coefficient D0 were both set to the // among others the event frequencies 13 same value for simplicity, taking A0 = D0 = 10 Hz as calculate_event_frequencies() a common order of magnitude of thermal frequencies [17]. t =0 The values for the energies were set to E0 =1eV, while t // Calculate the cumulative rates // and the total rate i Ri = rk kX=1 Rtot = RN // Choose an event using the // cumulative rates u = uniform random number (0, 1] 1 2 i = i : Ri 1