This model explains how bubble chambers work.  Bubble chambers are detectors used by physicits to study atomic particles.  For a quick course in particle detection please refer to the introduction below. 




PARTICLE DETECTORS, instruments used to detect and study fundamental nuclear particles.  These detectors range in complexity from the well-known portable Geiger counter to room-sized spark and bubble chambers. 


One of the first detectors to be used in nuclear physics was the ionization chamber, which consists essentially of a closed vessel containing a gas and equipped with two electrodes at different electrical potentials.  The electrodes, depending on the type of instrument, may consist of parallel plates or coaxial cylinders, or the walls of the chamber may act as one electrode and a wire or rod inside the chamber act as the other.  When ionizing particles or radiation enter the chamber they ionize the gas between the electrodes.  The ions that are thus produced migrate to the electrodes of opposite sign (negatively charged ions move toward the positive electrode, and vice versa), creating a current that may be amplified and measured directly with an electrometer-an electroscope equipped with a scale-or amplified and recorded by means of electronic circuits. 
	Ionization chambers adapted to detect individual ionizing particles of radiation are called counters. The Geiger-Müller counter is one of the most versatile and widely used instruments of this type.  It was developed by the German physicist Hans Geiger (1882-1945) from an instrument first devised by Geiger and the British physicist Ernest Rutherford; it was improved in 1928 by Geiger and by the German-American physicist Walter Müller (1905-    ).  The counting tube is filled with a gas or a mixture of gases at low pressure, the electrodes being the thin metal wall of the tube and a fine wire, usually made of tungsten, stretched lengthwise along the axis of the tube. A strong electric field maintained between the electrodes accelerates the ions; these then collide with atoms of the gas, detaching electrons and thus producing more ions. When the voltage is raised sufficiently, the rapidly increasing current produced by a single particle sets off a discharge throughout the counter.  The pulse caused by each particle is amplified electronically and then actuates a loudspeaker or a mechanical or electronic counting device. 


Detectors that enable researchers to observe the tracks that particles leave behind are called track detectors. Spark and bubble chambers are track detectors, as are the cloud chamber and nuclear emulsions.  Nuclear emulsions resemble photographic emulsions but are thicker and not as sensitive to light.  A charged particle passing through the emulsion ionizes silver grains along its track.  These grains become black when the emulsion is developed and can be studied with a microscope. 


The fundamental principle of the cloud chamber was discovered by the British physicist C. T. R. Wilson (1869-1959) in 1896, although an actual instrument was not constructed until 1911.  The cloud chamber consists of a vessel several centimeters or more in diameter, with a glass window on one side and a movable piston on the other.  The piston can be dropped rapidly to expand the volume of the chamber.  The chamber is usually filled with dust-free air saturated with water vapor.  Dropping the piston causes the gas to expand rapidly and causes its temperature to fall.  The air is now supersaturated with water vapor, but the excess vapor cannot condense unless ions are present.  Charged nuclear or atomic particles produce such ions, and any such particles passing through the chamber leave behind them a trail of ionized particles upon which the excess water vapor will condense, thus making visible the course of the charged particle.  These tracks can be photographed and the photographs then analyzed to provide information on the characteristics of the particles. 
	Because the paths of electrically charged particles are bent or deflected by a magnetic field, and the amount of deflection depends on the energy of the particle, a cloud chamber is often operated within a magnetic field.  The tracks of negatively and positively charged particles will curve in opposite directions.  By measuring the radius of curvature of each track, its velocity can be determined.  Heavy nuclei such as alpha particles form thick and dense tracks, protons form tracks of medium thickness, and electrons form thin and irregular tracks.  In a later refinement of Wilson's design, called a diffusion cloud chamber, a permanent layer of supersaturated vapor is formed between warm and cold regions.  The layer of supersaturated vapor is continuously sensitive to the passage of particles, and the diffusion cloud chamber does not require the expansion of a piston for its operation. Although the cloud chamber has now been supplanted almost entirely by the bubble chamber and the spark chamber, it was used in making many important discoveries in nuclear physics. 


The bubble chamber, invented in 1952 by the American physicist Donald Glaser (1926-    ), is similar in operation to the cloud chamber.  In a bubble chamber a liquid is momentarily superheated to a temperature just above its boiling point.  For an instant the liquid will not boil unless some impurity or disturbance is introduced.  High-energy particles provide such a disturbance.  Tiny bubbles form along the tracks as these particles pass through the liquid.  If a photograph is taken just after the particles have crossed the chamber, these bubbles will make visible the paths of the particles.  As with the cloud chamber, a bubble chamber placed between the poles of a magnet can be used to measure the energies of the particles.  Many bubble chambers are equipped with superconducting magnets instead of conventional magnets.  Bubble chambers filled with liquid hydrogen allow the study of interactions between the accelerated particles and the hydrogen nuclei. 


In a spark chamber, oncoming high-energy particles ionize the air or a gas between plates or wire grids that are kept alternately positively and negatively charged.  Sparks jump along the paths of ionization and can be photographed to show particle tracks.  In some spark-chamber installations, information on particle tracks is fed directly into electronic computer circuits without the necessity of photography.  A spark chamber can be operated quickly and selectively.  The instrument can be set to record particle tracks only when a particle of the type that the researchers want to study is produced in a nuclear reaction.  This advantage is important in studies of the rarer particles; spark-chamber pictures, however, lack the resolution and fine detail of bubble-chamber pictures. 


The scintillation counter functions by the ionization produced by charged particles moving at high speed within certain transparent solids and liquids, known as scintillating materials, causing flashes of visible light. The gases argon, krypton, and xenon produce ultraviolet light, and hence are used in scintillation counters.  A primitive scintillation device, known as the spinthariscope, was invented in the early 1900s and was of considerable importance in the development of nuclear physics. The spinthariscope required, however, the counting of the scintillations by eye.  Because of the uncertainties of this method, physicists turned to other detectors, including the Geiger-Müller counter. The scintillation method was revived in 1947 by placing the scintillating material in front of a photomultiplier tube, a type of photoelectric cell. The light flashes are converted into electrical pulses that can be amplified and recorded electronically. 
	Various organic and inorganic substances such as plastic, zinc sulfide, sodium iodide, and anthracene are used as scintillating materials.  Certain substances react more favorably to specific types of radiation than others, making possible highly diversified instruments.  The scintillation counter is superior to all other radiation-detecting devices in a number of fields of current research.  It has replaced the Geiger-Müller counter in the detection of biological tracers and as a surveying instrument in prospecting for radioactive ores. It is also used in nuclear research, notably in the investigation of such particles as the antiproton, the meson, and the neutrino. One such counter, the Crystal Ball, has been in use since 1979 for advanced particle research, first at the Stanford Linear Accelerator Center and, since 1982, at the German Electron Synchrotron Laboratory (DESY) in Hamburg, Germany.  The Crystal Ball is a hollow crystal sphere, about 2.1 m (7 ft) wide, that is surrounded by 730 sodium iodide crystals. 


Many other types of interactions between matter and elementary particles are used in detectors.  Thus in semiconductor detectors, electron-hole pairs that elementary particles produce in a semiconductor junction momentarily increase the electric conduction across the junction. The Cherenkov detector, on the other hand, makes use of the effect discovered by the Russian physicist Pavel Alekseyevich Cherenkov in 1934: A particle emits light when it passes through a nonconducting medium at a velocity higher than the velocity of light in that medium (the velocity of light in glass, for example, is lower than the velocity of light in vacuum).  In Cherenkov detectors, materials such as glass, plastic, water, or carbon dioxide serve as the medium in which the light flashes are produced.  As in scintillation counters, the light flashes are detected with photomultiplier tubes. 
	Neutral particles such as neutrons or neutrinos can be detected by nuclear reactions that occur when they collide with nuclei of certain atoms.  Slow neutrons produce easily detectable alpha particles when they collide with boron nuclei in borontrifluoride.  Neutrinos, which barely interact with matter, are detected in huge tanks containing perchloroethylene (C2CI4, a dry-cleaning fluid).  The neutrinos that collide with chlorine nuclei produce radioactive argon nuclei.  The perchloroethylene tank is flushed at regular intervals, and the newly formed argon atoms, present in minute amounts, are counted.  This type of neutrino detector, placed deep underground to shield against cosmic radiation, is currently used to measure the neutrino flux from the sun.   Neutrino detectors may also take the form of scintillation counters, the tanks in this case being filled with an organic liquid that emits light flashes when traversed by electrically charged particles produced by the interaction of neutrinos with the liquid's molecules. 
	The detectors now being developed for use with the storage rings and colliding particle beams of the most recent generation of accelerators are bubble-chamber types known as time-projection chambers.  They can measure three-dimensionally the tracks produced by particles from colliding beams, with supplementary detectors to record other particles resulting from the high-power collisions. Fermilab's CDF (Collision Detector Fermilab) is used with its colliding-beam accelerator to study head-on particle collisions. CDF's three different systems can capture or account for nearly all of the subnuclear fragments released in such violent collisions. 


This model uses patches and two breeds of turtles: particles and bubbles.  


	Patches are only used to store a variable called "field" corresponding to the strength of the electromagnetic field inside the chamber.  The field variable is arbitrarily set to 10 each time user pushes the "setup" button.  Patches do not play important role in this model unlike turtles which as the names of the breeds suggest imitate atomic particles and bubbles generated by the particles. 


	The breeds used in the model are fundamentally different from each other in two respects: 
          1. Particles are created by the obsever every second as long as the main procedure                                  	     "observer.run" is running unlike bubbles which are created by the particles;  
	  2. Particles execute particle-specific actions which do not overlap with bubble-		     specific actions;    
Technically both particles and turtles carry the same turtle variables called "charge," "size" and "speed" but they interprete these variables in different ways.  We shall now discuss each breed in detail.


	As was mentioned above particles are created by the observer every second using "every" primitive.  There are three actions associated with the particle breed: "particle.init," "particle.move" and "particle.outofbounds?"  The first action "particle.init" initializes particles after they have been created by the observer, "particle.move" moves particles down the screen and the last action "particle.outofbounds?" is a function that returns boolean value depending on whether a particle is within the bounds described by constants "bounds.left," "bounds.top," "bounds.right" and "bounds.bottom."  Below is the listing of all particle-specific actions:

to particle.init
  setcharge 1 - random 3 
  setheading 120 + random 120 
  setsize 1 + random 12
  setspeed 6 + random 12
  setxcor screen-edge-x - random screen-size-x
  setycor bounds.top

to particle.move
  right field * charge / size
  forward speed
  hatch [bubble.init]

to particle.outofbounds?
  output (xcor < bounds.left + speed) or 
  (xcor > bounds.right - speed) or 
  (ycor > bounds.top) or 
  (ycor < bounds.bottom + speed)

	In "particle.init" the newly created particle sets its charge randomly to a number between -1 and 1, then it sets its heading randomly to an angle between 120 degrees and 240 degrees which is down in starlogot, then it randomizes its size, speed and xcor.  The only variable that is set deterministically is ycor simply because we want the particle to move down from the upper boundary of the chamber.  Notice that after initialization the variable "size" is at least 1 and "speed" is at least 6.
	The main particle action is "particle.move."  The first line of the procedure changes the particle heading according to its charge, size and the strength of the field.  The command that is used: 

			right charge * field * speed / size

is motivated by physical laws that govern the motion of charged particles in electromagnetic fields.  
	It was discovered by Lorentz that a magnetic field would exert a force on an electric charge only if it was moving.  He then found that the force on a moving charge is proportional to the strength of the magnetic field and the speed and the magnitude of the charge.  The direction of the force is always perpendicular to both the magnetic field and the velocity of the charge.  Thus according to Lorentz a magnetic field can only change the direction of the velocity not the magnitude.  This means that if a charge is moving at a constant velocity in free space and then enters a area of a magnetic field the charge will make a half circle and then leave the magnetic field going in the opposite direction that it entered.  Since the force on the charge is proportional to the velocity no matter how fast the charge is traveling it will always exhibit the same behavior.  However, the radius of the half circle that it traces out will vary depending on the charge, velocity and the strength of the field.  Notice that depending on the sign of the charge the particle will turn right if "charge" is positive or left if "charge" is negative.  If "charge" is 0 then the particle does not turn which is physically correct since neutral particles do not get deflected by an electromagnetic field.
	After a particle turns it moves "speed" units forward, hatches a bubble and asks the bubble to initialize itself.  A particle moves only if "particle.outofbounds?" returns false otherwise it is destroyed.


	As was mentioned earlier the "bubble" breed is radically different from the "particle" breed. Bubbles are stationary, they do not change their coordinates and consequently have little use for the turtle variable "speed."  Unlike particles which vanish as soon as they get out of bounds bubbles randomly burst.  		
to bubble.burst :n
  if (random :n) = 0 [bubble.paint background die]

	In  "bubbles.burst" :n is the parameter that controls the rate of bursting.  Notice that the implementation analogous to the model called "Unimolecular Kinetics."  In fact bubbles burst unimolecularly according to the law:
		rate is proportional to concentration

The next bubble action is "bubble.init."

to bubble.init
  setbreed bubble
  setsize 2 + random 3 
  bubble.paint white 
	Initiallization of a bubble is different from that of a particle.  We have to set the breed explicitely to "bubble" because bubbles are hatched by the particles using the "hatch" primitive which clones its caller (particle in our case)  The second line randomizes the size which in the case of bubbles has the meaning of the radius.  Notice that as in the case of "particle.init" we want the size to be positive (at least 2)  Finally, after the bubble is created it must be displayed.  The shape of the bubble in this model is drawn dynamically for two reasons: 
	1. Using starlogot shapes limits the resolution of the screen to 8x8 patches;
	2. Drawing shapes at run time is a more flexible approach than creating shapes at 		   design time an storing them in starlogot;
The last line in the "bubble.init" action calls the painting method listed below. 

to bubble.paint :color
  setcolor :color
  repeat 10 [left 36 forward 0.2 * pi * size]

The parameter that is passed to the procedure is the color with which we wish to draw the bubble.  The drawing algorithm is very simple: the turtle crawls around a circle leaving the trace.  Since the size of the bubble can be at most 4 it suffices to break the circle into 10 36 degrees long arcs.  If you want to have larger bubbles you should modify the paint method so that it breaks the circumference into more pieces depending on the "size" variable.  We need to be able to paint bubbles with variable color in order to be able to erase bubbles: when a bubble "bursts" it first has to paint itself with the background color (which is the constant "background" initialized to black) and then die otherwise it will stay on the screen. 

SETUP-button    - resets the model;
RUN-button      - starts the simulation;
SNAPSHOT-button - stops the simulation;  

COMMENT: SNAPSHOT-button is redundant.  User can achieve the same effect by depressing the forever RUN-button. 


Notice that not all of the particles that have charge make a U-turn when they enter the chamber.  Some particles turn more than 180 degrees and some turn less and run into vertical edges.  This happens in reality because the actual electromagnetic field is not infinite in extent and heavy rapidly moving particles can sometimes zap right through it whereas light particles can lose enough energy interacting with the liquid and start spiraling in.


1. Try to rewrite "bubble.paint" method so that it paints large bubbles.
2. Try to write a model of some other particle detector eg SPARK CHAMBER.

1) Bryant, Philip J. and Johnsen, Kjell. The Principles of Circular Accelerators and Storage Rings. Cambridge, 1993. The most common type: found at Fermilab and CERN. 

2) Cahn, Robert N. and Goldhaber, Gerson. Experimental Foundations of Particle Physics. Cambridge, 1991. How accelerator results have shaped current theory. 

3) Edwards, D. A. and Syphers, M. J. An Introduction to the Physics of High Energy Accelerators. Wiley, 1992. An overall view at the upper college level. 

4) Wiedemann, Helmut. Particle Accelerator Physics: Basic Principles and Linear Beam Dynamics. Springer, 1993. Advanced text on the type found at places like Stanford.