WHAT IS IT?
-----------

This model demonstrates the properties of LeChatelier's Principle. This chemical principle states that if a system that is at equilibrium is perturbed, the system will readjust to establish a new equilibrium. For example, if you add reactants to a reversible reaction that is at equilibrium, the system will shift to generate more products and establish a new equilibrium. The principle can also be described with chemical equations.

Below is a generic equation which depicts two molecules of reactant A combining to form one molecule or product B. The reaction is reversible, meaning that the one molecule of B can break down into two molecules of A.

		  Kb
	A + A <=======> B
		  Ku

An example of such a reaction would be dimerization of the gas nitrous oxide:

	  	  Kb
	2 NO  <=======> N O
            2     Ku     2 4                 


This reaction is an example of a complex reaction which consists of two elementary reactions.  The forward bimolecular reaction 
		
		 Kb
	A + A --------> B 


is characterized by the constant Kb and the reverse unimolecular reaction

	      Ku
	B ---------> A + A

The equilibrium rate constant for the entire reaction (Keq) is equal to [B] / [A] ^ 2. Each of the rate constants in the equations above has units of s^-1. They are empirically derived constants that when combined with the reaction concentrations tell you how fast the reaction proceeds according to the reaction rate law. The rate law ultimately tells you how many Molar units of a molecule react per second. For the reaction above the forward rate law is RATE = Kb[A]^2 and the reverse rate law is 
RATE = Ku[B]. Because we are simulating the reaction, the values of Kb and Ku in this reaction are not real-world values.

Though it is necessary to use several differential equations to calculate the values of Kb, Ku and Keq several qualitative features of their relationships can be seen using this StarLogoT model. Reaction equilibrium is reached when a system reaches a steady-state. This is not to say that reactions have stopped occurring! Microscopic changes in equilibrium still take place, but to our eyes and our measurements the system appears stable because the forward and reverse rates are equal.

The rate at which a reaction reaches equilibrium as well as the state of the equilibrium system both depend upon the rate constants, the temperature, the concentration of reactants and products and, when a gas is involved, the volume of the container. When a system has reached equilibrium, changes to any of the variables above result in a change in the system to establish a new equilibrium. This effect is predicted using LeChatelier's Principle. We can use our model to discover the role of each variable (temperature, volume, concentration and rate constant) in LeChatelier's Principle.

HOW TO USE IT
--------------
To start off:

Choose the values of Kb and Ku with appropriate sliders:
     - Kb controls the rate of the forward reaction by which two green turtles turn bimolecularly into a single red turtle. 
     - Ku controls the rate of the reverse reaction, by which a red turtle turns unimolecularly into two green turtles.

Set the size of the yellow box using the SIZE slider. (If you would like to change the size while you are running a model. Press RUN to stop the model, adjust the SIZE slider and redraw the box using the DRAW-BOX button. Resume the reaction by pressing RUN.)

Having chosen appropriate values of the constants, press SETUP to clear the screen and create an initial number of green turtles.  Note: we do not create red turtles initially, although this can be done in principle.

Press RUN to start the simulation.

After viewing the effects of several different rate constant values, use the other sliders and buttons to observe how concentration, volume, and temperature affect the equilibrium.

A note on the temperature variable. Temperature changes have a unique effect on equilibrium compared with the other variables. You can observe this effect by toggling the TEMP-EFFECT button on or off and using the slider to set the temperature of the reaction in units centigrade.

THINGS TO NOTICE
----------------

You will see turtles wandering around the screen and changing color.  Pay more attention to the plot of the concentrations.  Do the plots soon reach stationary concentrations?

How does changing the concentrations of reactants and products in the system affect the equilibrium? Does it take more or less time to reach a stationary condition under various conditions?

What is the effect of temperature on the equilibrium of the system compared to volume or concentration?

Notice how the ratio of products to reactants changes with changes to the system. Does the ratio change much with each factor? Make a window that show the value of Keq to help you determine this.

Why do the traces of each breed eventual balance around a constant average? How come this value is an average and not a constant?
  
THINGS TO TRY
-------------

How do the stationary concentrations depend on the values of Kb and Ku?   You can change Ku and Kb while the model is running.   See if you can predict what the stationary concentrations will be with various combinations of Kb and Ku. 

Without adding additional reactants or products and with the temperature effect in the off position, can you explain why more red product molecules accumulate when the volume decreases?

Observe the progress of the reaction at high and low temperatures? Does this observed trend fit your expectations?

Try adding some turtles to the system that have no breed, as an inert gas. Does this affect the equilibrium? Why or why not?

EXTENDING THE MODEL
------------------

At the moment, the molecules physically ignore each other except when a chemical reaction occurs (i.e. they do not bounce of each other). This does not reflect the true nature of gases trapped in a box. See if you can alter the model so that the molecules bounce off each other as well as the walls. Does this affect the rate at which equilibrium is reached?

Try altering the code so that when two green molecules collide, they produce two red molecules instead of one. Likewise, alter it so that two red molecules must collide to form two green molecules. Observe the effect of volume on this system. Is the reaction as you predicted?

What would the effect of adding a catalyst to the system be? Add a catalyst breed that accelerates the reaction and observe the trend, are you surprised?

Add a monitor that measures the equilibrium constant for the system? Is it really a constant?

STARLOGOT FEATURES
------------------

Notice the use of breeds in the model. In particular, the temp-breed allows the use to add more turtles into the simulations and give them particular commands that the other turtles ignore. Without the temp-breed creating init-breed and prod-breed while the model is running would be especially difficult as all turtles on the screen would execute commands addressed to the added turtles.