Chromatography
WHAT IS IT?
This project illustrates a chromatography lab. Chromatography is a technique used to separate mixtures of compounds. In both thin layer chromatography (TLC) and paper chromatography a spot of pigment is put onto a chromatography plate or paper. The lower end of the plate or paper is put into a solvent. The solvent creeps up the paper (by capillary action) and slowly moves past the spotted mixture of pigments. Each pigment dissolves in the solvent or clings to the paper to different degrees. After a period of time the different pigments in the mixture end up spread out between the original spot and the upper most point reached by the solvent (called the solvent front).
The relationship of the distance moved by a pigment to the distance moved by the solvent front is specific for a given set of conditions. We call this relationship the Rf, the retention factor, and define it as follows: Rf = Distance moved by the pigment
Distance from pigment origin to solvent front
Thus, simple paper chromatography can be used to identify substances both qualitatively (by color) and quantitatively by its characteristic Rf value. For example, if the solvent front is 6 cm then the Rf value for the pigment at 3 cm would simply be 0.5
In this model, agents are used to represent the samples, and agents make up the moving solvent bar. As the solvent bar passes over the samples, it activates the sample and sets its speed. After the solvent line passes over point, the samples continue to move up the strip until the solvent stops at the top of the strip.
HOW TO USE IT
Set the slider "stat phase" to control the color of the silica. Click the "start phase" button to setup the silica base (the strip.) Set the slider "solvent" to control the color of the solvent bar. Click the "setsolvent" button to setup the solvent bar. Set the slider "sample-1" to control the color / speed of the sample 1. Click the "sample-1" button to setup the first sample. Set the slider "sample-2" to control the color / speed of the sample 2. Click the "sample-2" button to setup the second sample. Click the "unknown" button to setup the third "mystery" sample.
Click the "CHROMATOGRAPH" button to start the simulation. When the simulation stops (because the solvent bar has hit the top) Click the "calc Rf" button to see the Rf values corresponding to the samples.
THINGS TO NOTICE
Watch how changing the slider values changes the samples' Rf values.
EXPLORATIONS
Is there a better way to stop the simulation? Can the samples continue to rise up the strip even after the solvent has reached the top of the strip?
STARLOGO FEATURES
Turtle procedures
breeds [sample] ; breed called sample, but unnecessary
turtles-own [
active [yes no] ; active or not
samplecolor ; color of sample
solcolor ; solvent color
speed ; speed of sample
samnum ; sample number
]
;; start-solvent procedure
;; called by the CHROMATOGRAPH button
;; If the turtle is one of the ones making up solvent bar,
;; and it runs over a sample, then it alters the speed of the solvent.
;;
to start-solvent
if color = ((solvcolor * 10) + 1) [
setactive yes
grab one-of-turtles-here [
setactive-of partner yes
setspeed-of partner ((120 - abs(solcolor - samplecolor-of partner)) / 80)
]
if ycor < 40 [fd .67]
]
chromotog
end
;; chromotog procedure
;; called by start-solvent
;; If there are no more solvent turtles, stop everything.
;; If the turtle is a sample then move fd and wait
;;
to chromotog
if color =((solvcolor * 10) + 1) [
if ycor > 40 [stopall]
]
if active = yes and breed = sample [
fd speed
wait (140 - (abs(samplecolor - (pc)))) / 820
]
end
;; calcrf procedure
;; called by the calc Rf button
;; Calculate the distance traveled by the sample as a percentage of the
;; total distance.
;;
to calcrf
if color = green [show ycor + 44 / 85]
end
Observer procedures
globals [
grf ; retention factor
rrf ;
urf ;
]
patches-own [silcolor] ; silica color
;; setsilica
;; called by start phase button
;; Clears all then creates one turtle to draw the silica
;; with its pen down. The patches set their user-defined
;; patch variable silcolor. Globals are initialized.
;;
to setsilica
ca
create-and-do 1 [
set xcor -24
set ycor 48
setc ((silicolor * 10) - 1)
pd
repeat 49 [
seth 90
fd 49
rt 90
fd 1
rt 90
fd 49
lt 90
fd 1
lt 90
]
stamp black
die
]
ask-patches [set silcolor ((silicolor * 10) - 1)]
set grf 0
set rrf 0
set urf 0
end
;; setsol procedure
;; called by setsolvent button
;; Creates 1 turtle, has it walk along the bottom and hatch
;; new turtles at each spot.
;;
to setsol
create-and-do 1 [
set xcor -24
set ycor -48
seth 90
set solcolor ((solvcolor * 10) + 1)
setc solcolor
repeat 48 [
fd 1
hatch [seth 0]
]
die
]
end
;; setup1 procedure
;; called by sample-1 button
;; Creates a turtle to be the first sample
;; the color is determined by the slider value set with the
;; sample-1 slider.
;;
to setup1
create-and-do 1 [
set xcor -7
set ycor -44
set breed sample
setsamnum 1
setactive no
set samplecolor ((sampAcolor * 10) - 5)
setc samplecolor
]
end
;; setup2 procedure
;; called by sample-2 button
;; Creates a turtle to be the second sample
;; the color is determined by the slider value set with the
;; sample-2 slider.
;;
to setup2
create-and-do 1 [
set xcor 7
set ycor -44
set breed sample
set samnum 2
setactive no
set samplecolor ((samp2color * 10) - 5)
setc samplecolor
]
end
;; setup3 procedure
;; called by unknown button
;; Creates a turtle to be the mystery sample
;; the color is a random value
;;
to setup3
create-and-do 1 [
set xcor 0
set ycor -44
set breed sample
set samnum 3
setactive no
set samplecolor (((random 14) * 10) - 5)
setc black
if samplecolor < 0 [
set samplecolor (((random 14) * 10) - 5)
setc black
]
]
end
;; calcrf procedure
;; called by the calc Rf button
;; Rf is the distance moved by the pigment.
;;
to calcrf
ask-turtles [if samnum = 1 [setgrf (ycor + 44) / 85]]
ask-turtles [if samnum = 2 [setrrf (ycor + 44) / 85]]
ask-turtles [if samnum = 3 [seturf (ycor + 44) / 85]]
end
