Percolation on a 2D lattice - January...

21
Percolation on a 2D lattice Kut J M 199030202 Q4 page 1 Percolation on a 2D lattice – a Monte Carlo computational analysis Abstract First-nearest neighbour (Von Neumann) site percolation through a finite square two-dimensional cartesian lattice was explored using Monte Carlo FORTRAN 95 simulations. In particular, the uncontrolled propagation, burn rate (lifetime τ) and percolation threshold p c (maximum lifetime τ max ) of a basic model forest fire was studied—where a proportion p of sites contain a tree. Various forest sizes (17 ad hoc lattices: 4-600 units 2 ) across a range of p values (0-1 to 8.d.p) were tested, working predominantly with one of two (alternative) lifetime definitions. 50 days (1.2×10 3 hours) of processing time was used [PIII 1.0GHz CPU 2000 bogoMIPS] in determining the percentage of burnt trees and mean lifetime values to minimal uncertainty 1 . The simulations functioned as intended, allowing p c for each model forest to be found via a polynomial function fit using a non-linear least-squares (NLLS) Marquardt-Levenberg algorithm. An inverse exponentional relationship of the form: ln (p c ) -x n between lattice size x and p c was observed, where for large forests ( 100 2 ) p c 0.60 and as x , p c 0.593916 ± 0.001158. Although alternative lattice configurations and other factors were not considered, they are well supported by this preliminary study and are worthy of further research. 1.0 Introduction Percolation is a geometric problem that has been extensively studied using numerous mathematical techniques, and plays an important role in statistical mechanics. These are processes where the random addition of several objects results in an interconnected path, spanning an entire system. With lattice site percolation, such contiguous groups are commonly known as clusters, with various configurations referred to as cluster animals. Percolation analysis therefore holds the key to better understand many physical phenomena: gel formation, colloid properties, polymer synthesis, flow through porous rock, phase transitions, etc. The propagation of a forest fire through clusters of trees is one candidate for modelling as a simple site percolation. In reality, forest fires and their containment are governed by various (uncontrollable or unpredictable) factors such as weather conditions, foliage type, tree grouping, etc. The approach taken in this report has been to implement a basic computational model to follow the influence of two variables on a fire’s lifetime: forest size and forest density. Understanding these fundamental factors paves the way for improved models and a better interpretation of reality— which is beyond the scope of this investigation. An analytical study of all cluster configurations was not possible due to the large number of permutations and current limitations on computer processing. A Monte Carlo methodology was therefore used to obtain values within a reasonable statistical error, based on relatively few randomly generated forests. 1 Using up to 10 5 random forest repetitions John Kut Magdalene College January 2002

Transcript of Percolation on a 2D lattice - January...

Page 1: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 1

Percolation on a 2D lattice – a Monte Carlo computational analysis

Abstract First-nearest neighbour (Von Neumann) site percolation through a finite square two-dimensional cartesian lattice was explored using Monte Carlo FORTRAN 95 simulations. In particular, the uncontrolled propagation, burn rate (lifetime τ) and percolation threshold pc (≡maximum lifetime τmax) of a basic model forest fire was studied—where a proportion p of sites contain a tree. Various forest sizes (17 ad hoc lattices: 4-600 units2) across a range of p values (0-1 to 8.d.p) were tested, working predominantly with one of two (alternative) lifetime definitions. 50 days (1.2×103 hours) of processing time was used [PIII 1.0GHz CPU ≈2000 bogoMIPS] in determining the percentage of burnt trees and mean lifetime values to minimal uncertainty1. The simulations functioned as intended, allowing pc for each model forest to be found via a polynomial function fit using a non-linear least-squares (NLLS) Marquardt-Levenberg algorithm. An inverse exponentional relationship of the form: ln (pc) ∝ -xn between lattice size x and pc was observed, where for large forests ( 1002) pc ≈ 0.60 and as x → ∞, pc → ≈ 0.593916 ± 0.001158. Although alternative lattice configurations and other factors were not considered, they are well supported by this preliminary study and are worthy of further research. 1.0 Introduction Percolation is a geometric problem that has been extensively studied using numerous mathematical techniques, and plays an important role in statistical mechanics. These are processes where the random addition of several objects results in an interconnected path, spanning an entire system. With lattice site percolation, such contiguous groups are commonly known as clusters, with various configurations referred to as cluster animals. Percolation analysis therefore holds the key to better understand many physical phenomena: gel formation, colloid properties, polymer synthesis, flow through porous rock, phase transitions, etc. The propagation of a forest fire through clusters of trees is one candidate for modelling as a simple site percolation. In reality, forest fires and their containment are governed by various (uncontrollable or unpredictable) factors such as weather conditions, foliage type, tree grouping, etc. The approach taken in this report has been to implement a basic computational model to follow the influence of two variables on a fire’s lifetime: forest size and forest density. Understanding these fundamental factors paves the way for improved models and a better interpretation of reality—which is beyond the scope of this investigation. An analytical study of all cluster configurations was not possible due to the large number of permutations and current limitations on computer processing. A Monte Carlo methodology was therefore used to obtain values within a reasonable statistical error, based on relatively few randomly generated forests. 1 Using up to 105 random forest repetitions

John Kut Magdalene College January 2002

Page 2: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 2

2.0 Analysis

Percolation clusters represent groups of trees through which a fire will spread over time. The nature of these clusters (in a randomly generated forest2) depends on factors such as lattice size and the number of trees present. Figure 2.0.1 (below) illustrates an example of real clustering.

3

A starting point for emulating percolation is to consider a simple computational model. This provides an effective and adaptable simulation from which observations can be made. A finite square two-dimensional cartesian lattice is the simplest model that can be used (figure 2.0.2 below).

4 Although this model may seem crude, many of its limitations become trivial in larger forest arrays ( 1002 cells)—where problems such as the forest’s square outline, inert border5, finite size and grid composition are less insignificant. Ironically, this rudimentary structure therefore offers an excellent simulation environment.

The effect of forest size can be readily tested using different lattice sizes. However, forest density may only be altered within a fixed grid structure by varying the proportion of trees present in the lattice overall. The distribution of trees therefore needs to be random to ensure that the local density (within any arbitrary segment of the lattice) is approximately the same as the overall density (see figure 2.0.3 overleaf). 2 Any simulated forest produced in a mathematically random fashion—as opposed to a natural forest which, even uninfluenced by man, is dependent on many complex ecological and environmental factors 3 Source: Cities Revealed ©The GeoInformation Group Ltd 2000 - http://www.streetmap.co.uk/streetmap.dll?grid2map?X=519500&Y=171500&arrow=N&zoom=1&largeuk=P 4 In this particular example, all Von Neumann clusters coincidentally contain three or more trees. This model is also suitable for study using Moore clusters (first and second nearest neighbours). No factors, such as the ability of trees to burn or tree type have been considered 5 An inert border provides the closest model to a real forest surrounded by open space. However, there are questions as to whether or not the border should play a part in percolation—and if the grid should be connected at its N-S / E-W sides to form an effectively closed infinite lattice

Figure 2.0.1 — An aerial photograph of High Wood, Richmond Park (Richmond-upon-Thames, Surrey, England) – illustrating a random distribution of isolated and clustered trees Under suitable conditions, group clusters would burn completely if ignited—leaving isolated trees virtually untouched

Figure 2.0.2 — A finite square two-dimensional cartesian grid representing a model forest with (identical) randomly placed trees In this six by six cell example, the lattice contains 36 unit sites of which 22 contain trees and 14 are vacant (≈61.1% of the lattice is occupied ∴average forest density p ≈ 0.61). Each unit lattice site is either empty or contains a tree Five separate clusters (Von Neumann groups containing two or more trees) are present with only one isolated site The border is modelled as inert in order to minimise its impact upon the forest

An example of a Von Neumann cluster (five trees)

An isolated site with vacant Von Neumann neighbours

Inert lattice boundary (forest border)

150m

Page 3: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 3

6

Modelling a percolating fire requires at least one tree to be initially alight. However, no single site always contains a tree due to the random nature of the forest. As we are primarily interested in the fire’s lifetime, we can follow this by setting alight all trees present in the top row7. With each time step, the fire spreads systematically to any first-nearest neighbours. Each step is thus an arbitrary unit of time, upon which the lifetime can be based8. This is illustrated in figure 2.0.4.

9

The lifetime τ of the fire in figure 2.0.4 (above) can be measured using one of two definitions:

1) The time taken for all trees, that can burn by Von Neumann percolation, to have burnt. The lifetime in figure 2.0.4 is therefore seven cycles and requires all the last row trees (green + yellow squares) to be burnt

2) The time taken for all trees to burn, as in definition (1), but in addition: or the time taken for the fire to reach the last row of the forest (whichever occurs sooner). As a result, the lifetime in the above example is four cycles and does not involve burning two last row trees (shaded green)10

The former definition is a self-evident de facto standard—in strict keeping with the concept of the lifetime of any physical system. It also accurately reflects the reality of a forest fire in nature11. However, one can envisage a circumstance where this definition might be misleading. 6 In this document, the terms forest density and the proportion (p) of filled sites in a forest are used interchangeably—although they are not strictly synonymous. Where any ambiguity arises, the latter is intended. A dense forest can therefore be interpreted as a lattice with a high proportion (p) of filled sites, and conversely a sparse forest can be interpreted as a lattice with a low proportion (p) of filled sites 7 If the forest is sparse enough to not contain any trees in its first row, this marks the end of the simulation (the lifetime of the fire is zero steps) 8 In reality, no regular time period exists in which a fire will spread from one adjacent tree to another 9 The choice of igniting all first row trees raises many reasonable questions. One practical alternative is to set alight only one tree in the first row 10 If the last three trees (shaded green and yellow) in figure 2.0.4 were not present, both definition (1) and (2) would give the same lifetime value (of 4 cycles) 11 Real forest fires spread to all trees and extinguishes only when everything that can burn, has burnt. The second definition is therefore somewhat artificial in this respect

Figure 2.0.3 — A 4x4 lattice with a proportion p = 0.25 of filled sites This trivial example shows that even with trees randomly distributed, the overall and local forest density are not necessarily always the same. This is, however, not a significant problem with larger lattices Crucially, we can see that filling the lattice with trees site-by-site (or by any technique other than randomly) is fundamentally erroneous

Segment — contains two trees ∴plocal = 0.5

Segment — contains only one tree ∴plocal = 0.25

In total the lattice contains 4 trees ∴ poverall = 0.25

Figure 2.0.4 — An example 4x4 forest with a percolating fire (p = 0.625) Initially there are ten unburnt trees out of 16 sites (six spaces are vacant). After four time steps (intervals), only one tree (in the last row) will be alight, with seven other trees burnt. Two trees remain to be burnt In this example, all trees in this lattice are part of a cluster to which a first row fire can spread. This is not always the case

All first-row trees (red) are initially set alight at time zero

Neighbouring trees (blue) will then catch fire in the next time step

After four time steps, a tree in the last row (yellow) will be on fire

Page 4: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 4

12

13 Figure 2.0.5 (above) provides conflicting arguments. In this unique example, the lifetime differs vastly between the two definitions. On the one hand, we can argue in favour of the first definition: It is physically unrealistic to ignore the six trees that remain unburnt by the time the fire has reached the bottom row. However, the second definition is better equipped to handle the concept of infinite percolation clusters. These exist when the proportion p of trees in the lattice reaches or exceeds a critical value (the percolation threshold pc), which coincides with the maximum fire lifetime (τmax) (see figure 2.0.6 and 2.0.7 below). Under these circumstances, we are effectively working with an infinite cluster in a finite lattice. Compared to the top and sides of the lattice14, the bottom boundary represents the most significant constraint in this model. One solution is to terminate the simulation when the last row is reached for the first time. The latter definition is therefore preferred, if only because it appears to represent an improvement on the former15.

12 For a lattice of size x with r trees, the number of permutations is given by x2! / ((x2-r)!r!) 13 Although this example lattice has an equal probability of being produced at random, the majority of remaining permutations do not share its unique attributes. A Monte Carlo methodology therefore helps to statistically marginalize the impact of these unusual cases 14 The top boundary is not a problem as we are only concerned with downward percolation. The sides are unproblematic as they do not compromise this 15 In the remainder of this document, references to the lifetime are based on the second definition, unless otherwise explicitly stated

Figure 2.0.6 — A snapshot of a 4x4 lattice (after 2 steps) containing 100% trees in the form of a single (≡infinite) cluster (p = 1.0, lifetime τ = 3 cycles) With the forest composed entirely of trees, the fire quickly propagates from end to end. The lifetime τ is therefore directly proportional to lattice size. However, this p value does not yield the greatest lifetime value (τmax) There is only one permutation for all p=1 forests. The lifetime value τ in this example is therefore always 3 cycles

Figure 2.0.7 — A random 4x4 lattice containing two separate clusters (p = pc = 0.6875, τ = 4 cycles) In this example, the lifetime of the fire is four cycles. It is, however, possible to obtain any lifetime value between zero and five using any other permutation of 11 trees (for instance, figure 2.0.5 (top) has a lifetime of 3 cycles) As the layout of trees in the forest maps out a continuous path from top to bottom, we can consider this the equivalent of an infinite percolation cluster

- The fire spreads from top to bottom as directly as possible

- The fire spreads from top to bottom, indirectly—taking more time than a direct route

Figure 2.0.5 — A 4x4 lattice containing a single continuous cluster with a percolating fire (p = 0.6875) Although this configuration seems improbably, there are in fact only 4368 permutations for placing 11 trees in 16 sites. This combination can therefore emerge (at least once) in Monte Carlo simulations, with random repetitions of the order of 105

All first-row trees (red) are set alight at time zero

After three time steps, a tree in the last row (yellow) is on fire

After ten time steps (blue), all trees in the forest have burnt

Definition 1 lifetime

Definition 2 lifetime

This percolation cluster has a length of four units

This percolation cluster has a length of five units

Page 5: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 5

Past examples show several lattice configurations (figures 2.02 – 2.07). One systematic approach to percolation is to test all permutations, eliminating the need for random forests or statistical techniques. Unfortunately, this is impractical; the example in figure 2.0.2 has over 109 unique combinations—with slightly bigger arrays resulting in much larger numbers16. A Monte Carlo (heuristic random forest sampling) approach is therefore the only viable statistical tool. The volume of computation (ξ) required depends on three main factors:

• The lattice array size (x) (ξ ∝ x2) • The proportion p value, range and sampling interval (ξ ∝ ƒ(p, ∆p, δp)) • The number of random forest repetitions (n) (identical conditions, random

permutation—as part of the Monte Carlo approach) (ξ ∝ n) Increasing any of one of these (especially x) will require significantly more processing time. The scaling of simulations is therefore limited to achieving an acceptable statistical uncertainty17 within a tolerable time18. 3.0 Implementation: Overview Three main FORTRAN simulations were built in stages (figure 3.0.1) with various test programs, using the NAGWare f95 compiler19 and numerical libraries.

20 Program descriptions:

16 The number of permutations easily exceeds 10300 17 The uncertainty in the mean lifetime values needs to be sufficiently small, in order to identify distinct overall trends and the maximum lifetime (percolation threshold) using an NLLS function fit 18 Simulations running for several days are, for example, viable. This investigation relies on standard ‘desktop’ processing power (of the order of 103 bogus millions of instructions per second). The use of a super-computer would reduce simulation run-time considerably 19 NAGWare © The Numerical Algorithms Group Ltd 2002 - http://www.nag.co.uk/ 20 Wildfire and Grassfire were built using the previous as a foundation. Each represents a major revision

FIRE Stage 1a

WILDFIRE Stage 1b

GRASSFIRE Stage 1c

SILENTFIRE Stage 1c(a)

FORESTFIRE Stage 1d

TREEFIRE Stage 1e

Figure 3.0.1 — An overview of the programs developed in chronological order (referred to by arbitrary code names)

Three minor variants of Grassfire

Fire - [A single random forest; one complete percolation simulation]

A random forest is generated for a given lattice size and p value. All first row trees are then lit, allowing the fire to percolate through the lattice until the lifetime criteria (second definition) are met (as outlined in section 2.0, p3). At all stages, the state of the forest can be observed on-screen Wildfire - [A single random forest; one complete percolation simulation—repeated n times]

A complete percolation (as in Fire) is repeated n times [Monte Carlo approach] for the same lattice size and p value. An output file is created containing: the lifetime of each forest tested τ, the mean lifetime τ , the standard deviation σ and the standard deviation of the mean σm Grassfire - [A complete random forest percolation is repeated n times across a range of p values]

This is identical to Wildfire, but in addition works across a given range and sampling interval of p values. The output file contains: the p value, mean lifetimes τ , standard deviations σ, standard deviation of the mean σm and minimum/maximum lifetime values

Page 6: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 6

21

Due to the nature of the programs, complete source code listings can be found in Section 9.0 (Appendix) and should be referred to at the readers discretion. The following is an overview of the main computational elements of particular interest: 3.1 Implementation: ‘Random forest’ generation

22

The forests (for all the programs outlined in figure 3.0.1) are generated by randomly placing trees in an empty lattice. No one site can hold more than a single tree. Figure 3.1.1 (above) summarises the process. This is the preferred approach to forest production, as it gives total control over the proportion p value (number of trees planted). However, there is a limit on the smallest p interval that can be tested (depending on the array size)—as the lattice is composed of discrete unit cells with an integer number of sites. A trivial 2x2 forest can therefore only contain zero, one, two, three or four trees. This corresponds to p = 0, 0.25, 0.50, 0.75 and 1.0 respectively23.

Of utmost importance is the quality of the ‘random forests’, which must be unbiased and of equal permutation probability. A non-repeating pseudo-random number generator (NAG Library: G05CAF and G05CCF) was therefore used as a source of (ℜ) random numbers: 0 < r < 1, based on a multiplicative congruential algorithm24 with non-repeating initial seed. This was converted into an integer position (row or column value) by multiplying the size of the lattice with the random number r, rounding-up the resultant real to the nearest integer and adding one25. 21 Silentfire is ideal to use with the nohup UNIX command (to run a background program immune to hang-ups) (i.e. nohup ./silentfire &) 22 As the lattice is filled up, it takes increasingly long to find a vacant space by random selection. One alternative is to use a full forest and empty out the required number of trees randomly, for p values between 0.5 and 1.0. 23 For larger arrays this is not a major problem, as the valid p intervals become sufficiently small (e.g. a 1002 lattice can sample in 0.0001 p intervals) 24 r = (bi+1/259) = (1313× bi mod 259)/(259) – This provides a period of approximately 1017 – see G05CAF (NAG Fortran Library Documentation) for details 25 One is added to shift the grid reference up from 0, 1, 2… to 1, 2, 3… .All sites in the lattice therefore have an equal probability of being selected at random

Silentfire – No screen output is produced and no user interaction is required. Data is written to file. It is designed for running long background simulations. The variables are hard-coded when compiled Forestfire – Identical to Grassfire except this uses the first lifetime definition (section 2.0, p3) Treefire – This program tracks the mean percentage of trees burnt at the end of the simulation

Descriptions of Grassfire variants:

Figure 3.1.1 — The production of a ‘random forest’ (density p value = 0.4, 5x5 size lattice, 10 trees)

An empty two-dimensional (allocatable integer) array is declared representing a given lattice size (e.g. 5x5)

Random (integer) x and y co-ordinates are then chosen (in this case giving pairs of values between 1-5, e.g. [3, 2])

If the randomly chosen site is vacant, a tree is planted. Otherwise, step is repeated until an empty site is found (as can be seen in this example for tree and )

Step is then repeated, counting the trees successfully planted, until the required number is present (in this example, p=0.4 requires 10 trees to be planted)

1 2 3 4 5

1

2

3

4

5

y

x

Last randomly planted tree (1,1)

First randomly planted tree (3, 5)

Full

Full

Full

Repeating step

Repeating step

Page 7: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 7

3.2 Implementation: Fire percolation

The fire percolates through the forest by repeatedly using the same iterative procedure (subroutine forest_iteration26) until the lifetime criteria are met. This is outlined in figure 3.2.1 and 3.2.2 (below).

27

26 This subroutine has been executed approximately 1010 times (see Appendix for source code) 27 If a burnt tree is present in the cell under analysis, some optional error checking can be performed. There cannot be a first nearest neighbouring tree which is not already burning or burnt (this can never happen)

0 1 2 3 4 5 6

0

1

2

3

4

5

6

x

y

Forest Border (Top – Row 0)

Forest Border (Bottom – Row 6)

Fore

st B

orde

r (R

ight

Sid

e –

Col

umn

6)

Figure 3.2.1 — The iterative percolation of a forest fire (featuring the analysis of two example cells) [Left] An instantaneous snapshot of a 5x5 size lattice (density p value = 0.6, 15 trees) after a single complete iteration The subroutine works through the entire array, row by row, from top left to bottom right (in this example, from unit [1,1] to [5,5]). Each cell and its nearest neighbours are analysed—changing the state of any tree present, as appropriate

Array column no.

Arra

y ro

w n

o.

3 4 5

1

2

3

Units that have already been processed by the subroutine (purple) (the next time step)

Units that are yet to be processed by the subroutine (blue) (this time step)

Unit currently being processed by the subroutine (containing an unburnt tree)

1 2 3

3

4

5

Units that have already been processed by the subroutine (purple) (the next time step)

W

N

E

S

S

E

N

W

This tree remains unburnt for this time step, as neither the N nor W neighbour contains a burnt tree. The S and E sites are empty.

This tree is set alight from both sides, as the E neighbour is alight and the W neighbour is burnt. The N and S sites are empty.

Figure 3.2.2 [Below] — A summary of the analysis performed by the percolation subroutine:

Do nothing (regardless of nearest neighbours) – as no tree is present (an empty site cannot burn)

In one interval, a burning tree is reduced to a burnt tree, regardless of neighbouring sites

Do nothing (regardless of neighbouring sites) – as this tree has already been burnt

This tree is set alight if its N / W neighbour is a burnt tree or if its E / S neighbour is a burning tree. Otherwise, the tree is unharmed What does this

cell contain?

Nothing – an empty site

An unburnt Tree

A burning Tree

A burnt Tree

The first cell to be processed

The lastcell to be

processed

Fore

st B

orde

r (Le

ft Si

de –

Col

umn

0)

Page 8: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 8

The percolation subroutine iterates systematically through all lattice sites, without the need for additional arrays. Crucially, cells prior to the one under analysis have already been processed, whilst others (further on) are yet to be. When considering the surrounding Von Neumann neighbours, the subroutine therefore takes into account that adjacent sites to the North and West have already been altered (e.g. a burning tree was changed to a burnt tree). Consequently, an unburnt tree can only be set alight by a burning tree to the South or East; or by the presence of a burnt (and not a burning) tree to the North or West (see figure 3.2.3).

The forest and its contents are treated by the FORTRAN simulation as a two-

dimensional array of integers28, as shown in figure 3.2.4 (below). A border is modelled by surrounding the lattice with border unit cells. This allows the percolation subroutine to read off the edge of the forest and to treat it as an inert boundary (e.g. cell [1,1] in figure 3.2.1/3.2.4 has two neighbouring border units [0,1] and [1,0]).

3.3 Implementation: Statistical calculations NAG library routine G01AAF was used to perform mean and standard deviation calculations, with no specific weighting. This provided the mean and the error in the mean for the percentage of trees burnt and fire lifetime values. All function to data point fitting was performed using a non-linear least-squares (NLLS) Marquardt-Levenberg algorithm29—in particular, allowing percolation thresholds pc to be located. 28 This allows the subroutine to process the lattice quickly—in order to perform the large volume of computation necessary. The use of maximum (-O4) optimisation switches when compiling the FORTRAN simulations also reduces execution time considerably 29 This was performed in GNU plot 3.7 ©1986 - 1993, 1998, 1999 Thomas Williams and Colin Kelley. http://www.gnuplot.vt.edu/

Column: 0 1 2 3 4 5 6 Row: 0 9 9 9 9 9 9 9 Row: 1 9 0 3 3 0 3 9 Row: 2 9 1 0 2 1 2 9 Row: 3 9 0 1 1 0 1 9 Row: 4 9 1 1 0 1 1 9 Row: 5 9 0 0 0 1 0 9 Row: 6 9 9 9 9 9 9 9

Figure 3.2.4 — A raw instantaneous snapshot of a 5x5 lattice (identical to figure 3.2.1) Key:

An empty site is 0 A tree is 1 A burning tree is 2 A burnt tree is 3 The firewall border is 9

Figure 3.2.3 — Three snapshots of a lattice segment before, during and after iteration

W

E

W

N

E

S

a) Before b) During c) After

The purple cells are yet to beprocessed by the subroutine.The curved arrows indicatehow the fire will percolate

The blue cells have been processed by the subroutine. The fire has percolated in accordance with the model

The central cell (white) is under analysis.It is set alight by the fire to the southand the burnt tree to the west (but not by the presence of a fire to the north)

Page 9: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 9

4.0 Results: Testing Approximately fifty days of processing was used to run percolations. Prior to this, every step was therefore taken to avoid any mistakes, which would likely invalidate all subsequent data. Various key aspects were extensively tested in order to guarantee data credibility. The most important tests are briefly outlined in the remainder of this section. ‘Random forest’ generation tests

30 Figure 4.0.1 (top) compares well with figure 4.0.2 (a) of a good random-number generator31. Fire percolation tests Numerous lattices (of various sizes and proportion p values) were visually inspected at every stage of several complete forest burns32—to ensure that the basic forest generation and fire percolation routines (common to all the simulations) function as required. Figure 4.0.3 (overleaf) illustrates the output from one such complete burn.

30 Adapted from p. 37 section 2.2.5.6 Tests for quality, A guide to Monte Carlo simulations in statistical physics – David P Landau & Kurt Binder – CUP 2000 31 A complete investigation into the quality of the pseudo-random number generator is beyond the scope of this investigation. However, from a basic statistical analysis and by visual inspection, this generator appears to be satisfactory for the purpose of these simulations 32 Although some error checking is built into the code, basic sample verification by hand (independent of the program) is a necessary precaution

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

y

x

Figure 4.0.1 [Left] — A plot of 10000 random number pairs (x, y) produced using the (0 < r < 1) NAG pseudo-random number generator (section 3.1) This plot exhibits a high degree of randomness with no visual indication of clustering or other regular patterns [ x = 0.504113397 (9.d.p), y = 0.500079736

(9.d.p), σx = 0.290672174, σy = 0.286183417] Figure 4.0.2 [Below] — Two plots of 10000 random number pairs (x,y): a) Produced by a ‘good’ random generator b) A ‘bad’ generator (exhibiting a distinct

regular stripped pattern)

x x

y y

a) b)

Good Bad

Page 10: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 10

Figure 4.0.3 (above) represents only one of many manually monitored percolations. All were found to behave as programmed, without exception. Figure 4.0.4 (below) show the result of a preliminary test plot of mean lifetime against proportion p—composed manually using the program wildfire. Statistical calculation tests The NAG routine used to calculate the mean and standard deviation was independently tested using small data samples33. The resultant values were compared to those produced by a spreadsheet application and by hand. In all cases, the answers matched flawlessly. Nevertheless, error checking is present in all programs to detect obvious mistakes, such as negative (mean or standard deviation) output values34. 33 The NAG statistical routine is called upon to determine the mean and standard deviation of up to 105 data points 34 Not once in fifty days of processing has an error with this NAG subroutine occurred

Column: 0 1 2 3 4 5 6 Row: 0 ° ° ° ° ° ° ° Row: 1 ° . ¶ . . ¶ ° Row: 2 ° ¶ ¶ ¶ ¶ ¶ ° Row: 3 ° ¶ ¶ ¶ ¶ ¶ ° Row: 4 ° . ¶ ¶ . ¶ ° Row: 5 ° . ¶ . ¶ . ° Row: 6 ° ° ° ° ° ° ° Generating the forest…done (p=0.68)

Column: 0 1 2 3 4 5 6 Row: 0 ° ° ° ° ° ° ° Row: 1 ° . b . . b ° Row: 2 ° ¶ ¶ ¶ ¶ ¶ ° Row: 3 ° ¶ ¶ ¶ ¶ ¶ ° Row: 4 ° . ¶ ¶ . ¶ ° Row: 5 ° . ¶ . ¶ . ° Row: 6 ° ° ° ° ° ° ° Setting alight all first row (row 1) trees

Column: 0 1 2 3 4 5 6 Row: 0 ° ° ° ° ° ° ° Row: 1 ° . / . . / ° Row: 2 ° ¶ b ¶ ¶ b ° Row: 3 ° ¶ ¶ ¶ ¶ ¶ ° Row: 4 ° . ¶ ¶ . ¶ ° Row: 5 ° . ¶ . ¶ . ° Row: 6 ° ° ° ° ° ° ° Iteration: 1

Column: 0 1 2 3 4 5 6 Row: 0 ° ° ° ° ° ° ° Row: 1 ° . / . . / ° Row: 2 ° b / b b / ° Row: 3 ° ¶ b ¶ ¶ b ° Row: 4 ° . ¶ ¶ . ¶ ° Row: 5 ° . ¶ . ¶ . ° Row: 6 ° ° ° ° ° ° ° Iteration: 2

Column: 0 1 2 3 4 5 6 Row: 0 ° ° ° ° ° ° ° Row: 1 ° . / . . / ° Row: 2 ° / / / / / ° Row: 3 ° b / b b / ° Row: 4 ° . b ¶ . b ° Row: 5 ° . ¶ . ¶ . ° Row: 6 ° ° ° ° ° ° ° Iteration: 3

Column: 0 1 2 3 4 5 6 Row: 0 ° ° ° ° ° ° ° Row: 1 ° . / . . / ° Row: 2 ° / / / / / ° Row: 3 ° / / / / / ° Row: 4 ° . / b . / ° Row: 5 ° . b . ¶ . ° Row: 6 ° ° ° ° ° ° ° Iteration: 4 The fire has REACHED THE LAST ROW of the forest in 4 iteration(s)

Figure 4.0.3 — Screenshots of the six states of an example 5x5 lattice (p=0.68, lifetime τ = 4) produced by the program: fire

Figure 4.0.4 — A manual test plot of mean lifetime against proportion p in a 50 x 50 size lattice (1000 repetitions) Each of the 101 data points (at p = 0.01 intervals) was produced from 1000 automatically repeated forest burns. Overall, a clear trend can be observed with a distinct percolation threshold (pc) corresponding to the maximum lifetime (τmax) The shape of the plot is in line with expectations—hinting that all parts of the simulation operate as required

0

10

20

30

40

50

60

70

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Proportion p value

Mea

n lif

etim

e (c

ycle

s) w

ith m

ean

erro

r

As expected, a completely filled lattice (100% trees) burns directly from one end to the other—for a 50-size forest: taking 49 cycles

An entirely empty lattice (0%trees) cannot support a fire atall—for any size forest thisequates to a zero lifetime

The percolation threshold(pc) corresponding to themaximum fire lifetime τmax

Page 11: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 11

4.1 Results: Fire lifetime ττττ (stage 1) Figure 4.1.1 (below) illustrates the relationship between the mean lifetime and the proportion p value for a 50 x 50 size lattice, produced using grassfire. Figures 4.1.2 – 4.1.4 (below and overleaf) are detailed segments of this plot35.

35 Note that the uncertainty in the x coordinate (proportion p) is zero in both these and all other plots in this investigation. Figures 4.1.1 – 4.1.4 are composed entirely of mean data points and error bars (no lines have been used to join points)

0

10

20

30

40

50

60

70

80

90

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

mea

n lif

etim

e (c

ycle

s) w

ith m

ean

erro

r

proportion p value

0

2

4

6

8

10

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

mea

n lif

etim

e (c

ycle

s) w

ith m

ean

erro

r

proportion p value

Figure 4.1.1 — A plot of mean lifetime across the complete proportion p range (sampling interval = 0.0004, 2501 data points) for a 50 x 50 lattice, based on:

10 repetitions (green) (1 minute) 102 repetitions (red) (15 minutes) 104 repetitions (blue) (23 hours)

Detailed segments:

Figure 4.1.2 (below) Figure 4.1.3 (overleaf) Figure 4.1.4 (overleaf)

Figure 4.1.2 — The gradual random population of an empty 50 x 50 lattice from 0% to 40% For p = 0 (an empty forest) the mean lifetime is precisely zero (with no uncertainty) as there are absolutely no trees that can burn At p = 0.4 (40% trees) the mean lifetime approaches 10 cycles (≈20% of the lifetime of a p=1 forest)

The uncertainty in the mean lifetime (especially visible with the green error bars for 10 repetitions) increases with the proportion p value

0% filled (an empty lattice)

Page 12: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 12

Figures 4.1.1 to 4.1.4 are representative of the general relationship found between the number of trees present and the mean lifetime, for the range of lattices tested in this investigation (4-600 cells2). However, there are minor differences compared to the aforementioned plots36. These are highlighted in figures 4.1.5 to 4.1.7 (see section 4.2 for percolation threshold and variation results). 36 Figures with similar detail to 4.1.1 - 4.1.4 for different lattice sizes have not been reproduced here as they do not provide any additional information

50

52

54

56

58

60

0.7 0.75 0.8 0.85 0.9 0.95 1

mea

n lif

etim

e (c

ycle

s) w

ith m

ean

erro

r

proportion p value

10

20

30

40

50

60

70

80

90

0.5 0.52 0.54 0.56 0.58 0.6 0.62 0.64 0.66 0.68 0.7

mea

n lif

etim

e (c

ycle

s) w

ith m

ean

erro

r

proportion p value

Figure 4.1.3 — Illustrating the gradual decrease in the mean lifetime as the lattice is filled up from 70% to 100% trees In the region p = 0.95 to 1.00, the mean lifetime remains constant at 49 cycles—corresponding to the number of cycles needed for the fire to percolate directly from one end to end (see figure 2.0.6) The lifetime uncertainty in this region is zero (regardless of the number of repetitions)

The uncertainty in the mean lifetime (especially shown by the green error bars for 10 repetitions) decreases with the increasing p value

The uncertainty in the mean lifetime peaks around the percolation threshold region

The mean lifetime decreases slowly beyond the percolation threshold region

95 – 100% filled, τ = 49 ± 0

Figure 4.1.4 — The percolation threshold (maximum lifetime) region By inspection, the threshold p value lies between 0.60 and 0.62 (pc ≈ 0.61 ± 0.01). It is, however, much harder to identify this with fewer repetitions (e.g. the green data points compared with the blue data points) The maximum lifetime (τmax) is approximately 70 cycles (≈140% of the lifetime of the filled p=1 forest)

p = 1 lifetime (49 cycles)

49

Page 13: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 13

37

The alternative lifetime definition [no. (1) – section 2.0, p. 3] was also tested.

Figure 4.1.7 compares this to the output produced by the standard lifetime definition.

37 The percolation threshold and maximum lifetime values quoted in this figure are based on the proportion p data point corresponding to the greatest lifetime value—and not from curve fitting in the threshold region

0

1

2

3

4

0 0.2 0.4 0.6 0.8 1

mea

n lif

etim

e (c

ycle

s) w

ith m

ean

erro

r

proportion p value

5 x 5 size forest

4 x 4 size forest

Figure 4.1.5 — A plot of the mean lifetime across the complete proportion p range for a 4 x 4 and 5 x 5 lattices (based on 105 repetitions [<1 minute]—mean lifetime error bars are therefore negligible) Although both plots show the expected relationship, the percolation threshold here is much less pronounced (compare figures 4.1.1 and 4.2.1). Such a trivial forest size also represents a poor model for a large forest

For both plots, the smallest p sampling interval possible was used (0.0625 for 4x4 and 0.04 for 5x5) (data points have been joined with straight lines)

5

10

15

20

25

30

35

40

45

50

55

0.4 0.45 0.5 0.55 0.6 0.65 0.7

mea

n lif

etim

e (c

ycle

s) w

ith m

ean

erro

r

proportion p value

10 x 10 size forest

20 x 20 size forest

30 x 30 size forest

40 x 40 size forestFor all plots, the smallest p sampling interval possible was used (some data points have been joined with straight lines for clarity)

Figure 4.1.6 — A plot of the mean lifetime against proportion p for 10 to 40 size lattices (based on 105 repetitions [<10 hours each] (except 40: 104 repetitions)) By inspection (without determining the precise pc value for each forest), the percolation thresholds (at least for intermediate forest sizes) appear to vary with the forest size (see section 4.2 / figure 4.2.2).

pc = 0.6875 τmax = 3.11875000 ± 0.00215038 cycles

pc = 0.68 τmax = 4.26172000 ± 0.00301614 cycles

0

10

20

30

40

50

60

70

80

90

100

0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1

mea

n lif

etim

e (c

ycle

s) w

ith m

ean

erro

r

Figure 4.1.7 — A plot of mean lifetime against p for 40 & 50 size lattices (based on 104 repetitions [<39 hours each]), for both lifetime definitions The alternative lifetime definition produces similarly shaped curves, which coincide with the original lifetime definition for low and high proportion p values However, the percolation threshold (pc) points do not coincide for the same lattice sizes (pc alternative > pc original and τmax

alternative > τmax original)

50 x 50 size lattice (red) (alternative definition)

40 x 40 size lattice (blue) (alternative definition)

40 x 40 size lattice (orange)

50 x 50 size lattice (green)

For low p values, all the curves overlap, reaching zero at p = 0

For both definitions, the mean lifetime coincides at p = 1

Percolation threshold region

Page 14: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 14

0.59 0.595 0.6 0.605 0.61

mea

n lif

etim

e (c

ycle

s) w

ith m

ean

erro

r

proportion p value

0.59 0.595 0.6 0.605 0.61

mea

n lif

etim

e (c

ycle

s) w

ith m

ean

erro

r

proportion p value

0.59 0.595 0.6 0.605 0.61

mea

n lif

etim

e (c

ycle

s) w

ith m

ean

erro

r

proportion p value

0.59 0.595 0.6 0.605 0.61

mea

n lif

etim

e (c

ycle

s) w

ith m

ean

erro

r

proportion p value

0.59 0.595 0.6 0.605 0.61

mea

n lif

etim

e (c

ycle

s) w

ith m

ean

erro

r

proportion p value

100 x 100 size forest

200 x 200 size forest

300 x 300 size forest

4.2 Results: Percolation threshold pc (stage 2) Figure 4.2.1 illustrates the lifetime relationship around pc for large arrays ( 1002). Previous plots (such as figure 4.1.6) suggest that pc varies with lattice size. However, this is not immediately obvious in figure 4.2.1 (below). Nevertheless, a clear variation in pc (figure 4.2.2) is found by re-plotting the above. 38

38 As each forest size has been plotted with a different y scale and y range in order to highlight the percolation threshold points, no y-axis comparisons can be made on this graph (especially with regards to the error bars)

0

50

100

150

200

250

300

350

400

450

500

550

600

650

700

0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65

mea

n lif

etim

e (c

ycle

s) w

ith m

ean

erro

r

proportion p value

100 x 100 size forest

200 x 200 size forest

300 x 300 size forest

Figure 4.2.1 — A plot of the mean lifetime against proportion p (sampling interval p = 10-4) for lattice sizes of the order of 102 (1501 data points)

Red, green and blue data points: 10 repetitions (<21 hours each) Pink, orange and magenta data points: 103 repetitions (<10 days each)

τmax ≈ 540 cycles (≈181% of its p=1 lifetime)

τmax ≈ 340 cycles (≈171% of its p=1 lifetime)

τmax ≈ 155 cycles (≈157% of its p=1 lifetime)

105 repetitions

103 repetitions

103 repetitions

pc = 0.6054 ± 0.0010

pc = 0.5984 ± 0.0010

Figure 4.2.2 — An overlay plot of the percolation threshold regions (with an arbitrary y scale and range for each)

An example NLLS fitted quadratic function ƒ(x) (magenta) to the 100x100 data points.

( ) abpandcbxaxxf c 2/2 −=++=

pc = 0.6002 ± 0.0010

Page 15: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 15

The threshold values for all lattices were identified using a NLLS quadratic fit (section 3.3) over the appropriate data points39. An example of this technique is shown in figure 4.2.2 for a 100-size lattice. Each pc value is based on the quadratic maxima—with a suitable error estimated from the quality of the fit. Figure 4.2.3 (below) summarises the sampled variation in percolation threshold. 40

One potential alternative for locating pc (compared to figure 4.2.2) is to consider the variation in the total number of burnt trees with p (see figure 4.2.4).

39 Simulations to determine the variation in mean lifetime with p (in order to find the percolation threshold), were only run over the percolation threshold region (e.g. 0.59 to 0.61) to reduce processing time (as in figure 4.2.2) 40 The coefficients of the NLLS fitted function (a, b, c, n) are not uncorrelated

0.59

0.6

0.61

0.62

0.63

0.64

0.65

0.66

0.67

0 50 100 150 200 250 300 350 400 450 500 550 600

perc

olat

ion

thre

shol

d va

lue

(pc)

forest size

original lifetime definition (#2)

alternative lifetime definition (#1)

(4-600 size forests sampled)

(4-160 size forests sampled)

Figure 4.2.3 — A plot of the variation in percolation threshold value (pc) with lattice size for both the original (red) and alternative (blue) lifetime definitions For both sets of points a function of the form: cbxaxf n +−= )exp()(

has been fitted, where as x → ∞, ƒ(x) → c

lattice size (x)

Although the errors in mean lifetime for small lattices are negligible (due to the ease with which a large number of repetitions can be performed), the minimum p sampling interval is fundamentally wider. Consequently, it is harder to interpolate a pc value with confidence

a = 2.769 ± 3.052 (110% error) b = 2.725 ± 1.045 (38% error) c = 0.593916 ±±±± 0.001158 (0.2% error) n = 0.15053 ± 0.04339 (29% error)

a = 337 ± 1486 (441% error) b = 6.632 ± 4.355 (66% error) c = 0.596462 ±±±± 0.003326 (0.6% error) n = 0.08660 ± 0.04924 (57% error)

0

10

20

30

40

50

60

70

80

90

100

0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8

% o

f tr

ees

burn

t at

the

end

of

the

perc

olat

ion

Figure 4.2.4 — A preliminary plot of the variation in the total number of burnt trees (at the end of the simulation) with proportion p value, over p = 0.4 – 0.8 (produced using: treefire) For each lattice size, mean data points and y-axis error bars are shown in a different colour for clarity

100 x 100 size forest (102 reps., 7 hours)

500 x 500 size forest (10 reps., 58 hours)

50 x 50 size forest (103 reps., 3 hours)

All three sets of lines cross in the p ≈ 0.594 – 0.598 region with ≈50% of trees burnt

As p → 1, the % of burnt trees → 100% As p → 0, the % of burnt trees → 0%

In theory, for an infinite forest, the % of burnt trees would increase sharply at pc ∞

Page 16: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 16

5.0 Discussion Preface A complete interpretation of the results gathered in this study, using proper percolation theory, is beyond the scope of this investigation41. What follows is therefore limited to discussing relevant computational modelling and implementation aspects. Overview The results and conclusions drawn from any computer simulation, are only as good as the model upon which they are based. It is therefore essential to scrutinise the model itself to avoid being misled. Of course, no simulation is a perfect substitute for reality; comparison with controlled laboratory percolations or observations from genuine (often uncontrolled!) forest fires are recommended. The basic two-dimensional square lattice used to simulate a forest (figure 2.0.2, page 2), appears to provide a simple (non-trivial) starting point. Naturally, there are many questions concerning the use of this model and the percolation methodology chosen (as outlined in section 3.2). Invariable, the question of whether a simpler forest model could have been used arises. A two-dimensional cartesian lattice, however, seems to be the most basic model possible. In addition, this structure is easily interpreted using site percolation theory. The simulations used in this investigation therefore lend weight to better understanding percolation, rather than modelling realistic forest fires. Nonetheless, we shall continue to discuss the implications of our results with a bent towards real forest fire propagation. 5.1 Discussion: Fire lifetime ττττ (stage 1)

Figure 4.1.1 (page 11) illustrates the general trend that was observed between the mean fire lifetime (τ ) and the proportion p of trees, regardless of lattice size42. In all cases, the lifetime plots are characterised by three distinct regions: a gradual increase in lifetime from zero (corresponding to an empty [p=0] forest) to a maximum lifetime τmax (the percolation threshold pc), a threshold region (around pc/τmax) and finally a decrease in τ from τmax to a constant value (proportionate to the [p=1] forest size)43. With the model used, we can take the proportion p value to be synonymous with forest density. Varying p (from zero to one) corresponds to a change in density: from an empty, to a sparse, to a dense, and eventually a full forest. A key feature of figure 4.1.1 (and other plots) is the distinct percolation threshold, yielding the greatest burn time. At a glance, we notice that a 60% (approximately) filled forest takes the longest time to extinguish of its own accord. Perhaps counter intuitively, we therefore find that a completely filled forest burns out quicker. Whether or not these simple properties can be directly applied to a real forest is disputable, though it would be naïve to assume that these trends are a precise reflection of reality. Although coping with all plausible variables is impractical, there

41 For a complete introduction to percolation theory, see: Introduction to Percolation Theory – Dietrich Stauffer, A. Aharony – Taylor & Francis (July 1994) 42 For all non-trivial size lattices—e.g. a 2x2 forest only has five p data points, which is not have enough to determine any distinct relationship 43 These three regions are featured in figures 4.1.2 (page 11), figure 4.1.4 (page 12) and figure 4.1.3 (page 12) respectively

Page 17: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 17

are several attributes of these simulations, which are especially unrealistic (see section 5.3). Assuming this relationship does hold in reality, the implications for real forest management are unclear44.

An important consideration in this investigation is whether the lattice model yields anything other than artificial (theoretical) results. Figure 4.1.5 (page 13) for two smaller sample forests of four and five units squared, shows the same basic relationship between lifetime and p, as found in figure 4.1.1 for a fifty-unit forest (and in figure 4.2.1 for much larger forests). Although the maximum lifetime region is less prominent with smaller forests, the same overall trend is clear. One interpretation is that: this is an elemental property of percolation in a square lattice. Without much thought, we can presume that a small grid is a very poor model of a real forest—as it contains few sites and its unitised divisions are prominent. Yet, conversely, can we argue in favour of a large grid ( 1002) providing a much better forest model? Certainly, larger arrays handle a greater number of random trees, which is inline with the concept of a real forest. If larger arrays are better, could we not expect the lifetime trend to breakdown in some fundamental way for smaller forest sizes? (This would be a distinct sign of the good-bad divide). One obvious problem encountered with small lattice sizes ( 42) is the underlying limit on the smallest p-sampling interval that can be tested (the data points in figure 4.1.5 were sampled as finely as possible). This certainly caused problems in terms of identifying the percolation threshold value (pc), where there were insufficient data points in the threshold region, and the overall trend. However, this does not seem to be a fundamental breakdown in the model45. The results of tests on the simulations, outlined in section 4.1, establishes that all aspects of the programs operate as they were designed to. We can therefore taken confidence from the fact that the simulations were run in a controlled manner—though it is this manner, which comes into question. In terms of forest fire propagation, the lattice structure may pose a major problem representing reality, which can only be overcome with an improved model. Analysing site percolation in a 2D lattice, however, is easily achieved using the results produced in this study. The statistical uncertainty in the mean lifetime46 (shown in figures 4.1.1 to 4.2.2 by the presence of y error bars) is a result of the Monte Carlo methodology used. Its use in tackling percolation clusters appears to have been the most effective and potentially the only viable approach. By comparison, the uncertainty in the (x-axis) proportion p value is zero for all data points—as each forest was generated from a precise number of trees. All points were produced using a constant number of random forest repetitions. It is therefore unsurprising to see that the lifetime uncertainty peaks around the percolation threshold region. This is where the number of cluster permutations is at its greatest, compared to higher or lower proportion p values (see figure 4.1.1)47.

44 For instance, we could interpret this as a suggestion to limit forest density to 60%, which would provide the greatest time for tacking a real forest fire (and hopefully limit its spread) 45 Although smaller forest plots are consequently made up of few data points, examples such as figure 4.1.5 clearly indicate the expected trend—showing that nothing unusual is taking place 46 And in the percentage of burnt trees, as in figure 4.2.2 47 For a lattice of size x with r trees, the number of permutations is given by x2! / ((x2-r)!r!)

Page 18: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 18

Nevertheless, the Monte Carlo simulations have allowed relationships to be clearly identified with relatively few repetitions. Figure 4.1.3, for instance, shows a distinct mean lifetime decline using only 102 random repetitions, which is a virtually negligible percentage of the total number of possible cluster permutations. A great strength of this approach is the ability to use as large a number of repetitions as possible, where the required computation time remained tolerable (e.g. of the order of tens of hours). Figure 4.1.5 (for a four and five size lattices) was therefore produced using 105 repetitions, which corresponds to one order of magnitude below the total number of possible permutations for a lattice of this size. Consequently, the uncertainty in the mean lifetime is negligible (on the scale of this plot). Unfortunately, this approach is impractical for larger lattices where the volume of computation required increases exponentially—resulting in the data produced having a greater uncertainty48. Although no uncertainty is desirable, the resultant plots (such as figure 4.2.1) which have lifetime errors typically less than 10%, still provide enough detail to easily identify the percolation threshold value (even if the corresponding maximum lifetime is unclear). Of greater concern is the danger of systematic errors, which stem from the model and percolation technique used (see section 5.3)49. The forest lifetime definition is a source of great contention. Two possible versions were proposed in section 2.0 (page 3)—both were tested, as shown in figure 4.1.7 (page 13). The plots yield similar curve shapes regardless of the definition, perhaps indicating that the choice between the two is somewhat trivial. A discussion of the whether or not the second definition is better suited for percolation studies (and infinite percolation clusters) is futile without the relevant percolation theory. Nevertheless, some characteristics of this plot are easily explained. Both definitions provide overlapping curves for p values less than ≈50%. This is where the fire extinguishes long before it reaches the opposite side of the lattice. Both also converge when the forest is completely filled, as this is a direct burn from top to bottom. Furthermore, the alternative (first) definition gives a greater maximum lifetime value at the percolation threshold—as more trees can be burnt once the fire reaches the bottom row for the first time (as explained earlier in figure 2.0.5). However, the reason why the alternative lifetime definition results in a greater percolation threshold value is not clear. Any attempt to determine a pc value for a particular lattice size, thus depends on the definition chosen50. 5.2 Discussion: Percolation threshold pc (stage 2) In figure 4.2.1 (page 14), τmax corresponding to the percolation threshold pc is increasingly prominent—with larger arrays resulting in much greater maximum percentage lifetime values. Yet, the plot shape we might expect to see as the lattice size tends to infinity is not immediately obvious. Clearly, the threshold region is

48 Furthermore, the error in the mean is proportional to the square root of the error. As a result, reducing these error bars by a factor of 10 requires a factor of 100 more random forest repetitions 49 Through this discussion, we hope to highlight the apparent pitfalls of the model and simulation approach used, in order to be able to identify any fundamental problems 50 Though as we see in figure 4.2.3, the variation in the percolation threshold value is the same regardless of the definition

Page 19: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 19

becoming narrower and taller. Is this ultimately leading towards a δ-function at pc ∞ as lattice size → ∞? Even with the inevitable uncertainty in locating percolation threshold values through curve fitting (due to the lifetime errors and a lack of p data points), figures 4.2.3 and 4.2.2 show an unmistakable decrease in pc as larger arrays were tested. It is interesting to note that an approximate function of the form ƒ(x) = aexp (-bxn) + c can be fitted to these points—although caution is urged, as it is only an apparently well-fitting function. For both sets of points in figure 4.2.3, the exponentional coefficients (a, b and n) of the function ƒ(x) were derived with large percentage errors (for example, coefficient a for the alternative lifetime curve has an uncertainty greater than 400%). Although this appears to be a problem, we are only interested in what this function can tell us, as the lattice size (x) tends to infinity—such that ƒ(x) → c as x → ∞. In both cases, constant c appears to have an uncertainty smaller than 1%: suggesting that for an infinitely large array, pc (original) = 0.593916 ± 0.2% and pc (alternative) = 0.596462 ± 0.6%. To what extent these values can be relied upon is ambiguous; we cannot assume these coefficients are uncorrelated, especially given the large percentage errors shown for a, b and n. We should therefore take the supposed accuracy of c with a pinch of salt. Furthermore, it has not been conclusively proven whether the percolation threshold tends to a fixed value at infinity, from the data in this investigation51.

Nevertheless, the fact that both sets of data points vary in the same way with lattice size, suggests that the choice between the two lifetime definitions was not as divisive as originally thought. Figure 4.2.4 (page 15) of the variation in the total percentage of burnt trees with p, is certainly a plot of greater relevance to forest management. Once again, we can see a threshold around the expected 60% region, where the extent to which the fire spreads diverges. Further simulations could make use of this approach to provide an alternative means of determining the percolation threshold value, which should correspond to the point with the steepest gradient. Although the results produced in this figure are limited, we see that all three curves (for the different lattice sizes) appear to cross in p = 0.594 – 0.598 region. This is potentially an indicator of the percolation threshold value (pc ∞) for an infinite lattice, which in theory would diverge as a step function in this plot. 5.3 Discussion: The model The forest model and percolation approach used in this investigation are limited in various ways. Although the aim was to produce a basic two-dimensional percolation simulation, several key factors limit this from being an adequate model of a real forest fire:

51 Indeed reference 1 (see section 7) indicates that the critical probability for site percolation is not known exactly

Page 20: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 20

First and second nearest neighbour (Moore) percolation is preferred over Von Neumann (first nearest neighbour) percolation—on the grounds that (even within a grid structure) a real fire can propagate in all directions The grid structure is potentially a poor model for a real forest. A minor improvement might be to use a close-packing 2D structure, composed of circular unit sites Setting alight an entire row (of typically hundreds) of trees is seldom a realistic start to natural wildfires. This could is better modelled by setting alight to a single tree, or a number of random trees in different places The fire was assumed to spread to other adjacent trees and extinguish in a single time step. The use of additional random number generators to determine whether or not neighbouring trees catch alight, and when a burning tree extinguishes, might provide a more realistic simulation

Within the framework that was implemented, the opportunity exists for optimising the programs themselves. Such improvements should allow the percolation simulations to run faster—enabling larger lattices to be tested with reduced uncertainty in the results. 6.0 Conclusions In the course of this investigation, basic forest fire percolation through a finite two-dimensional Cartesian lattice was successfully modelled by computer. The simulations implemented did not provide a sufficiently realistic model for forest fire propagation—however, they did produce unequivocal information supporting site percolation theory itself. The results of this study are therefore best interpreted purely in terms of site percolation (the concept of burning forests is a distraction). The variation of mean lifetime with the proportion p of trees fundamentally represents the variation in the mean continuous percolation cluster length with probability p. We have conclusively shown that the average percolation cluster length becomes infinite when the lattice is approximately 60% (pc ≈ 0.6) randomly filled—though the exact threshold value varies with lattice size [pc (100) ≈ 0.6054 ± 0.0010, pc (200) ≈ 0.6002 ± 0.0010, pc (300) ≈ 0.5984 ± 0.0010] Although the critical probability (pc) for site percolation is not known exactly, the value derived in this investigation of approximately 0.5940 ± 0.0012 appears to be in good agreement with the ≈0.593 lowest bound value suggested by independent Monte Carlo simulations52. As neither site percolation nor the behaviour of naturally occurring forest fires have been exhaustively tested—there is clearly much scope left for further research.

52 See reference 1 (section 7.0)

Page 21: Percolation on a 2D lattice - January 2002lucc.ess.inpe.br/lib/exe/fetch.php?media=percolation_experiments_o… · Percolation clusters represent groups of trees through which a fire

Percolation on a 2D lattice Kut J M 199030202 Q4

page 21

7.0 References

1. A New Lower Bound for the Critical Probability of Site Percolation on a Square Lattice (31st October 1995) – J. van den Berg, A. Ermakov – CWI, PO Box 94079, 10090 GB Amsterdam, The Netherlands

2. A guide to Monte Carlo simulations in statistical physics – David P Landau,

Kurt Binder – Cambridge University Press (August 2000) – ISBN: 0521653665

3. Introduction to Percolation Theory – Dietrich Stauffer, A. Aharony – Taylor &

Francis (July 1994) – ISBN: 0748402535

4. Chapter 5: Simulation II: Abstract Simulation – The Physics of Computational Physics (Michaelmas 2001) – Dr Peter D Haynes – Theory of Condensed Matter Group, Cavendish Laboratory, Cambridge, England

5. Physics Java Applets – Percolation: forest fire – Changyeon Won – University

of California (Berkeley) – http://ist-socrates.berkeley.edu/~cywon/Percolation2.html

6. NAG Fortran Library, Mark 19 ©1999 the Numerical Algorithms Group Ltd,

Oxford UK – http://www.nag.co.uk/ 8.0 Acknowledgements Special thanks go to Dr Michael J Rutter (Theory of Condensed Matter Group, Cavendish Laboratory, Cambridge, England) and the University of Cambridge Computing Service for their tireless effort in maintaining the C4 Linux linux1.phy.pwf.cam.ac.uk server. 9.0 Appendix The complete NAGWare FORTRAN 95 source code for the program grassfire can be found overleaf (pages i to vi). This application was used to produce most of the results in this investigation and contains all the previously discussed elements: random forest production, percolation iteration, statistical handling, error checking, etc. Due to limited space in this document, the remaining source code listings (for all six programs outlined in figure 3.0.1) can be found online at: http://www.srcf.ucam.org/~jk279/percolation/