- Art
- Astronomy
- Biology
- Selection and Mutation Series
- Ant Patterns
- Bacterial Growth
- Bark Beetles
- Biological Buffer
- Birds Competing For Worms
- Color Bunnies
- Ecosystem - Predator, Prey, and Grass
- Ecosystem - Rabbits and Grass
- Ecosystem - Two Species
- Ecosystem With Predator, Prey, And Grass
- Forest Fire
- Honeycomb Formation
- Termites Perimeter
- Yeast Growth
- Chemistry
- Earth Science
- Mathematics
- Physics
- Social Science
Biological Buffer
Submitted by ilee on Sat, 2006-03-18 23:29. :: Category
WHAT IS IT?
This is a model of a buffer, which is a chemical that tends to stabilize pH at a nearly constant level, even if small amounts of acid or base are added to it; represents a reservoir of H+ ions.
Every buffer system has an acid form (proton donor) and a base form (proton acceptor)
Cells maintain pH using buffers such as carbonic acid/bicarbonate system
The Carbonic Acid system H2CO3 <--> HCO3- + H+ Carbonic acid Bicarbonante ion acid base
In blood plasma, the carbonic acid and hydrogen carbonate ion equilibrium buffers the pH. In this buffer, carbonic acid (H2CO3) is the hydrogen-ion donor (acid) and hydrogen carbonate ion (HCO3-) is the hydrogen-ion acceptor (base). This means that additional H+ is consumed by HCO3- and additional OH- is consumed by H2CO3. In blood plasma, the concentration of hydrogen carbonate ion is about 20 times the concentration of carbonic acid.
HOW IT WORKS
In this version, the reaction employs five different turtle colors to simulate the following system of reversible chemical reactions: red + blue <-> yellow yellow <-> green + white
HOW TO USE IT
You can control the probability of the forward reactions using the "probability of reaction 1" and "probability of reaction 2" sliders. The probability of the reverse dissociation and decompoisionts are defined by the "probability of reaction 1b" and "probability of reaction 2b" sliders.
You can adjust the "temperature" slider controls to change the speed of molecular movement.
To change the initial conditions, simply reset the "init" sliders under the different color models. Or use the buttons that add H+, CO2, HCO3-, or H2O.
You can start and stop the simulations using the go button.
THINGS TO NOTICE
Setup and go. What happens to the concentrations (amounts) of the different molecules? Look at the H+ in particular. What happens to the relative acidity?
Try manipulating the amounts of the different molecules while it is running by adding H+, CO2, etc. What happens in the short and long term to the concentrations?
What does changing the reaction probabilities do in the short and long term?
Turtle procedures
turtles-own [death split]
; reaction 1: red + blue <-> yellow
; reaction 2: yellow <-> green + white
; this is the procedure that gets called by the go button.
; it controls turtle movement and the interaction between turtles
; when two turtles that are either red/blue or white/green collide they react and form yellow with some probability
; while conceptually the two molecules form one - the way it is implemented is that one molecule turns yellow and the other dies
; if the molecules are red (CO2) or yellow (H2CO3) they check the wander procedure
to go
fd (temperature / 100)
rt random 10 lt random 10
if color = yellow or color = red [wander]
grab one-of-turtles-here
[
if ((color = white) and ((color-of partner) = green)) and ((random 100) <= reaction-2)
[setc-of partner yellow set death true]
if ((color = green) and ((color-of partner) = white)) and ((random 100) <= reaction-2)
[setc-of partner yellow set death true]
if ((color = red) and ((color-of partner) = blue)) and ((random 100) <= reaction-1)
[setc-of partner yellow set death true]
if ((color = blue) and ((color-of partner) = red)) and ((random 100) <= reaction-1)
[setc-of partner yellow set death true]
]
if death = true [die]
end
;if a molecule is yellow it dissociates (into H+ and HCO3-) or decomposes (into H2O and CO2)
;if a molecule is red (CO2) it bubbles out (dies) with a small probability
to wander
if color = yellow
[rt (random 10) lt (random 10) fd (temperature / 200)
set split (random 100)
if split < split-probability1
[setc green rt random 10 lt random 10 fd temperature / 100
hatch [setc white rt random 10 lt random 10 fd temperature / 100]]
if split >= split-probability1 and split < (split-probability1 + split-probability2)
[setc blue rt random 10 lt random 10 fd temperature / 100
hatch [setc red rt random 10 lt random 10 fd temperature / 100]]]
if color = red and (random 1000) = 0
[die]
end
Observer procedures
globals [redcount bluecount]
;creates all of the turtles of the different molecule types and places them randomly
to setup
ca
create-and-do 100 [setc blue]
create-and-do yellows [setc yellow]
create-and-do whites [setc white]
create-and-do reds [setc red]
create-and-do 100 [setc green]
ask-turtles [
setxy (random screen-width) (random screen-height)
setdeath false
setshape molecule-shape
]
clearplots
end
;adds additional water molecules
to wateronly
create-and-do 100 [setc blue setshape molecule-shape]
ask-turtles [setxy (random screen-width) (random screen-height) setdeath false]
end
;adds additional HCO3-
to buffer
create-and-do 100 [setc green setshape molecule-shape]
ask-turtles [setxy (random screen-width) (random screen-height) setdeath false]
end
;adds more H+
to morewhite
create-and-do 10 [setc white setshape molecule-shape]
end
;adds more CO2
to morered
create-and-do 10 [ setc red setshape molecule-shape ]
end
;numblue, numred, numyellow, numwhite, numgreen
;are all used in the blues, reds, yellows, whites, and greens monitors
;these values are not the same as the slider values
;except immediately after setup
to numblue
set bluecount count-turtles-with [color blue]
output count-turtles-with [color = blue]
end
to numred
set redcount count-turtles-with [color = red]
output redcount
end
to numyellow
output count-turtles-with [color = yellow]
end
to numwhite
output count-turtles-with [color = white]
end
to numgreen
output count-turtles-with [color = green]
end
to acidity
output count-turtles-with [color = white] / .4
end
5739 reads
