Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please use python In this question we will develop a model for a bushfire. Let's approach this problem by considering a 2 D grid with

please use python
In this question we will develop a model for a bushfire. Let's approach this problem by considering a 2D grid with side length nsize. Each cell on the grid can be in one of three states: empty (value 0), bush (value 1) or burning (value 10). We will then use two rules to simulate the system:
1.A cell with a burning neighbour will become a burning cell with probability b.
2.A burning cell becomes an empty cell on the next time step.
(a) Provide the Python code which sets up a grid of 1010 cells (i.e.n size =10) composed of bush, except for one cell randomly chosen in the grid (equal probability of choosing any cell), which is set to be burning.
(b) We can use the function scipy.signal.correlate 2d() to check if any neighbours are burning. Set up a grid of 1010 cells (i.e. nsize =10) and as an initial condition start with all cells bush, except for one randomly chosen cell set to be burning. Calculate the correlation array between your grid and the kernel: kernel =
[11111001111]. Make sure your correlation array has the same size as your original grid, wrap the boundaries, and write out the Python code below that performs the correlation step.
Hint: To wrap the boundaries you can use the option boundary = 'wrap' in the
correlate 2d() function.
(c) Inspection of the correlation array shows that values that are greater than or equal to 1000 correspond to a burning cell, while values that are less than 1000 but greater than or equal to 110 correspond to a cell with bush and one or more burning neigh bours. Using this information provide the Python code which performs one time step of the bushfire, implementing the two rules presented in the introduction, with b=0.5, and using the scipy.signal.correlate 2d() function. Hint: This can be achieved without setting up a look-up table.
(d) Using nsize =100 and b=0.5, and all cells initially bush except for one randomly chosen cell, which is set to be burning, step forward 50 time steps and display the output. Sketch the main features of the output and interpret the output. Does the model appear to be a reasonable description of a bushfire?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

What are the challenges associated with tunneling in urban areas?

Answered: 1 week ago

Question

What are the main differences between rigid and flexible pavements?

Answered: 1 week ago

Question

What is the purpose of a retaining wall, and how is it designed?

Answered: 1 week ago

Question

How do you determine the load-bearing capacity of a soil?

Answered: 1 week ago

Question

what is Edward Lemieux effect / Anomeric effect ?

Answered: 1 week ago

Question

explain what is meant by the terms unitarism and pluralism

Answered: 1 week ago