Online html version of the Boltzmann 3D manual. The more complete version is available in pdf format.
Author: Randall B. Shirts
Programmers: Scott R. Burt and Benjamin J. Lemmon
Additional Programming: Jared Duke, Derek Manwaring, Aaron Stewart and Dustin Carr
Department of Chemistry and Biochemistry, Brigham Young University, Provo, Utah
copyright 2004, 2005, 2007, 2009 by Brigham Young University, all rights reserved
What does the motion of atoms and molecules look like? Boltzmann 3D is designed to demonstrate principles of molecular kinetic theory, statistical mechanics, and other fundamentals of chemistry and physics in a visual and understandable way. Boltzmann 3D simulates the motion of particles in a small box. You control the number, size, mass and temperature of the particles and watch them move around in the box just like atoms move in a gas. You can perform hundreds of experiments to test interesting hypotheses or answer difficult questions:
- Do the particles obey the celebrated ideal gas law?
- Are the laws of molecular kinetic theory (upon which some of the most important principles of chemistry and physics are based) really true?
- How do particles chaotically and randomly collide with each other and with the walls of their container?
- How do simple laws result in complex motion?
- How does the same complex motion result in simple laws describing bulk properties such as the pressure exerted by a gas, the probability of evaporation or condensation, and many other important characteristics of real materials?
- How can simple colliding balls help you understand kinetics and equilibrium?
The motion of molecules determines almost everything around us in the physical world. You can learn and appreciate this using Boltzmann 3D. Just follow the bouncing balls!
Using Boltzmann 3D
Boltzmann 3D was written to help students understand the concepts of molecular kinetic theory. Many of the properties of matter (pressure, evaporation, melting, vapor pressure, phase behavior, reaction rates, equilibrium, etc.) depend on the distribution of molecular speeds. Experience shows that when you just tell students about these concepts, they don't really understand. If you help them visualize relative velocities, they understand the concept at a much deeper level.
Boltzmann 3D makes an excellent classroom demonstration tool when projected on a large screen. A good demonstration would be to start with 50 to 100 randomly distributed particles and watch the velocity distribution develop from a single initial velocity. Using red and blue particles with different masses, you can also show how mass affects velocity. Effusion can be demonstrated using a divided arena. Each demonstration can be saved in a separate *.set file so you can quickly load each file without disrupting the flow of your class. Some example *.set files are supplied with the program.
An even more powerful use of Boltzmann 3D is to make the program available to students to play with on their own. They can change the temperature and the mass of particles themselves and observe the resulting changes. Give them a set of questions and a worksheet to guide them. Then let them explore.
Boltzmann 3D was designed to be platform and system independent. All it requires is:
- Windows/Linux: 700MHz Pentium 3 processor or compatible, Mac: 700 MHz G3 processor. Larger and more complex simulations require faster processors. The program may work on some older, slower computers, but you will have to use fewer particles (try 30 to 40), eliminate shading, and use 2D rather than 3D simulations.
- An OpenGL compatible graphics card. Faster graphics will make the motion appear more realistic. An older graphics card may not be able to use the most recent graphics libraries and may offload some computation to the CPU. This will interrupt motion and make it appear jerky. Before you download Boltzmann 3D, you should update your graphics drivers by going to the manufacturer's website (see below under graphics drivers).
- Java 2 SE Runtime Environment 1.4.2 or later. The latest version can be downloaded from http://www.java.com (or software update for Mac users).
- Open GL 1.5 or later graphics drivers. The best way to update your graphics drivers is to go to the website of your video card or computer manufacturer and download any updated drivers. For a Windows computer, find the video card make and model by right-clicking on the desktop, selecting properties and then the settings tab, and then looking under the line display. For Macs, go to software update.
Download the Java code, documentation, sample demonstration files and this manual by going to http://chem.byu.edu/undergraduate-students/educational-software/boltzmann-3d/ and clicking on the link corresponding to your operating system: Windows, Mac, or Linux. Graphics drivers for Linux are somewhat non-standard and may require customization.
After installing the software, start Boltzmann 3D by choosing one of the following:
- Windows: double click Boltzmann.jar or the Boltzmann 3D icon if you have elected to have it on your Windows desktop.
- Mac: double click Boltzmann3D.app
- Linux: run /usr/bin/Boltzmann3D
Boltzmann 3D will begin to load. After a few seconds, the Boltzmann 3D window will appear, and the program will start a simulation using the default settings.
Boltzmann 3D can run with just about any screen resolution. Recommended resolution is 1024x768 or higher. At low resolutions like 800x600 or 640x480, you will need to resize the arena so it fits on your screen and use smaller particles. At high screen resolution, you may wish to make the arena larger and use larger particles. You can resize the arena in the options under the simulation menu. The following table gives approximate horizontal and vertical sizes for full-screen operation in several common screen resolutions. If you prefer, you can scale the sizes of everything in the arena by adjusting the Zoom option.
arena width (nm)
arena height (nm)
Boltzmann 3D represents the motion of particles graphically by moving circular spheres (simulated atomic-size particles) around on the computer screen. What you see in Boltzmann 3D is only a simplified model of real atomic behavior. In fact, real atoms are much more complicated than circular spheres. Scientists call this kind of model a simulation. The motion of particles in Boltzmann 3D is both a mathematical simulation taking place inside the computer using Newton's laws of motion and a graphical simulation displayed on the computer screen. At the lower left of the window is a clock that tells how much time has passed since the start of the experiment. Because the motion of atoms is incredibly fast, this clock is adjusted to run correspondingly slow. In one second of time on your wall clock or wrist watch, you will see the complicated motions that occur in just a few picosecond (1 ps = 10-12 s) of simulation time. The Boltzmann 3D main window is divided into six key areas: the arena, the pressure display area, the statistics area where distributions are displayed, the particle information area, the advanced area, and the program control area. The pressure display area, statistics area, particle information area, and advanced area can be hidden by clicking on the - sign by the title or expanded by clicking on the + sign by the title.
Most of the Boltzmann 3D window is occupied by the arena in which particles move and collide with each other or with the arena walls. The size of the arena is adjustable. Resize it by grabbing with the mouse at the lower right corner or by setting the dimensions in options under the simulation menu. The size is labeled in nm (nanometers, 1 nm = 10-9 m). Although a region at the nanometer scale is extremely small, particles moving in the arena still exhibit many of the same properties and principles that real atoms exhibit. Particles move in the arena at a constant velocity in a constant direction until they collide with either another particle or one of the walls of the arena. You can change the number of particles, or their radius, mass, and temperature (or average kinetic energy) using controls in the particle information area described below.
In Boltzmann 3D, particles do not have any attractive forces between them; they elastically rebound when they collide. Each particle has a definite radius, and a collision occurs whenever the centers of two particles are at a distance given by the sum of the particle radii. A collision with the wall occurs when the center of a particle is at a distance from any wall equal to the particle radius.
The velocities and directions of both particles after a collision are calculated such that the total momentum and kinetic energy are the same as before the collision. Thus, the only principles assumed are conservation of momentum and energy. All of what you see follows directly from these two universal principles of physics.
A simulation can be performed in one dimension (1D), two dimensions (2D), or three dimensions (3D). Because the computer screen is two dimensional, the most useful choice is to do simulations in two dimensions (horizontal and vertical). The dimension can be changed from the simulation menu under dimension. One-dimensional simulations confine the spheres to a horizontal line across the arena. Three-dimensional simulations are more difficult to portray on a 2D computer screen; as a particle moves away from the viewer, its size shrinks and the shading on the particle shifts. In addition, you can tilt your perspective of the arena by clicking on the horizontal or the vertical ruler to activate the window area and then using the directional keys right of the keyboard. Some of the consequences of the laws of physics are slightly different depending on whether a simulation is in 1D, 2D, or 3D. You can still understand many of the important principles of three-dimensional particles by observing two-dimensional ones, but the subtle differences can be instructive.
The arena can be divided into two equal regions by clicking on the corresponding icon in the particle information area. Use this mode to show the differences between two sets of particles (red and blue), each with its distinct mass, size, or temperature. For 2D or 3D simulations, a small hole can be opened between the two regions to observe effusion or mixing. Open the hole by clicking on the icon to the right of the Divided Box with Walls icon. You can also implement a piston using adiabatic or isothermal conditions to study compressions or expansions.
Choose periodic boundary conditions in a Boltzmann 3D simulation by clicking the box with a dotted line around it in the particle information area. Periodic boundary conditions means that there are no walls around the arena. Think of identical copies of the simulation adjacent to each other on all sides. When a particle leaves through the right side of the arena, an identical particle from the copy immediately on the left enters from the left. Likewise, a particle leaving on the left is replaced by one entering from the right. Particles can also leave or enter through the arena's top or bottom. In 3D, particles can also leave and enter from the front or back; although in 1D, they can only leave and enter from the left and right. Using periodic boundary conditions eliminates the effect of walls on the system while keeping the number of particles constant. Even so, there are still subtle differences between a small system of a dozen or even a thousand particles and one with an infinite number of particles. You cannot choose a divided arena or a small opening between divided regions, or a piston while using periodic boundary conditions.
Some aspects of kinetics and equilibrium can be studied by selecting Reaction Mode in the simulation menu.
Just above the arena are two display boxes and two radio buttons. The two display boxes on the left show the average pressure and predicted pressure. The radio buttons allow you to select how the predicted pressures are calculated, i.e. using either real gas or ideal gas predictions. When the arena is divided, the two display boxes on the left show the left wall average pressure and left wall predicted pressure, and the two additional display boxes on the right show the right wall average pressure and right wall predicted pressure.
For a small number of particles with small radius, the ideal gas equation (PV = nRT in 3D, PA = nRT in 2D and PL = nRT in 1D) relates the pressure to other useful quantities. Pressure, P, is the force exerted per unit wall area for a 3D volume V, or force per unit wall length for a 2D area A or total force on the wall for a 1D length L. In all of these equations, n is the number of moles of gas, T is the absolute temperature, and R is the universal gas constant. One of the assumptions of the ideal gas law is that the volume (or area in 2D, length in 1D) occupied by the particles is negligible. If you choose Ideal predictions, all predictions will be made neglecting the volume of the particles compared to the volume of the arena. Note that units for pressure in 2D are expressed in force per unit length (Newtons per meter). Values are displayed in micro-Newtons per meter (abbreviated uN/m). In 1D, force on the wall is displayed in picoNewtons (pN), and in megapascals (MPa) in 3D.
If you select the Real predictions button, the pressure will be calculated using a more accurate formula derived from extensive theoretical calculations and computer simulations as discussed in Section V of the Boltzmann 3D manual.
Each time a particle collides with one of the walls, an instantaneous force is exerted on the wall and, conversely, by the wall on the particle. The momentum transferred over a period of time is averaged to determine the pressure exerted by these collisions. Time averaging is required because the force is infinite at the instant of a wall collision but is zero at all other times.
Each collision with the left or right wall transfers momentum 2m|vx| to the wall. In order to give a useful average over a reasonable period of time, these quantities are accumulated for the pressure averaging time, Tavg, and the sum is divided by the averaging time and displayed in the box labeled Avg. The default value for Tavg is 60 ps. Predicted pressures are to the right of the calculated time average. The predicted values may be calculated using either the ideal gas equation or a real gas law (click on the Ideal or Real radio button above the arena). Displayed pressure or pressure history during the first 60 ps after a new start will not have normal behavior. The default value of Tavg (60 ps) may be changed to another value in options under the simulation menu. A larger Tavg will give smaller fluctuations in displayed pressures, but pressures will not respond as quickly to changes in the system.
Click on Ideal to use the ideal gas law predictions or click on Real to use more accurate real gas law predictions based on computer experiments which take the non-zero size of the particles into account.
This box displays the pressure (in picoNewtons for 1D, microNewtons per meter for 2D, or megaPascals in 3D) due to collisions of particles with the left and right walls. The value displayed in this box is averaged over 60 ps of motion (or other averaging time set in options under the simulation menu). When using periodic boundary conditions, the box is labeled virial pressure, and displays the pressure calculated using the virial theorem. When the arena is divided, boxes are displayed for both left and right wall pressure.
This box displays the predicted pressure on the left and right walls (in picoNewtons in 1D, microNewtons per meter in 2D or megaPascals in 3D). This prediction can be based on the ideal gas law or a real gas law correcting for the finite size of particles. You can change between these using the Ideal/Real buttons. When the arena is divided; two predictions are displayed that depend on the number of particles on the left side of the arena. (Left number or right number boxes are displayed in the particle information area).
If you have two types of particles moving in the arena (red or blue), each type produces its own contribution to the pressure when it collides with the walls. You can see these contributions, called the partial pressure by clicking on red or blue in the statistics area. The total pressure is displayed when both is clicker.
At the top left of the window is a dynamic graph which can display any of many different plots. Use the plot selection pull down menu above the graph to change the current plot. These statistical graphs chart the behavior of the particles in the arena. The abscissa (x-coordinate) range is divided into 15 regions with colored bars indicating the number of particles in each subrange of the displayed quantity. This is called a histogram, a type of bar graph. The green vertical lines displayed on the graph represent the calculated average of the quantity displayed and the average plus or minus one width (root-mean-square deviation). The orange vertical lines show the predicted values of the average quantity and that average plus or minus one predicted width. The heights of these lines are approximately what the histogram heights would be expected to be. These values are also shown in text boxes below the plots. Plots also show a black curve indicating the predicted distribution.
Select the currently displayed plot from the Plot Selection Pull Down Menu. The available plots depend on the current dimension of simulation and the boundary mode. The possible plots and an explanation of each are listed below. You can alternatively use the + and - keys to move up and down in this menu list (keyboard or number pad).
When you click on the Restart button, all particles start with random positions and directions but with identical velocities so you begin with only one histogram bar. After a few collisions, the distribution widens out to the Maxwell-Boltzmann distribution which is shown as a black line. The quantity plotted is (vx2 + vy2+ vz2)1/2 in 3D, (vx2 + vy2)1/2 in 2D, and |vx| in 1D. The average and average plus and minus one root-mean-square deviation are shown by the green lines.
This histogram shows the average speed of each particle (total distance traveled divided by total time) since the last Restart command. The speed of a particle changes each time it has a collision with another particle. At any one time, the particles will have a wide distribution of speeds, but over a long time, the average speed of each particle can be seen to approach the same average. That is, the width of the distribution of average speeds decreases with time after the first few collisions. This is an example of a famous principle in statistical mechanics called the ergodic hypothesis.
This histogram is identical to the instantaneous speed plot except that the quantity averaged for the vertical lines and displayed values is vx2 + vy2 + vz2 in 3D, vx2 + vy2 in 2D, and vx2 in 1D, after which the square root is taken. The average squared velocity of many particles with the same mass is proportional to the temperature, so the average value of this quantity should be constant if energy is conserved. (If you have particles with different masses, however, the RMS velocity may not be exactly constant.)
At any one instant, not all particles have the same squared velocity (there is a distribution of these values), but as time increases, the width of the distribution of time-averaged squared velocity gets smaller. This is another example of the ergodic hypothesis. This distribution shows the square root of that quantity. The average should approach the RMS velocity.
Just as velocity changes in time, the kinetic energy, mv2/2, of a particle changes. This histogram shows how many particles have kinetic energy within different ranges at any instant. The predicted curve is called the Boltzmann distribution.
At any one instant, particles have a distribution of kinetic energy values. This distribution contains the time-weighted average kinetic energy for each particle. The width of the distribution of average kinetic energies should decrease with time to the average kinetic energy, yet another example of the ergodic hypothesis.
The free path is the distance traveled by particles between collisions with other particles. Collisions with walls are not considered, only collisions between two particles. The path lengths shown are paths for each particle between the next-to-most-recent collision and most recent collision. Because collisions between particles occur randomly, some particles travel a short distance and some may travel a long distance. This distribution is predicted to be an exponential distribution so the average (mean free path) and the width should be identical (see Section IV of the Boltzmann 3D manual).
This plot shows the average path between collisions for each particle separately averaged over time since the simulation started (in other words, the total distance traveled divided by the number of collisions). Only collisions between two particles are considered. As time increases, the width of the distribution should become narrower as predicted by the ergodic hypothesis.
This plot shows the time between collisions with another particle. The values are times for each particle between the next-to-most-recent collision and the most recent collision. Because collisions between particles occur randomly, some collide quickly and some may go a long time between collisions. The distribution is predicted to be an exponential distribution, so the average (also called the collision lifetime or just the lifetime) and the width should be identical (see Section IV of the Boltzmann 3D manual).
The collision rate is the number of collisions per unit time that each particle has experienced with other particles since the simulation began. Each time a collision occurs, the collision is counted twice (once for each particle) and a record kept. For long times, the distribution of collision rates has a width that decreases, yet another example of the ergodic hypothesis.
This distribution shows the probability, given the position of one particle, that another particle is at a distance r relative to what would be expected for a uniform fluid. Because of the effect of walls, this distribution is only of use when using periodic boundary conditions. Because only the nearest of several possible image particles is counted, the maximum abscissa value should be limited to half the minimum arena dimension (default). This function has a constant value for distances greater than the particle diameter for a dilute gas. At higher densities, oscillations develop that show the structure of the fluid. the ratio of the value at the particle diameter compared to that at large distances indicates by what factor the real pressure deviates from the pressure of an ideal gas at the same density.
The Maxwell-Boltzmann distribution predicts a bell-shaped curve (Gaussian or normal distribution) with an average velocity of zero for any component of velocity. The long-time average must, of course, be exactly zero because the arena is not moving, but the instantaneous average will fluctuate about zero. The width of the distribution depends on the temperature and particle mass. The y-component graph is only available in 2D and 3D simulations; the z-component graph is only available in 3D.
Only available in reaction mode, two lines show the number of red (reactant) and blue (product) particles as a function of time for the previous 150 frames of motion.
The pressures on the left wall and right wall are averaged over 60 ps of motion (unless the default is changed using options under the simulation menu), averaged and displayed. Separate left and right wall pressure graphs are available with a divided arena. If the averaging time is too short, the pressure fluctuations are inconveniently large; too long and the pressure does not respond quickly to changes made in the simulation. These graphs only display in history mode because there is no distribution to display. Predicted pressures may be calculated using either the ideal gas equation or a real gas law (click on the Ideal or Real radio button above the arena). This graph is only available when walls are present. Both the left and right wall pressure graphs are available for display if the arena is divided. These graphs are only available when walls are present.
When periodic boundary conditions are used, the pressure is calculated using a relation derived from the virial theorem. This pressure does not fluctuate as much as wall pressure because it uses all simulation data since the last Restart.
For each plot, the abscissa (x-axis) is divided into 15 equal regions (30 regions for cumulative distributions), and the number of particles with the chosen quantity falling within each region is shown as a histogram. The maximum and minimum values of the abscissa are both displayed in text boxes below the statistics plot. To change the maximum or minimum from its default value, highlight it and type a new value. If the entered maximum is less than the present minimum, the new maximum will be set to be 110% of the minimum. If the entered minimum is greater than the present maximum, the new minimum will be set to be 90% of the maximum. Each distribution has its own maximum and minimum, and these are saved in a set file.
This text box displays the theoretically predicted average quantity of the currently displayed graph. (See Section IV of the Boltzmann manual for the theory concerning each of these predictions.) You may also display the predicted width (root-mean-square deviation) of the distribution by clicking the Wid box. When predicting pressures, if you have chosen Ideal predictions, the predictions will be based on the ideal gas law, but if you have chosen Real predictions, the predictions will be corrected for the finite size of the particles. Change between the two by clicking on the Ideal or Real radio buttons in the pressure area. Predicted values are those for an infinite system unless the Include finite system corrections option is selected from the Simulation menu.
This text box displays the average of the quantity that you select, based on the simulation in the arena. If you have the Cumulative box checked, the average will be for the cumulative distribution (see below) displayed. Otherwise, the box displays the average of the currently displayed instantaneous graph. You may also display the computed width (root-mean-square deviation) of any distribution by clicking the Width box.
When the Cumulative box is checked, the displayed Average and Predicted values are for the cumulative distribution. When the Cumulative box is not checked, the displayed values are for the instantaneous distribution.The histogram normally displays information from a single instant of time. If you wish to see the cumulative distribution containing all recorded events since the simulation started, check the Cumulative box. The cumulative distribution has thirty bars rather than fifteen, and, while it shows the same type of information as the instantaneous distribution, it changes more slowly and exhibits smaller fluctuations. This feature allows you to see if the distribution of lifetimes or velocities really matches the predicted distribution. The cumulative distribution is updated each time a collision occurs and shows how often any particle possessed the chosen quantity since the histogram was zeroed. To zero the cumulative histogram, click on Restart to zero all cumulative histograms, or change the maximum or minimum of a histogram to re-zero just that one histogram. All the cumulative distributions are zeroed automatically at a time four times (or some other user chosen multiple; see options in the simulation menu) the predicted average collision time after a Restart. We do this to eliminate any values that might depend on the way initial values were chosen. You should not pay any attention to the cumulative distributions for average speed, average RMS velocity, average kinetic energy, average path, or collision rate because these distributions change with time. These are left in the program because it is faster for the computer to compute them than to be continually checking which cumulative distributions should be left out. Velocity and energy cumulative distributions are weighted by time duration with each value. Path, time, collision rate, and radial distribution function are weighted only by the number of occurrences of that value.
Click the mouse on the Width button to display the calculated and predicted distribution widths, the root-mean-square (RMS) deviation of the distribution (width(q) = Sqrt[<q 2> - <q>2], where q is any quantity, and <q> is an average over the N particles). This quantity is also called the dispersion and is approximately the standard deviation if the number of particles is large. The predicted values for some quantities (pressure, mean free path, collision time and collision rate) depend on whether you assume the particles to be an ideal or real gas. Uncheck the Width box to return to displaying the average quantities.
Check the History box to see the history of values for the most recent 150 frames for any of the quantities plotted. The predicted value is shown as a red line and one half of the predicted rms deviation (or width) is added or subtracted to get the dotted red lines and the total vertical scale is four times the predicted width. For pressures, the width is taken to be the pressure itself so the scale goes from zero to twice the predicted pressure. Viewing a history will give you an idea of how much the quantity is changing or fluctuating. There is no distribution defined for pressure or virial pressure, so if you select one of these distributions, the plot will automatically display history. Return to a distribution by unchecking the His box.
Boltzmann 3D can keep track of two different colors of particles. There are three choices for displaying distributions and averages of the simulated particles. You can display the attributes of just the Red set, just the Blue set, or Both sets. Predicted average quantities for the red and blue sets of particles and the averages calculated from the simulation can be viewed by clicking the corresponding button at the top of the Statistics Area. Number-weighted average quantities for both sets are viewed by clicking the button marked Both All particles are red at the beginning of a simulation. You cannot change the number of particles when the Red set indicator is on because all particles created after the start of the simulation are blue. Blue particles can be added by pressing the number + button, by clicking the mouse at a position where you would like to add the particle, or by typing a new number in the particle number indicator and return. If there are both red and blue particles in the arena, they can be the same, or they can differ in mass, radius, and/or initial temperature. You can have any number of red and blue particles up to a total of 999. The mass and radius of a particle remain constant, but the temperature doesn't because particles exchange energy when they collide. For example, if the blue particles have a higher temperature, in other words a higher average kinetic energy, then after many collisions (several collision lifetimes) the blue particles should cool down and the red ones should heat up. You can check this by converting from kinetic energy to temperature using KE = Mv2/2 = dRT/2 where d is the dimension (1, 2, or 3).
You control the number, mass, radius, and temperature of particles in the arena using the particle information area buttons. You can also divide the arena to see effusion and other phenomena, or activate a piston to do adiabatic or isothermal compressions or expansions.
Change the number of particles by clicking on the increase or decrease buttons to the right of the Number of Particles box or by highlighting the number in the box and typing a new number and return. The total number of particles may be in the inclusive range 0 to 999. If the particles do not conveniently fit in random positions, the number will be automatically adjusted downward. Any particles defined when Boltzmann 3D starts or when you click the Restart button are red. Additional particles added by increasing the number in this text box are blue. You may also add one blue particle at a time by clicking the mouse at any spot within the arena. Decreasing the number in the text box removes the specified number of particles from the simulation. The most recently created particles will be removed first. Note that removing particles will change the temperature of remaining particles depending on the instantaneous kinetic energy of the particles removed.
Change the mass of particles to be added afterward by clicking on the increase or decrease buttons to the right of the Mass box or by highlighting the value in the box and typing in a new value in the inclusive range 0 to 999. To change the mass of all particles, change the mass to the desired amu value and click on Restart. To add blue particles of a second mass, change the displayed mass value and either click the mouse within the arena or click the Number of Particles increase button. Any new blue particles will have the new mass and the old red particles will remain with their original mass. You may add blue particles of several different masses, but the correct averages and distributions will be predicted only if all blue particles have the same mass.
Change the radius of particles by clicking on the increase or decrease buttons to the right of the Radius box or by highlighting the value in the box and typing in a new value. The radius must be at least 0.2 nm and no greater than 20 nm. To change the radius of all particles, change the radius to the desired value and click on Restart. To add particles of a second radius, change the radius to the desired value and either click the mouse within the arena or click the Number of Particles increase button. Any new blue particles will have the new radius. You may add blue particles of several different radii, but the correct averages and distributions will be predicted correctly only if all blue particles have the same radius.
Change the temperature of particles (in degrees Kelvin) by clicking on the increase or decrease buttons to the right of the Temp box or by highlighting the value in the box and typing in a new value in the inclusive range 0 to 9999. To change the temperature of all particles, change the temperature indicator to the desired value and click on Restart. Any blue particles you add will have the same temperature as the displayed value. Add blue particles with a different temperature by changing the temperature indicator and either clicking the mouse within the arena or clicking the Number of Particles increase button. If the temperature of blue particles is different than that of the other particles, it will be forgotten as energy is shared among the particles during collisions. In the process, the average energy and temperature of all the particles will change. When you add blue particles of a different temperature, Boltzmann 3D calculates the total energy, calculates a new temperature, and alters the number in the temperature indicator to the new, actual temperature. However, when using Piston mode or Reaction Mode, the particle information area temperature indicator retains the value it has at the beginning of a simulation. In piston mode, the piston area displays its own instantaneous temperature indicator.
The arena has five boundary modes with corresponding icons in the Particle Information area. They are (from left to right): Periodic Boundaries, Box with Walls, Divided Box with Walls, Divided Box with a Hole, and Piston mode. The default mode is Box with Walls. When the Periodic Boundaries mode is selected, any particles that leave the edge of the arena come back in on the opposite end of the arena. This is particularly useful when simulating an infinite system, because there are no walls. In all other modes, the particles will bounce off the walls. In Divided Box with Walls mode, a wall is placed in the middle of the arena dividing it into two equal halves. Switching to divided mode will automatically restart the simulation with all the particles on the left side of the divider. To study effusion, switch to the Divided Box with a Hole mode. The diameter of the hole can be set in the options dialog under the simulation menu. Certain predicted values may not be correctly predicted when the arena is divided because the predictions are calculated as if the arena is not divided. Use Piston mode to do either adiabatic or isothermal compressions to see changes that take place.
The Left # box displays how many particles are in the left side of the arena. The Right # box displays how many particles are in the right side of the arena. These boxes only function when the arena is divided. The left and right wall pressure predictions are based on these numbers.
If you choose Piston mode, a new set of controls pops up below the boundary mode icons. Move the slider to the desired final volume as a fraction of the normal volume and click move piston to start a piston compressing the gas in the arena. You can either select isothermal or adiabatic conditions by checking the appropriate radio button. Adiabatic conditions mean no heat is transferred in or out of the system. A moving piston imparts an additional increment of momentum to a colliding particle. In other words, work is done by the piston in a compression, and this raises the temperature of the gas as shown by the current temperature display (the original temperature in the particle control area is left unchanged for comparison). Isothermal conditions means that energy is subtracted from the particles or added to the the particles in each wall collision to maintain a constant temperature as the piston moves. To expand the gas after a compression, reset the piston slider to a larger volume and click Move Piston again. During isothermal changes, the words "Thermostat active!"will flash below the the piston button as long as collisional kinetic energy is being adjusted to keep the temperature constant. The maximum percent change in kinetic energy for wall collisions for the thermastat can be changed in the simulation menu under options
The advanced area contains a control that displays the frame rate and a check box to initiate periodic output of averages and/or of cumulative distributions. The advanced area is hidden by default because it is not for normal use. Click the + sign by Advanced to expand it.
The Frame Rate display shows the rate of graphics display in frames per second. The goal is to display 30 frames per second. The displayed number should stay between about 27 and 33 or the motion will appear jerky and uneven. If the number is consistently below 30 and/or fluctuates widely, your graphics card and CPU are not able to do the required computation adequately. If so, you should try using fewer particles. You can also try turning off lighting under the view menu.
Click the Write averages to file box to call up a menu that will allow you to write out the desired averages to a file on your hard disk. The menu allows you to choose which averages you want saved, the name and location of the file, and the time interval between outputs. If you choose a short time interval, you will write a large file and take up a large space on your hard disk. Choosing a large interval will write a smaller file, but will lose some information about shorter time fluctuations. The file is written in *.csv (comma separated value) format and can be imported easily into Excel or other spreadsheet programs for analysis. Output of this information begins when the OK box is clicked. Output of this information stops when the Write Averages to file box is unchecked or when another change in the system is made.
Clicking the box labeled Write Averages to file will also, using the same menu, allow you to choose which cumulative distributions you wish to write out, as well as the name and location of the file. The file is written in *.csv (comma separated value) format and can be imported into Excel or other spreadsheet programs for analysis. The cumulative distributions begin to accumulate when the OK box is clicked, and the cumulative distributions are written out when the Write Averages to File box is unchecked or when another change is made to the system.
Click the Write Positions to file box to call up a menu that will allow you to write the coordinates and momenta of each particle to a file on your hard disk. The menu allows you to choose the name and location of the file and the time interval between outputs. If you choose a short time interval, you will write a large file and take up a large space on your hard disk. Choosing a large interval will write a smaller file, but will will lose some information about shorter time fluctuations. The file is written in *.csv (comma separated value) format and can be imported into Excel or other spreadsheet programs for analysis. Output of this information stops when the Write positions to file box is unchecked or when another change in the system is made. You can use the information stored in this file to investigate correlation functions or other details of the simulation.
You should check this box if you want accurate numerical values for the Radial Distribution Function when you print out RDF distributions. Checking this box forces Boltzmann 3D to sample interparticle distances at time intervals equal to half of the predicted collision lifetime (or other choice set in simulation Options). This calculation shows down the calculation of other quantities, especially at high Simulation Speed, so leave this box unchecked unless accurate written RDF data is your interest.
When Reaction Mode is checked in the Simulation menu, and energy diagram appears in the Advanced Area that controls the activation energies for forward and reverse reactions and displays the number of red (reactant) and blue (product) particles. A prediction for the equilibrium average number of product particles and the root-mean-square dispersion (width) is displayed (see Section X of the Boltzmann 3D manual for a discussion of these predictions).
The clock displays the time elapsed since the simulation began. Because atomic motion is so incredibly fast, this clock runs extremely slow. The simulation clock only advances about 1 picosecond (ps) in one second of time on your wall clock or wrist watch. The exact conversion will depend on how many particles you have in the arena, the kind of computer you use and the Simulation speed control setting you choose.
The Simulation Speed control is used to speed up the simulation to allow the system to reach equilibrium faster, to accumulate statistics rapidly, or to slow down the simulation to see smoother, more detailed motion. Click the up or down arrows next to the simulation speed text box. The default value is 1x and each successive step is twice the speed of the previous one up to 2048x. You should choose a setting that makes motion appear the best on your computer. Use high settings to accumulate cumulative averages quickly when you don't care to follow the actual motion. On high settings, the particles move so far between frames that one can no longer follow motion from one frame to the next. Alternatively, you can turn off the graphical display of particle movement altogether by simply choosing the display option under the view menu .
Use the Zoom control to adjust the magnification of the arena so it appears best in the screen resolution you use. The default magnification of 100% is one pixel equals one nm. Click on the up arrow of the Zoom control to increase the magnification of the arena shown on the screen. The magnification increases in steps of about 25% each time the arrow is clicked. If another increase in magnification would exceed the number of pixels of screen resolution, the instruction is ignored. Click on the down arrow of the Zoom control to decrease the magnification of the arena. The minimum allowed is 33%. Type a number in the box to zoom to a desired percent if you want zoom factor in between or outside the preset steps.
Each time you click on the Restart button, Boltzmann 3D starts a new simulation using the number, radius, mass, and temperature values currently displayed in the particle information area. Positions and directions for the particles are assigned randomly. All particles are red and are on the left side of a divided arena. If you want to add blue particles of a different mass or radius, you must make the necessary changes in the mass and radius labels before changing the number value.
Click on the Pause button to pause the simulation. You may make changes, examine distributions, etc. while paused. Click on the same button, which now shows a play symbol, to resume the simulation.
Click on the Advance button to move the simulation to the next frame of motion. It is only available while the simulation is paused.
Click on the Reverse button to reverse the direction of all particles. The clock will continue to move in the forward direction, but the motion will retrace the previous motion backwards (as well as it can be done).
Click on Load to display the standard open dialog box. Only files with the extension *.set may be loaded and will be shown in the list. Click on the file you want to load and then click open. This loads the chosen *.set file with saved attributes. Some example demonstration files are provided with Boltzmann 3D, and described in Section XII of the Boltzmann 3D manual, and used in Suggestions for Exploring Kinetic Theory. Others may be generated using the Save menu item. A saved file named default.set will be loaded when the program is started. You can save files with your personal preferences in this file, as well as in any of the saved files.
Click on Save to create special sets of conditions for classroom demonstrations, student assignments or experiments. Then to re-create the simulation, load the appropriate initial value file. To create a file of initial values, click on the Save menu item, and choose the complete or basic option. The basic option stores the following quantities to the file: temperature, number, radius, and mass of both red and blue particles, distribution maxima and minima (all of them), selected boundary mode, which distribution is shown first, color scheme, lighting type, dimension (and 3D viewing angle), hole diameter, arena size, pressure averaging time, forget time, zoom factor, simulation speed, pressure prediction choice (real or ideal), piston speed and thermostat damping factor, and whether or not cumulative, width, Maxwell demon mode, reaction mode, trajectory trace mode or pause is selected. Positions and velocities are then assigned randomly upon Loading. If the arena is divided, red particles will appear on the left and blue on the right when Loaded. The complete option will also save the individual particle position and velocities to enable the same simulation to be observed repeatedly. Use the complete option to begin a simulation with red and blue particles both on the left of a divided arena. After choosing an option for saving, enter the name of the file (the *.set extension is automatically appended) on the save dialog box and click the save box.
Click on Exit under the File menu to exit the program.
Click on Color scheme to change the appearance of Boltzmann 3D. Click on dark background for a 2D simulation with black arena background. Click on light background for a 2D simulation with white arena background and gray walls. In both background choices, the balls will be red for the first set of particles and blue for the second set. Default colors in 3D are gold for right and front walls and neutral beige for the others. Click on custom to choose your own colors for background, walls, divider, and particles.
Check lighting to toggle shading of the particles on and off in 2D simulations. With shading off, you will have higher contrast and motion may be faster and smoother, particularly if shading is done by your CPU rather than your video card. This option is not active in 3D because it lacks depth perception.
Check Display to toggle the drawing of motion in the arena on and off. You can turn off display of motion if you want to accumulate averages or cumulative distributions without watching the associated motion.
Check Color by Speed to color each particle according to its speed. Check Color by KE to color each particle according to its kinetic energy. Particles with high values will br red; particles with low values will be blue; and particles with intermediate values will be green, yellow, orange, etc. When the Instantaneous Speed distribution is chosen under color by speed, the histogram bars will be colored with the same colors as the particles in the corresponding speed ranges. When the kinetic energy distribution is chosen under color by KE, the histogram bars will be colored with the same colors as he particles in the corresponding kinetic energy ranges. These colors can be controlled by resetting the maximum and minimum of the plot. Any particle wih a value lower than the minimum will be dark blue. Any particle with a value higher than the maximum will be dark red.
Click this option to have Boltzmann 3D trace out the path of the center of each particle rather than draw the instantaneous position of the particle as it moves. The path is indicated by a square dot for each frame. The color of the dot is the same as the color of the particle. The distance between rajectory points is proportional to the speed of the particle.
Click this option to enter the size of dots drawn in trajectory trace mode. The default is 2 pixels. Any integer number from 1 to 20 is allowed.
Click this option to clear all points drawn in trajectory trace mode.
Click on Dimension to choose a 1D simulation that places particles horizontally across the arena, a 2D simulation that allows particles to move both horizontally and vertically in the visible arena, or a 3D simulation with perspective and shading to show depth. Arena size for 1D or 2D simulations can be adjusted by dragging the lower-right corner of the Boltzmann 3D window using the mouse. Arena size in all three dimensions can be set using the options menu tab under the simulation menu.
Check Include Finite System Corrections to calculate predictions for pressure and plotted distributions, averages, and widths using any known corrections for a finite system. The default mode is to calculate predictions based on an infinite system. See the Boltzmann 3D manual Section IX.
Use this option to pretend to be a Maxwell demon, a fictitious microscopic creature imagined by James Clerk Maxwell to decrease the entropy of a system by opening a hole in a wall to allow fast particles to escape but closing it to prevent slow particles from escaping. When clicked with a Divided Box with Walls or Divided Box with a Hole boundary mode, the hole may be opened or closed repeatedly by clicking either button. This option is the closest thing to a video game offered by Boltzmann 3D. Starting with particles on the left side, see if you can arrange a system with particles at an average energy on the right hand side three or more times that in the left hand side. It requires patience and quick mouse work. Hint: use Color by Speed or Color by KE so you can tell which particles have high energy. If the edge of a particle overlaps the wall as it closes, that particle is allowed to move as if the hole had not closed until it clears the wall.
This mode opens a diagram in the Advanced Area where you can enter two values, the activation energy for reaction from red to blue and the activation energy for reaction from blue to red. The difference, Ear – Eab= ΔE, is the potential energy difference for a reaction that converts to red particles to blue particles. The default values are Ear = 2 kJ/mol and Eab = 4 kJ/mol. If two red particles collide with relative kinetic energy projected along the line connecting their centers greater than Ear, they change to two blue particles of the same size, and their kinetic energy is reduced by ΔE. If two blue particles collide with their relative kinetic energy projected along the line connecting their centers greater than Eab, they change to two red particles, and their kinetic energy is increased by ΔE. This mode can be used to study reaction kinetics of bimolecular reactions or equilibrium. Activation energy values can be set by the user. The current numbers of red and blue particles are displayed below the energy diagram as well as the time averaged number of blue particles and root-mean-square deviation (width) and the predicted equilibrium number and width.
Use Options to set several simulation parameters. These include hole diameter for divided arenas, arena size, averaging time for wall pressure calculations, forget time, RDF update frequency, and piston control parameters. Horizontal and vertical arena size may also be adjusted by dragging the lower right corner using the mouse. The forget time option controls the equilibration time before cumulative distributions are set to zero to allow non-equilibrium initial conditions to be forgotten. The default value is 4 times the predicted collision time. It can be set by the user to any multiple of the predicted collision time. When this time is reached in any simulation, the cumulative distributions for all quantities are cleared, and accumulation of data begins anew. The RDF update frequency is the time interval between sampling of interparticle distances. The default value is half the predicted collision time, but it can be set to any desired multiple. The piston speed option lets you adjust how fast the piston moves during a compression or expansion. A slower speed will give better agreement with theoretical predictions for the final temoperature in an adiabatic expansion or compression. The damping factor option controls how much of a particle's kinetic energy perpendicular to the wall surface will be lost or gained in a wall collision when the average kinetic energy of the gas is above or below the temperature of the surroundings in an isothermal expansion. This parameter controls how quickly the thermostat functions in maintaining isothermal conditions.
When using periodic boundary conditions, use the Set Total Momentum option to adjust the total momentum in 1D, 2D or 3D. After random assignment of particle velocities, the total momentum of the particles is, by default, be set to zero. Zeroing the total momentum is accomplished by shifting and rescaling individual particle momenta while preserving the total kinetic energy. The user can set the total momentum to a non-zero value to study a system with an overall drift rate. You can set the total momentum to have a non-zero value in any coordinate direction you wish, but many of the predictions assume a frame of reference that is not drifting.
The About menu option displays information about Boltzmann 3D including the Boltzmann 3D version number and the Java and OpenGL graphics libraries it uses.
The Help menu option brings up the help file for Boltzmann 3D (this document) in your default browser program. While using the help menu, the current simulation will continue to run.
The Quick Start menu option brings up the Quick Start and Troubleshooting Guide for Boltzmann 3D, a brief series of questions and pointers for those using Boltzmann 3D the first time.
The Update menu option opens your default browser to the Boltzmann 3D website to allow you to check for newer versions of Boltzmann 3D.
This link connects to the full Boltzmann 3D manual in pdf format, including theory, formulas, and suggestions for Boltzmann 3D in education and research. The manual includes theory, formulas and suggestions for using Boltzmann 3D in education and research.
Each one of the following suggestions could be used as an in-class demonstration, a hands-on laboratory assignment or any other type of exercise.
Start a simulation with the Instantaneous Speed plot visible. Note that all speeds are the same to start. While you watch, the histogram broadens out to the shape of the Maxwell-Boltzmann distribution shown by the black line. Compare the velocity distribution for particles of different mass and at different temperatures. Compare the difference between 2D and 3D motion. Sample file examples: 3Dhyd100.set, 3Dhyd1000.set, 3Doxy100.set, 3Doxy1000.set, 2Dhyd100.set, 2Dhyd1000.set, 2Doxy100.set, 2Doxy1000.set
Questions for exploration:
- Does the Instantaneous Speed histogram look more like the Maxwell-Boltzmann distribution if you have more particles in the simulation? Why or why not? (Compare with 30 vs. 480 particles)
- How long does it take for the Instantaneous Speed distribution to become like the Maxwell-Boltzmann distribution? Try changing the temperature, the number of particles, mass and/or the radius to see how these variables change your answer. Is the time required just a multiple of the average number of collisions? (To find the time per collision, look at the collision time plot.)
- How does the average speed change with temperature? With mass? With radius? With number of particles? Molecular kinetic theory predicts that the average speed should be proportional to the square root of temperature, inversely proportional to the square root of mass, and unaffected by radius or number of particles. Try some changes and see if the predictions of molecular kinetic theory (predicted numbers and orange lines) agree with the actual simulation (average numbers and green lines). Sample file: 3D mixture.set
- The RMS speed is always higher than the average speed (about 25% in 1D, about 13% in 2D, and about 8.5% in 3D). Can you explain why these two quantities are different? (Formulas are given in Section IV of the Boltzmann 3D manual, but can you explain why?.)
How does the pressure change when you change the volume of a gas while keeping the temperature constant? Start a 2D simulation with about 50 particles of radius 0.5 nm with T = 300 K. Note the wall pressure. You can set the pressure averaging time to a large value like 200 ps to suppress fluctuations (use the options item under the simulation menu). Then resize the arena by dragging with the mouse on the lower-right corner. Has the pressure changed?
A second method to study Boyle's law is to use an isothermal compression using the piston controls. Note the pressure before and after a compression. Compute PA (PV in 3D or PL in 1D) before and after. Are they the same? Plot the pressure versus the volume.
Questions for exploration:
- Can you explain why the pressure increases when the volume decreases? Hint: Watch the frequency of collisions.
- The 2D analogue of Boyle's Law is that PA should be constant (at constant T). Using the pressures you noted and the area of the arena from the length and heights read from the axis labels (or the more accurate values found under the options item of the simulation menu), do you get the same value for PA before and after resizing? If not, how big is the deviation?
- Repeat the experiment using particles of different mass and radius but the same temperature. Does the pressure depend on the mass or size? Why or why not?
- Perform isothermal compressions in small increments in piston mode. Record the pressure at several volume increments and check to see if PA is constant.
How does the pressure of a gas change when you change the temperature? Start a simulation with about 30 particles of radius 0.5 nm at 300 K in a divided arena. Now change the temperature to 1200 K and use the mouse to drop the same number of the same size particles in the right half of the arena. What are the left and right pressures? Sample file: 3Dhotcold.set.
Questions for Exploration:
- Why is the pressure higher for the hotter gas? Hint: Compare the speed of the particles when they collide with the wall and the frequency of these collisions.
- Repeat the same experiment with blue particles of different mass or size (but not too big). Does your conclusion depend on mass or size?
- Repeat the experiment using a number of different temperatures and plot the pressure versus temperature. At what temperature does the pressure extrapolate to zero pressure?
- What does absolute zero (0 K) physically mean about the motion of particles?
How does the volume of a gas depend on it's temperature with the pressure held constant? Start a simulation of 50 to 100 particles of radius 0.5 nm (keep the radius small to limit non-ideality corrections) at 300 K and note the pressure. Now set the temperature to 150 K and click Restart. You will note that the pressure has decreased, in accordance with the conclusions of Amonton's Law. Now, resize the arena using the boxes under the options tab in the simulation menu by multiplying the length in one direction by 1/2. Is the pressure the same as the original pressure?
Questions for Exploration:
- Repeat the experiment for several different temperatures and plot the volumes against temperature. Does the volume extrapolate to zero as T approaches 0 K?
- Contrary to Charles' Law, volume does not go to zero because the volume of the particles is not zero. To what volume does the extrapolation to 0 K approach?
Start a simulation with 40 to 50 particles of radius 0.5 nm and T = 300 K. Then click on the Box with Walls icon so the red particles are on the left-hand side. Now click with the mouse on the empty right-hand side of the arena until you have just half the number of blue particles as red particles. Compare the pressure on the two sides. Sample file: 3Dpresnum.set
Questions for Exploration
- Is the pressure in the right side exactly half of what it is in the left side? If not, why not?
- What is the physical reason pressure is proportional to the number of particles? Hint: Compare the frequency of wall collisions.
Does the pressure predicted by the ideal gas equation agree with the pressure calculated in the simulation? If not, why not? The ideal gas equation is PV = nRT in 3D, PA = nRT in 2D and PL = nRT in 1D. Here, n is the number of moles of gas, R is the gas constant, T is the absolute temperature (in Kelvin), V is the 3D volume, A is the 2D area, and L is the 1D length.
Questions for exploration
- How does the deviation from ideal gas behavior depend on the number of particles? On the radius of the particles? On the temperature? On the mass of the particles? (See Section V of the Boltzmann 3D manual for some theoretical predictions.)
- How would the pressure be affected if the particles attracted each other?
Divide the arena by clicking the Divided Box with Walls icon. Then click Restart. Now all the balls are in the left side. Change the mass and radius to different values and drop some blue particles into the left side until you have about the same number of blue ones as red ones. Now click the Divided Box with a Hole icon. Watch and see if the heavier particles take longer to get out. One way to do this would be to wait until about one fourth of the lighter ones have escaped and compare one fourth with the fraction of heavier ones that have escaped. Sample files: 3Deffuse.set, 2Deffuse.set
Questions for exploration
- Using two separate experiments, measure the rate of effusion by timing how long it takes one fourth of the particles of two different masses that differ by a factor of four to escape. Does it take twice as long for the heavier particles? What would Graham's law predict?
- Why can't you wait until all the particles have escaped in the first question?
Using the mouse, place 24 particles of radius 1 nm all in the lower left corner of the arena while the temperature gauge reads 0 K (make sure temperature reads zero before you place each particle). The particles should remain motionless. Then set the temperature box to read 9999 K and drop one blue particle in the upper right of the arena and see what happens. This initial state is very ordered, with the positions of the first 24 particles in one small region and the kinetic energy all concentrated in the last particle. Because entropy is a measure of disorder, the initial state has low entropy. The laws of probability say that it is much more likely for the positions to be spread over the whole arena and the kinetic energy to be shared equally among all the particles. This would be a higher entropy state. Sample files: 3Dentropy.set, 2Dentropy.set
Questions for Exploration:
- Does the simulation lead from the low entropy state to one of higher entropy? Why?
- After the first collision, how long does it take to reach a more-or-less final entropy equilibrium with particles spread over the arena and a velocity distribution of 400 K?
- Suppose you started your simulation with particles in random positions and with random velocities. How likely is it that you will come to a point where all 25 particles are in the lower left quarter of the arena? Can you estimate the probability?
To see a good approximation of the motion of a dust particle, for example, start a simulation with one large particle (about 200 amu) with radius 20 nm. Then change the radius indicator to 0.2 nm, mass indicator to 2 amu, and finally the number indicator to 200, to add many small blue particles. Sample files: 3Dbrownian.set, 2Dbrownian.set
Questions for exploration
- Does the red particle appear to stagger around due to random bombardment by small particles from all sides?
- Does the motion of the red particle qualitatively change if it is only half as heavy (100 amu)?
Start a simulation with 50 to 100 red particles and add one more identical particle (but blue) by clicking the mouse in the arena. Just sit back and watch the blue particle move. Sample files: 3Ddiffuse.set, 2Ddiffuse.set, 2Dliquid.set
Questions for Exploration:
- Does the blue particle eventually wander around throughout the arena? Does it go fast sometimes and slow other times?
- Is the velocity distribution of the blue particle as shown by its cumulative distribution the same as for the other particles? Is its average velocity the same as the other particles?
- What about mean free path and collision rate?
Start a simulation with about 50 red particles with a temperature of 300 K. Check the RMS velocity and/or kinetic energy of these particles. Press Pause and add 20 or 30 identical blue particles with a temperature of 1200 K (this means they have a velocity twice as great as the RMS velocity of the other particles). Now press Pause again to continue. Watch the average velocity of the blue particles decrease as they cool to the average temperature of the red particles. Sample files: 3Dhotcold.set, 2Dhotcold.set.
Questions for exploration:
- How long does it take the blue particles to cool? Express your answer as a multiple of the mean collision time.
- Does the temperature or average kinetic energy of the red particles change from its initial value as the blue particles cool? Why? Can you predict the final RMS average velocity of the red and blue particles? Are they the same?
- Do your answers to the first two questions change if you start with a divided arena with the red particles on the left and the blue ones on the right and then remove the division?
Start a simulation with about 30 to 50 large, heavy particles (e.g. m = 100 amu and r = 0.8 nm), then add 30 to 50 small, light, blue particles (e.g. m = 10 amu, r = 0.4 nm). After a while, compare the velocity distributions of the two sets of particles by clicking back and forth between the Red and Blue buttons. You should find that the heavy particles have a lower average velocity than the light particles. Then, compare the kinetic energy distributions of the two sets of particles. Except for statistical fluctuations, the two sets should have the same average and the same distribution. Sample files: 3Dmixture.set, 2Dmixure.set
Questions for exploration
- Is the average kinetic energy proportional to temperature? If so, what is the proportionality constant? Does the proportionality constant depend on dimension.
- Try the same experiment changing the mass or the radius, but not both. Do you get the same results?
- Can you guess why average kinetic energy should behave the way it does? See Section IV of the Boltzmann 3D manual for a brief explanation.
Click on Reaction mode in the simulation mode and look at the energy diagram in the Advanced Area. When two red particles collide with high relative velocity, they can change into blue particles with the loss of kinetic energy. When this happens, the temperature changes because kinetic energy decreases. Two blue particles can collide and change back to red particles and release the energy again. After a long time, equilibrium will develop between red and blue particles. Sample file: 2Dequil.set
Questions for exploration
- Should there be more blue particles or red particles at equilibrium if energy is absorbed when red particles change to blue particles? Why?
- Increase ΔE by typing in a larger number for the activation energy from red to blue. Does that increase or decrease the average number of blue particles? Why? How does the ratio of blue particles to red particles depend on ΔE?
- How does the average number of blue particles depend on the activation energy for the forward and reverse reactions without changing ΔE? [Theory predicts it should not, although the rate of approach to equilibrium does (see bimolecular kinetics below.]
Click on the Piston icon and select the adiabatic button. Then move the slider to a desired final volume measured as a fraction of the initial volume. Now click move piston to start the compression. The piston does work on the system by transferring energy to colliding particles. The system is considered to be insulated from the surroundings, so the extra energy raises the temperature of the gas.
Questions for exploration
- Why does the temperature go up when you compress a gas? [Use the law of conservation of energy]
- Can you predict the final temperature of the gas as a function of the final volume? [See Section XI of the Boltzmann 3D manual for some ideas]
- When you expand back to the initial volume in a second adiabatic expnsion, why is the final temperature not the same as the initial temperature?
- For a given final volume, does the final temperature depend on the speed of piston motion (set in options)?
- For a given final volume, does the final temperature depend on the number of particles?
Create a mixture of red and blue particles. You can coose the number, mass and radius of each. Click both and read the pressure. Now click red and read the pressure. Then click blue and read the pressure. How are these pressures related? Try this with different mixtures of red and blue particles.
Questions for exploration
- Is the total pressure the sum of the red partial pressure and the blue partial pressure? Why?
- How does the computer know how much pressure is due to each color of particles if the pressure has to be averaged overa long time involving many wall collisions?
Start a simulations with 100 to 200 particles at 300 K. Choose reaction mode from the simulation menu. Use 10 KJ/mol for both Ear and Eab. Select suppress reverse reaction in the advanced area to only allow reaction from red to blue, not the reverse reaction from blue to red. The rate of a reaction is the reciprocal of the length of time it takes for a given number of product particles to form. Observe how long it takes for 10 particles (or some other fixed number) to turn blue. Then try it again when you change the number of particles, particle radius, particle mass, temperature, and the activation energy. Repeat each simulation several times and calculate the average.
Questions for exploration
- How much longer does it take for 10 blue particles to form if the starting number of particles is 100 compared to starting with 200 particles? Why? [Theory predicts a factor of 4]
- How much longer does it take for 10 blue particles to form if the radius is increased by a factor of 2? Why? [Theory predicts a factor of 4 in 3D and a factor of 2 in 2D]
- How much longer does it take for 10 blue particles to form if the mass is increased by a factor of 2? Why? [Theory predicts a factor of 2-1/2]
- How much longer does it take for 10 blue particles to form if the temperature is increased by a factor of 2? Why? [Theory prdeicts the logarithm of the time should be a linear function of the reciprocal of the temperature with slope Ear/R]
Boltzmann 3D was named after the Austrian physicist Ludwig Boltzmann (1844-1906) who worked out much of the theory of entropy and statistical mechanics. The Boltzmann distribution for energy and the Maxwell-Boltzmann distribution for velocity both carry his name. Boltzmann also developed an equation, named in his honor, to describe the approach of a system to equilibrium. However, he is most famous for his definition of entropy in terms of the logarithm of the number of microstates. This equation is carved on his tomb and is written S = klnW, where S is entropy, W is the number of accessible microstates, and k is the proportionality constant, now called Boltzmann's constant, which depends on the units of entropy. A picture of Boltzmann's tomb is included in the program documentation courtesy of Tom Schneider (NIH). The universal gas constant, R, is just Avogadro's number times Boltzmann's constant. Thus, Boltzmann's constant is the gas constant per molecule.
The best way to make the simulation run faster is to adjust the simulation speed control until it looks the best on your computer. You can also make the program appear faster by decreasing the number of particles, decreasing their mass, and increasing the temperature. Another way is to get a faster computer.
Because updating and redrawing the screen is quite computer intensive, another way to make the simulation run faster is to turn off the display option. This choice omits the display of particles on the screen. If you are interested in computing long-time averages rather than watching the corresponding motion, you can use this option. Even so, compared to the actual motion of particles, the simulation is slowed down by an incredible factor of something like 1012.
It may be that you have the red button depressed. Since any new particles added after a restart are blue, changing the number of red particles is not allowed. Click on either the Both or Blue button and add blue particles of the desired size and mass. Then, if you want them all to be red, hit restart. Alternatively, if the particles are densely packed, there may not be enough space for another randomly positioned particle. In that case, you can try enlarging the arena, using smaller particles, or try entering the particles at prescribed positions using a saved *.set file.
Phone or post inquires to Randy Shirts, Department of Chemistry and Biochemistry, Brigham Young University, Provo, UT 84602, 801-422-4290, or email firstname.lastname@example.org. Most of the problems have occurred in downloading and getting the program to run. These errors are usually a result of incompatibilities between video cards and drivers and the Java language used in the program. See the troubleshooting guide for known fixes. We try our best to get around these differences but make no guarantees. Suggestions for improvement or added functionality, examples of saved demonstrations, examples of laboratory exercise worksheets and stories of how you used Boltzmann 3D are all welcome. We want you to be satisfied -- or your money back!
Using initial particle positions and velocities, can you predict what will happen a long time in the future?
No! Hard disk motion simulated in Boltzmann 3D hs been mathematically proven to be chaotic. Even infinitesimal changes in the initial position of a particle will result in enormous effects after a few collisions. This sensitivity to initial conditions or to small changes is called chaos. For example, if we were able to calculate the paths of 100 particles with a radius of 0.4 nm and a mean free path of 8 nm exactly, and do two calculations side-by-side in two identical halves of the arena with one initial position changed by 10-10 nm on one side (less than 0.001 of the radius of the nucleus!) compared to the other side, the simulations would look the same for a period of time less than several multiples of the average collision lifetime. Slowly, differences would start to be noticeable until after approximately 9 or 10 collision lifetimes, they would be completely different. The differences between the two simulations grow exponentially because the convex particle edges magnify any difference in position when a collision occurs. Chaos becomes noticeable sooner if you have more particles (because there are more collisions), but even with only a few particles, the motion is unpredictable after a small number of collisions and about 1 ns of simulation time. See Section VI of the Boltzmann 3D manual for a brief mathematical derivation of these concepts. Sample file equal.set has 20 particles in each half of a divided arena. The initial conditions are identical for each set, but differences in the round-off error between the computations for the two halves result in visibly different motions beginning by 90 ps of elapsed simulation time.
Quantum effects become important for distances comparable to the deBroglie wavelength of the particle. This effect is biggest for light particles which are moving slowly. Even for particles of mass 1 amu moving at a typical speed at a temperature of 1K, the deBroglie wavelength is only one tenth of the length of the arena. This means that the typical kinetic energy of a particle in this extreme case is about 400 times the zero-point energy of the system. Even in this case, quantum effects would be small. For more typical particles at more typical temperatures, quantum effects are quite negligible.
The internal calculations are done to about fourteen decimal places of accuracy. You can check the conservation of energy by simulating one type of molecule for a long time and looking at values of the RMS velocity or kinetic energy. In a typical test, the kinetic energy changes by a relative error of 5x10-14 in several microseconds of simulation time.
The histogram bars are scaled so the maximum height of any bar is the full height of the graph field. The predicted distribution is also scaled so its maximum value in the included range is full height of the graph. This method is usually satisfactory.
Most research-level simulations of atomic-size particles use periodic boundary conditions. This means that when a particle leaves one edge of the arena, it reappears at the opposite edge with the same velocity. This method has several advantages in modeling bulk gas and liquid behavior. The primary advantage is that there are no walls, so no wall collisions take place. Consequently, the walls do not influence the properties of the gas. In a simulation with walls, for example, a large fraction of the particles are near at least one wall. This proximity can change some of the properties of the gas, especially at high density. Most beginning students can understand the motion of particles in a box simulation where particles impact with walls easier than in one where particles leave one side of the arena and appear at the other side. Pressure, as a property arising from wall collisions, is also easier to understand in a "box simulation."
No. Attractive forces, which are the primary cause of phase transitions, are not included in the motion of the particles in Boltzmann 3D. Java is too slow to include realistic attractive forces in a real-time visualization. Look for a future program written in C to visualize particles interacting with a Lennard-Jones potential.
From your choice of mass, m, and temperature, T, all of the initial velocities are chosen as v = (dRT/m)1/2, where d is the dimension. This way each particle has a kinetic energy, mv2/2 equal to the average value of dRT/2. In fact, the definition of temperature is twice the average value of kinetic energy divided by dR. In other words, each dimension must have average kinetic energy RT/2 (a principle called equipartition). The initial direction of motion and position are determined randomly using a random number generator.
In 1994, long before Boltzmann 3D was written, Dr. Shirts produced a two-dimensional DOS program called MotionBYU to help chemistry and physics students at BYU visualize the distribution of molecular velocities. MotionBYU was programmed in TurboPascal by David L. Summers, an undergraduate electrical engineering student with game programming experience, and may have been the first program to perform real-time simulations of particle motion on emerging Intel 486 computers that made such simulations possible for the first time. MotionBYU was rewritten in C++ by David Summers as a Windows program and renamed Boltzmann. Boltzmann was commercially distributed by Trinity Software until the current version, Boltzmann 3D was written. Boltzmann 3D was written by Scott R. Burt, an undergraduate chemistry major, and Benjamin J. Lemmon, an undergraduate computer science major, during the summer of 2004. The major improvements for Boltzmann 3D are that it is programmed in Java using OpenGL so as to be portable to other platforms besides Windows, the addition of 1D and 3D simulations, and an improved user interface. Some of the design for the user interface was developed by the Center for Instructional Design at Brigham Young University.
Heat:Hot, as _____:Cold
a poem by Roald Hoffman (used by permission)
from: Roald Hoffmann and Vivian Torrance
Chemistry Imagined, Reflections on Science
Smithsonian Institution Press: Washington, D.C., 1993, p. 46.
they're there, they're
at it all the time, it's jai
alai on the hot molecular fronton-
a bounce off walls onto the packed aleatory
dance floor where sideswipes are medium of exchange,
momentum trades sealed in swift carom sequences,
or just that quick kick in the rear, the haphaz-
ard locomotion of the warm, warm world.
But spring nights grow cold in Ithaca;
the containing walls, glass or metal,
are a jagged rough rut of tethered
masses, still vibrant, but now
retarding, in each collision,
the cooling molecules.
There, they're there,
Last updated 6 June 2013