CS 420/527 — Biologically Inspired Computation
NetLogo Simulation

BZ Reaction


This page was automatically generated by NetLogo 4.1. Questions, problems? Contact feedback@ccl.northwestern.edu.

The applet requires Java 5 or higher. Java must be enabled in your browser settings. Mac users must have Mac OS X 10.4 or higher. Windows and Linux users may obtain the latest Java from Sun's Java site. If the display appear cut off with Firefox, then try another browser (Safari works).



powered by NetLogo

view/download model file: B-Z Reaction.nlogo

WHAT IS IT?

The Belousov-Zhabotinsky reaction (or B-Z reaction for short) is an unusual chemical reaction. Instead of steadily moving towards a single equilibrium state, it oscillates back and forth between two such states. Before this "chemical oscillator" was discovered, it was thought that such a reaction could not exist.

If you do the reaction in a beaker, the whole beaker regularly changes color from yellow to clear and back again, over and over. In this case, we say that the reaction is oscillating in time. However, if you do the reaction in a thin layer of fluid trapped between two glass plates, then a beautiful pattern emerges of concentric or spiral waves of color change passing through the fluid. Here, the reaction is oscillating in both time and space.

This model is a cellular automaton (or CA) that produces spiral waves that resemble those produced by the B-Z reaction. Similar spiral waves have also been observed in biological systems, such as slime molds.

The B-Z reaction is a redox reaction that periodically moves between an oxidized and a reduced state, and has been demonstrated for various chemicals. This model does not attempt to replicate the actual mechanism of the chemical reaction, which is quite complex (including 18 reactions and 21 species, according to the Fields-Koros-Noyes model). The abstract features shared by the real reaction and this model include:

1. Two end states.
2. A positive feedback mechanism.
3. A negative feedback mechanism.

The positive feedback mechanism acts to push the system further in the direction that it is already going, reinforcing and amplifying the initial change. (In the chemical reaction, positive feedback comes from auto-catalysis.) The negative feedback mechanism pushes the system back in the opposite direction once a threshold is reached, suppressing or counteracting the effected change.


HOW IT WORKS

Each cell has a state which is an integer from 0 to max-state. We choose to show state 0 as black, max-state as white, and intermediate states as shades of red.

Suppose we call state 0 "healthy", max-state "sick", and anything in between "infected". Then the rules for how each cell changes at each step can be described as follows:

a) A cell that is sick becomes healthy.

b) A cell that is healthy may become infected, if enough of its eight neighbors are infected or sick. Whether this happens is affected by the k1 and k2 sliders. (Lower k1 means higher tendency to be infected by infected neighbors; lower k2 means higher tendency to be infected by sick neighbors.)

c) A cell that is infected computes its new state by averaging the states of itself and its eight neighbors, then adding the value of the g slider. (Higher g means infected cells get sicker more rapidly.)

a is the negative feedback; b and c are the positive feedback.

These are only qualitative descriptions. To see the actual math used, look at the FIND-NEW-STATE procedure in the Procedures tab.


HOW TO USE IT

Press SETUP to initialize each cell in the grid to a random state.

Press GO to run the model.


THINGS TO NOTICE

Run the model with the default slider settings.

What happens near the beginning of run?

After about 100 clock ticks, you should start to see spirals emerging.

After about 200 clock ticks, the spirals should fill the world.

Can you work out why the specific rules used produce patterns like the ones you see?


THINGS TO TRY

What if you do a really long run -- what happens?

What is the effect of varying the different sliders? You can think of k1 and k2 as affecting the tendency for healthy cells to become infected, and g as affecting the speed with which the infection gets worse.


EXTENDING THE MODEL

This automaton is an example of a "reaction-diffusion" system. By altering the CA rules, you may be able to simulate other reaction-diffusion systems.


NETLOGO FEATURES

FIND-NEW-STATE is a long and rather complicated procedure. It could be clearer if it were split into subprocedures, but then the model wouldn't run quite as fast. Since this particular CA takes so many iterations to settle into its characteristic pattern, we decided that speed was important.

The WITHOUT-INTERRUPTION command is also used to speed up the model a little bit.


RELATED MODELS

Boiling, in the Physics/Heat section, is another cellular automaton that uses similar, though simpler, rules. The early stages of the Boiling model resemble the early stages of this model.

Fireflies, in the Biology section, is analogous to the B-Z reaction in a stirred beaker (the whole beaker "synchronizes" so it's switching back and forth all at once, like the fireflies).

Many models in the NetLogo models library can be thought as systems composed of positive and/or negative feedback mechanisms.


CREDITS AND REFERENCES

The B-Z reaction is named after Boris Belousov and Anatol Zhabotinsky, the Russian scientists who discovered it in the 1950's.

A discussion of the chemistry behind the reaction, plus a movie and some pictures, are available at http://online.redwoods.cc.ca.us/instruct/darnold/DEProj/Sp98/Gabe/intro.htm .

The cellular automaton was presented by A.K. Dewdney in his "Computer Recreations" column in the August 1988 of Scientific American.

See http://www.hermetic.ch/pca/bz.htm for a pretty screen shot of the cellular automaton running on a very large grid (using custom software for Windows, not NetLogo).

To refer to this model in academic publications, please use: Wilensky, U. (2003). NetLogo B-Z Reaction model. http://ccl.northwestern.edu/netlogo/models/B-ZReaction. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

In other publications, please use: Copyright 2003 Uri Wilensky. All rights reserved. See http://ccl.northwestern.edu/netlogo/models/B-ZReaction for terms of use.


PROCEDURES

globals [clock]

patches-own [state new-state]

to setup
ca
set clock 0
ask patches
[
set state random (max-state + 1) ;; pick a state from 0 to max-state
set pcolor scale-color red state 0 max-state ]
end
to go
;; first all the patches compute their new state
without-interruption ;; for speed
[
ask patches
[ find-new-state ] ]
;; only once all the patches have computed their new state
;; do they actually change state
without-interruption ;; for speed
[
ask patches
[
set state new-state
set pcolor scale-color red state 0 max-state ] ]
set clock clock + 1
end
to find-new-state ;; patch procedure
ifelse state = max-state ;; ill?
[
set new-state 0 ] ;; get well
[
let a count neighbors with [state > 0 and state < max-state] ;; count infected
let b count neighbors with [state = max-state] ;; count ill
ifelse state = 0 ;; healthy?
[
set new-state int (a / k1) + int (b / k2) ]
[
let s state + sum [state] of neighbors
set new-state int (s / (a + b + 1)) + g ]
if new-state > max-state ;; don't exceed the maximum state
[
set new-state max-state ] ]
end
; *** NetLogo 3.1.4 Model Copyright Notice ***
;
; This model was created as part of the projects:
; PARTICIPATORY SIMULATIONS: NETWORK-BASED DESIGN FOR SYSTEMS LEARNING IN
; CLASSROOMS and/or INTEGRATED SIMULATION AND MODELING ENVIRONMENT.
; The project gratefully acknowledges the support of the
; National Science Foundation (REPP & ROLE programs) --
; grant numbers REC #9814682 and REC-0126227.
;
; Copyright 2003 by Uri Wilensky. All rights reserved.
;
; Permission to use, modify or redistribute this model is hereby granted,
; provided that both of the following requirements are followed:
; a) this copyright notice is included.
; b) this model will not be redistributed for profit without permission
; from Uri Wilensky.
; Contact Uri Wilensky for appropriate licenses for redistribution for
; profit.
;
; To refer to this model in academic publications, please use:
; Wilensky, U. (2003). NetLogo B-Z Reaction model.
; http://ccl.northwestern.edu/netlogo/models/B-ZReaction.
; Center for Connected Learning and Computer-Based Modeling,
; Northwestern University, Evanston, IL.
;
; In other publications, please use:
; Copyright 2003 Uri Wilensky. All rights reserved.
; See http://ccl.northwestern.edu/netlogo/models/B-ZReaction
; for terms of use.
;
; *** End of NetLogo 3.1.4 Model Copyright Notice ***

Return to CS 420/527 home page

Return to MacLennan's home page

Send mail to Bruce MacLennan / MacLennan@utk.edu

Valid HTML 4.01!This page is web.eecs.utk.edu/~mclennan/Classes/420/NetLogo/BZ%20Reaction.html
Last updated: 2010-09-16.