# 8.5: Some Comments on Partition Functions

The topics we discuss in this section are

- Divergence of partition functions.
- Metals and nonmetals.
- Product of partition functions.
- Particles in a box.

### i. Divergence of Partition Functions

We can perhaps start by computing the partition function of atomic hydrogen. We have seen that each "level" (technically each *shell*) of hydrogen is actually a group of several terms, and that the total number of states in the shell - i.e. its statistical weight - is \(2n^2\). See section 7.16. If we include nuclear spin, the statistical weight of each shell is actually \(4n^2\) for ordinary hydrogen and \(6n^2\) for deuterium. However, as agreed in section 8.4, we need not be concerned with nuclear spin, and we can take the statistical weight of each shell to be \(2n^2\). The energy levels are given by equation 7.4.8:

\[E = \text{const.} \times \left( 1 - \frac{1}{n^2} \right), \label{8.5.1}\]

but how many "levels" are there? That is, what is the upper limit \(m\) of the sum in the partition function? Our first response is that there are an infinite number of energy levels converging towards the ionization limit at \(13.6 \ \text{eV}\). The same is true of other atoms; they, too, have infinite series of Rydberg levels. Evidently to calculate the partition function, we have to sum an infinite series, in this case, the series being

\[\sum_{n=1}^\infty 2n^2 \exp \left[ - \left( 1 - \frac{1}{n^2} \right) / (kT) \right]. \label{8.5.2}\]

We can take anything that does not contain \(n\) outside the summation symbol and absorb it in the constant, and so we have to evaluate the sum

\[\sum_1^\infty n^2 \exp \left( \frac{1}{n^2kT} \right) . \label{8.5.3}\]

Now we all remember that there are several tests to determine whether or not a series converges, and that, during an exam, all the tests that we remember fail, and the one test that we need is the one and only test that we cannot remember or never understood. Here is our chance now - Determine whether the above series converges or diverges!

I'll let you pause for a while you do that.

Darn it! The series diverges! The partition function is infinite! Although the uppermost "levels" have a high excitation potential and therefore cannot individually have high occupation numbers, there is an infinite number of them. The atoms are partitioned among an infinite number of levels, and the probability of any individual level being occupied approaches zero! Disaster!

This is a difficult subject, and not one in which I can claim much expertise, but a qualitative explanation goes something like this. The Coulomb potential of an isolated electric charge (in the present case we are thinking of the hydrogen nucleus; for heavier atoms we are thinking of the atom less the outermost, optical electron) is hyperbolic, approaching the ionization limit asymptotically, becoming horizontal as \(r \rightarrow \infty\) if you draw a graph of the potential. In a partially ionized gas (which includes all stellar atmospheres) there are numerous charged particles - electrons and ions, and they all interact with one another. If two charged particles approach each other, the electric potential in the space between them becomes slightly lowered beneath the theoretical zero potential for an isolated charge. This is all one needs to resolve the difficulty. The ionization potential is lowered just a little (the exact amount will depend on the density of charged particles) and this eliminates the infinite number of Rydberg levels just beneath the ionization limit. There remains then a finite number of levels, and a finite number of terms in the partition function.

We do not, for our present purpose, necessarily need to know the exact amount of the lowering of the ionization potential, or how many "levels" remain, because we soon find that after the first few levels, the occupation numbers rapidly decrease and do not contribute much to the partition function. Where we choose to terminate the summation depends on the temperature and the precision we hope to achieve. Try calculating, for example, \(\exp (−E/(kT))\) for \(E = 10 \ \text{eV}\) and \(T = 20,000 \ \text{K}\). This should give you some idea.

Here is another insightful semiclassical guide. Consider the electron orbits in a Bohr model of the hydrogen atom. The radii of the orbits increase as \(n^2\). There comes a time when this radius becomes comparable to the average nearest-neighbour distance between atoms. If we assume an ideal gas equation of state, \(P = NkT\) , where \(N\) is the number of atoms per unit volume, we might take the nearest-neighbour distance to be \(N^{-1/3}\), and we could equate this to the radius of the largest existing Bohr orbit. Presumably this will limit the number of Balmer lines we could see in a stellar atmosphere, and it will also tell us where to cut off the summation in calculating the partition function. Radio astronomers observe transitions involving very large quantum numbers - e.g. \(\text{H} \ 109\alpha\). Presumably these come from hydrogen atoms in a region of space where the nearest neighbour distance is large enough the permit the existence of Bohr orbits of high quantum number.

### ii. Metals and Nonmetals

There is a difference between calculating the partition functions of metals and of nonmetals - but first it is necessary to say what I mean by a "metal". It would be difficult to find two chemists or two physicists or two engineers who would agree on the exact definition of a metal. Among astronomers, however, there is near unanimity: the periodic table comprises hydrogen, helium, and all the remaining elements are "metals". This is a distressing misuse of the English language, and I strongly discourage it. I should make it plain that in this section - indeed in this chapter or book - this is not what I mean when I write the word "metal". Although, as I say, few scientists would agree on the precise definition, if I say "a metal is an element which, in the solid state, is hard, shiny, and conducts electricity", I should not be far off the mark. Almost everyone will find some immediate objection to that definition - but it is still not far off the mark, and certainly much better than the astronomers' "any element other than hydrogen and helium". In brief, elements that we think of in everyday life as being metals - such as iron, zinc, titanium, copper, lead, vanadium, tin, and so on - are metals. Neon, argon, chlorine, carbon, germanium, are not. From the spectroscopic point of view, a metal is characterized by having many, many energy levels, including many not far above the ground level. The calculation of the partition function is long and tedious, because so many levels, especially low-lying levels, must be taken into account. In the old days when these calculations were done by hand calculator, the levels were taken term by term, the statistical weight of each term being \((2S+1)(2L+1)\). The partition functions are fairly sensitive to temperature. Nonmetals, on the other hand, are characterized by typically having a large gap between the ground term and the first excited term. Consequently, the Boltzmann factors for terms other than the ground term are small, and, as a result, the partition function of a nonmetal is, to a good approximation, merely equal to the statistical weight of the ground term - and it hardly changes with temperature.

Now here is a question I used to enjoy asking students, both graduate and undergraduate. I would take particular pleasure in asking graduate students during a thesis defence. Think of a fairly hot star, such as Vega - say its temperature is something like \(20,000 \ \text{K}\). You will recall having seen the spectrum if Vega - it shows a beautiful development of the Balmer series of hydrogen. Obviously many of the higher "levels" are excited in the hot atmosphere; not all of neutral hydrogen atoms are still in the ground "level". The question is: At \(20,000 \ \text{K}\), what fraction of the neutral hydrogen atoms in the atmosphere remain in the ground "level"? And, just to make it clear that I was not expecting detailed precise calculations, I would give the question as a "multiple-choice" question, with just three alternatives:

(a) Nearly all of them?

(b) About half of them?

(c) Hardly any of them?

Usually answers would be pretty evenly divided among the three. Have a go at it yourself. All the information you need is to be found in this chapter and chapter 7. It is important that you should have some feeling for the answer.

You will probably also be asking yourself how many of the hydrogen atoms are neutral, and how many are ionized. We shall come back to that when we have discussed Saha's equation. The answer will depend not only on the temperature but also on the pressure.

### iii. Product of Partition Functions

In some systems, the total energy may be made up of several different sources of energy. Consider, for example, a simple diatomic molecule. Its energy may be the sum of the electronic excitation energy, energy of vibration, and kinetic energy of rotation. If these several sources of energy are independent of each other, the total energy will be merely the sum of the separate contributions:

\[E_{\text{tot.}} = E_{\text{el.}} + E_{\text{vib.}} + E_{\text{rot.}} . \label{8.5.4}\]

In practice, for real molecules, this is just a first approximation - in reality, there is some interaction between the several contributions to the energy, but the intention here is not to get bogged down in the finer details of molecular structure but merely to make a small point concerning partition functions, as follows. Provided that the several energy contributions are independent and do not interact significantly and the energies are consequently additive, the total wavefunction is the product of the three wavefunctions:

\[\psi = \psi_{\text{el.}} \psi_{\text{vib.}} \psi_{\text{rot.}} \label{8.5.5}\]

Here \(\psi_{\text{vib.}}\) and \(E_{\text{vib.}}\) are the wavefunctions and energy levels for a simple harmonic oscillator and \(\psi_{\text{rot.}}\) and \(E_{\text{rot.}}\) are the wavefunctions and energy levels of a rigid rotator. It will be easily understood that a molecule cannot simultaneously be a rigid rotator and a harmonic oscillator, which is why equations \(\ref{8.5.4}\) and \(\ref{8.5.5}\) are just first approximations. However, the vibrations of a molecule are generally far faster than the relatively slow and ponderous rotations, and electron motions are faster still, so the first approximation is not too bad. More to the point for our present purpose is that every term of the partition function is of the form \(e^{-E/(kT)}\), and consequently, *if the total energy is the sum of the individual contributions, as in equation *\(\ref{8.5.4}\)*, the total partition function is the product of the partition functions of the individual contributions*:

\[u = u_{\text{el.}} u_{\text{vib.}} u_{\text{rot.}} \label{8.5.6}\]

The extent to which this approximation is valid in real molecules is not the main subject of discussion here. I merely wished to establish that, provided equation \(\ref{8.5.4}\) holds, then equation \(\ref{8.5.6}\) follows.

### iv. Particles in a Box

The reader may vaguely remember studying, in an introductory quantum mechanics course, perhaps without quite knowing why, something called "particle in a box". This was actually useful, and we shall need it before proceeding to the next section. Perhaps the topic would better have been called "waves in a box", because it was the wavefunctions that describe the wave aspect of a particle that were under discussion. If the particle (and its associated wave) is confined in a box, the wavefunctions are restricted to functions that have an integral number of antinodes between opposite walls, and consequently the energy levels can have only discrete values - another example of the inevitability of discrete energy levels resulting from boundary constraints. If the box is a cube of side \(a\), the energy levels are given by

\[E_{n_x n_y n_z} = \frac{h^2}{8ma^2} \left(n^2_x + n^2_y + n^2_z \right) . \label{8.5.7}\]

*Problem*: Verify that the above expression has the dimensions of energy.

If we have many particles in a box, we may be interested to know how the numerous particles are distributed or *partitioned* among the energy levels. In other words, we need to know the partition function, which is just

\[\sum_{n_x=0}^\infty \sum_{n_y=0}^\infty \sum_{n_z=0}^\infty \exp \left[ - \frac{h^2 \left(n_x^2 + n_y^2 + n_z^2 \right)}{8ma^2kT} \right]. \label{8.5.8}\]

If the box is very large, the energy levels are very close together and almost continuous. (If the box is infinitely large, there are no boundary constraints and hence there is a continuum of possible energies). If the levels are almost continuous, we can replace the summations with integrals:

\[\text{Partition function} = \int_0^\infty \int_0^\infty \int_0^\infty \exp \left[ - \frac{h^2 \left( n_x^2 + n_y^2 + n_z^2 \right)}{8ma^2kT } \right] dn_x dn_y dn_z \nonumber\]

\[=\left[ \int_0^\infty \exp \left( - \frac{h^2 n^2}{8ma^2kT } \right) dn \right]^3 \nonumber\]

\[= \left(\frac{2 \pi mkT}{h^2} \right)^{\frac{3}{2}} V , \label{8.5.9}\]

where \(V = a^3\) is the volume of the box. We shall need this result in section 8.6.

*Problem*: What are the dimensions of the expression 8.5.9?