B-Z Reaction

B-Z Reaction preview image

1 collaborator

Uri_dolphin3 Uri Wilensky (Author)


coolest models 

Tagged by Michelle Wilkerson-Jerde over 15 years ago

Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 5.0.4 • Viewed 522 times • Downloaded 82 times • Run 0 times
Download the 'B-Z Reaction' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


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.


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:

  1. A cell that is sick becomes healthy.
  2. 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.)
  3. 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.)

1 is the negative feedback; 2 and 3 are the positive feedback.

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


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

Press GO to run the model.


Run the model with the default slider settings.

What happens near the beginning of run?

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

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

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


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.


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.


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.


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.


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).


If you mention this model in a publication, we ask that you include these citations for the model itself and for the NetLogo software:

  • 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 Institute on Complex Systems, Northwestern University, Evanston, IL.
  • Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.


Copyright 2003 Uri Wilensky.


This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

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.

Comments and Questions

Click to Run Model

patches-own [state new-state]

to setup
  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 ]

to go
  ;; first all the patches compute their new state
  ask patches [ find-new-state ]
  ;; only once all the patches have computed their new state
  ;; do they actually change state
  ask patches
  [ set state new-state
    set pcolor scale-color red state 0 max-state ]

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 ] ]

; Copyright 2003 Uri Wilensky.
; See Info tab for full copyright and license.

There are 10 versions of this model.

Uploaded by When Description Download
Uri Wilensky about 11 years ago Updated to NetLogo 5.0.4 Download this version
Uri Wilensky over 11 years ago Updated version tag Download this version
Uri Wilensky over 11 years ago Updated to version from NetLogo 5.0.3 distribution Download this version
Uri Wilensky over 12 years ago Updated to NetLogo 5.0 Download this version
Uri Wilensky about 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky about 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky about 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky about 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky about 14 years ago Model from NetLogo distribution Download this version
Uri Wilensky about 14 years ago B-Z Reaction Download this version

Attached files

File Type Description Last updated
B-Z Reaction.png preview Preview for 'B-Z Reaction' about 11 years ago, by Uri Wilensky Download

This model does not have any ancestors.

This model does not have any descendants.