MAPLE/Mathematica/Spreadsheet Resources

For a start ...
  • rotsteps- for molecular rotations, evaluate exp(-E/kT), plot over a range of T
  • vander - plot isotherms of a van der Waals fluid
  • cycle1 - calculate and plot p-V diagram of 'ideal' thermodynamic engine
And then ...

Statistical (mostly distinguishable harmonic oscillators)

  • combin1 - 'derive' number of ways to put n things in N boxes
  • statme1 - find entropy of N oscillators by varying n energy units
  • match - match statistical calc to the einstein model of a solid
  • comb2osc - freeze out a degree of freedom at low temperature
  • degfree4 - Einstein model plots Cv in freezing out degrees of freedom
  • chempot - find the chemical potential of a group of oscillators

van der Waals fluid

  • vdwcrit - critical p, v, T of vdw fluid
  • vander - plot isotherms of vdw and ideal gases
  • jthom - Explore the joule-thomson effect. When does He cool on expansion?

Maxwell velocity distribution

    maxwell - plot distribution, find most probable speed, average speed, etc.

Boltzmann distribution

    rotsteps - evaluate ratios of molecules in rotational excited states to those
    in the ground state


(statme1.xls) (spreadsheet version of match.ms)

Statistical Mechanics Exercise (from statme1.xls)

Bose - Einstein statistics deals with the number of ways w of putting N indistinguishable "things" into g distinguishable "boxes". One possible application of these statistics would be the case of an "Einstein solid", a system of N identical quantum harmonic oscillators (N/3 atoms each oscillating in three directions). If one takes the viewpoint that the system contains n indistinguish- able energy quanta to be given to N distinguishable oscillators, then B-E statistics may be applied to this case. The number of ways of giving n (indistinguishable) quanta to N (distinguishable) oscillators is: w = [(n + N - 1)!] / [n!(N - 1)!]

For example, if there were only two energy quanta to give to three oscillators, then n = 2, N = 3, and w = 6 as shown below.

Oscillator A B C
No. of Quanta 2 0 0
0 2 0
0 0 2
1 1 0
1 0 1
0 1 1

The total number of  ways (multiplicity) is six .

Suppose we have two Einstein solids in thermal contact and suppose system #1 has 200 oscillators, #2 has 300 oscillators, and 100 energy quanta are shared between them. Excel or QuattroPro may be used to set up a table in which columns of data include n1 (the number of quanta assigned to system #1), w1 (the number of ways of giving n1 quanta to N1 oscillators), n2 (the number of quanta assigned to system #2), w2 (the number of ways of giving n2 quanta to N2 oscillators), wtotal = w1*w2 (the total multiplicity of the two systems), and S = ln(wtotal) (a number proportional to the entropy of this particular macrostate). [The most probable arrangement is of course the "equilibrium" distribution (the one with the highest entropy).]

Suppose we now look at one of these Einstein solids, the one that has 200 oscillators (n=100 still). We make a table showing n1, w1, and S1=ln(w1), but note that in changing from one macrostate to the next the total energy of the system has been changed by one quanta (heat in or out). Since the heat input or output dQ (=dU) is temperature T times the change in entropy dS, the temperature associated with a particular macrostate may be taken as (approximately) the change dU in energy between that macrostate and the next, divided by the change dS in entropy. Also, the heat capacity can be caculated by noting that it is the energy change dU between adjacent macrostates divided by the temperature change dT . In the following table, the energy change between one row and the next is one energy unit so T = 1/dS and heat capacity is calculated per oscillator [C = (dU/dT)/N] . The last column calculates, for comparison purposes, the Einstein heat capacity function T^(-2)*exp(1/T)/(exp(1/T)-1)^(-2)

The first graph shows how the temperature of system #1 changes as additional energy units are added. The second graph shows how the heat capacity changes with temperature. Note in the latter graph how the heat capacity falls off as the temperature is lowered, as it should in the Einstein model.

Download statme1.xls [Use 'Save File']