# Temperature of a System of molecules

Suppose I have a closed system with N molecules in it which are vibrating and all motion equations (rotation, translation and vibration) of the system are known along with any EM field equations in the region. Given all these information how do we calculate (not measure) the temperature of this system?

-
The concept of temperature is actually slightly different for microcanonical ensembles compared to canonical ensembles. –  QGR Jan 22 '11 at 18:21

AIB, As you have read the temperature is a measure of the change of energy of a system to the change of the number of microstates, or:

$$T = \dfrac{\partial{E}}{\partial{S}}$$

Where: $$S = \ln \Omega$$

and $\Omega$ is the number of microstates.

However, it is important to understand what a microstate is. In general a microstate describes all of the exact positions and momentums of all the particles in a system (or particles in a box). The microstate is often thought of as a point in a 6N dimension space, where N is the number of particles and the factor of 6 is related to there being 3 position components in a 3D space and 3 momentum components in 3D space (however, one could certainly consider other parameter).

If we could know all of the positions and momentums of all the particles than we would know the precise microstate of the system. This precise microstate would have an exact energy associated with it. However, we do not have an ability to know the precise microstate of a system, so we must appeal to a statistical concept.

So at any one instant, there are a large number of microstates a system could be in. Again, each microstate being a unique description of the exact position and momentum of all particles in the box. What this also suggests, is that for any microstate, there are a large number of other microstates that would have the same energy associated with them.

The question asked was: "Given all these information how do we calculate (not measure) the temperature of this system?"

The answer to this question would be determined first by the range of all the free parameters and the values of those parameters that that would keep the energy constant. The number of combinations possible within the energy constraint is the number of microstates of the systems, the log of which is the entropy.

The next step is tricky, because we would have to ask how the energy changes with a change in entropy. This is where the partition function comes into play, assuming energy of each microstate is equivalent, if we look at the partion function we see:

$${Z} = \sum_i e^{-\frac{\partial{S}}{\partial{E}}{E_i}}$$

$$Z = Ne^{-\frac{1}{T}E_i}$$

$$N = Ze^{\frac{1}{T}E_i}$$

So we can see that the temperature is a variable that controls the growth of states if we keep the value of Z constant. If I know an exact microstate from which to derive the energy, then I still won't necessarily know anything about the temperature until I can partition the relavant space in question. In this sense, the temperture is a sort of hyperbolic phase factor which changes the range of states.

-

Dear AIB, the temperature can clearly be anything in the system you described. The temperature is not a universal constant calculable for each system: the temperature is a macroscopic quantity describing the state of the system.

Roughly speaking, the absolute temperature $T$ in Kelvins will be related to the kinetic energy of the average molecule by $E=5kT/2$ - assuming that two rotational degrees of freedom exist from the absolute zero to the temperature $T$ which they usually don't. The kinetic energy depends on the speed of the molecules - it is not calculable out of nothing.

The heat capacity factor $5/2$ above should be replaced by a number that depends on the type of the molecule but for complicated enough stuff, the dependence won't be quite linear, anyway.

Cheers LM

-
The equipartition theorem only applies for nearly ideal gases, and weakly coupled harmonic oscillators. –  QGR Jan 22 '11 at 18:17
@QGR: Where did you get that from? Equipartition works for arbitrary degrees of freedom provided the energy level spacing is small compared to kT. –  Johannes Jan 23 '11 at 5:12
@Johannes: The equipartition theorem is only exact in the limit of decoupled harmonic oscillators, or free particles. For a strongly coupled system like a liquid, it breaks down. –  QGR Jan 23 '11 at 7:34
@QGR: Ok, in systems in which you can't define the independent degrees of freedom you can't apply equipartition. I wouldn't call that 'breaking down' of equipartition. –  Johannes Jan 23 '11 at 7:54
@Johannes: if you mean the ET that says that you get 1/2 k_B T for every degree of freedom, then no, they will not satisfy it. See e.g. this for now: en.wikipedia.org/wiki/… ; but there is also a generalized ET that handles this case too. –  Marek Jan 24 '11 at 0:12

You ofcourse understand that it's simply impossible to obtain all possible initial conditions (position, momentum and other internal degrees of freedom) for a large system. Furthermore, we actually have a good knowledge of the equations of motion that govern the dynamics of such a system. E.g. in classical physics you have some set of differential equations that follow from Newton's law.

So suppose that we did know the inital conditions. Than there is still the other practical impossibility of actually determining the state of the system at some later time. We simply don't know how to solve these equations of motions analytically for large systems. Let alone the fact that we cannot keep track of each individual particle.

This is why one turns to a statistical description of the system. In a statistical description you are not interested in what each individual particle is doing, but rather what the system is doing as a whole. So instead of making a statement like: particle 1 has momentum P and position X and particle 2 has some other properties, you would talk about the probability of having a particle in some state and another in some other state.

A key ingredient in this approach is the concept of time averaging. The probabities mentioned before arise by averaging over a typical timescale. You assume that within that timescale the system explores all possible states it can end up in, as in, the system sits in all possible configurations it can during that timescale. It explores the phase space of the system. The statistical state of the system is obtained through this time-averaging (which, mind you, is not done by actually starting with a state and then see what it does over a typical timescale. Rather, one assumes that the system will explore the phase space in some way, and you're not really interested in the way it does that).

What does this have to do with temperature? For that we need to introduce the concept of entropy first. The entropy is nothing more but the logarithm of the total number of states in the phase space that the system can evolve into. It is a measure of the size of the phase space that is available to the system. Again, this makes no reference to the particular state the system starts out in -- not the microscopic details anyways. What it does require is the total energy of the initial state. The reason should be clear: microscopically, the system can only evolve into other states with the same total energy. So when we talk about this time averaging, where the system explores the phase space, than the total energy serves as a constraint on the possible "explorations". There are other constraints as well, such as the volume and number of particles.

Energy conservation places a severe constraint on the subspace of the phase space available to the system. At the same time the entropy is precisely determined by the size of this subspace. And this is where temperature comes in. By changing the total energy, the total entropy is changed -- the system now explores a different subspace of the phase space. Temperature is nothing more but the rate of change of entropy. It is the derivative of the entropy with respect to the total energy, 1/T = dS/dE. So it is in essence a measure on how the size of the phase space changes when you a little energy to the system (or extract some).

To give a little more detail on this. You can also think of changing the entropy and see how the total energy of the system changes. You can also look at the change of total energy due to a change in the particle number, while keeping the entropy fixed. This leads to the chemical potential. Pressure and volume obey similar relations.

So back to your question. How does one, in principle, calculate the temperature of the system? The only gedankenexperiment I can come up with is as follows: You let the system evolve. Then you perform a time averaging over this motion. You come up with some average state of the system, and, more importantly, the total entropy of the system. Now you add a little energy to the system and you the same thing. The change of entropy, divided by the change of energy is 1/T.

-
I think time averaging is only one way of approaching statistical mechanics. It assumes ergodic theory. –  QGR Jan 22 '11 at 18:24
Does it mean that we can not associate temperature to a very small number of Hydrogen Atoms even in principle , even if we know their KE (upto precision permissible by uncertainty)? A set of hydrogen atoms with a given KE can have different temperature depending on how the system evolve? –  AIB Jan 25 '11 at 3:59

For a gas of particles the microstates of the system have energy $E_i$, and the distribution of these states in a gas with temperature $T$ is given by $$Z~=~\sum_i e^{-E_i\beta}$$ with $\beta~=~1/kT$. It is not hard to see that $$F~=~ln(Z)/\beta$$ which is the Helmholtz free energy. The internal energy is $$U~=~-\Big(\frac{\partial Z}{\partial\beta}\Big).$$ The free energy $F~=~U~-~TS$ and $S~=~k(ln~Z~+~\beta U)$ can be used to write the partition function according to macroscopic varianbles $Z~=~e^{-F\beta}$. $\beta$ may then be computed by taking a derivative with the Helmholtz free energy $F$ $$\beta~=~-\frac{\partial Z}{\partial\beta}.$$

-
The Boltzmann factor is $e^{-\beta E_i}$, not $e^{-E_i/\beta}$. –  QGR Jan 23 '11 at 7:35
Yep, my mistake. I first had kT and I did in the editor a global change from kT to \beta. –  Lawrence B. Crowell Jan 23 '11 at 13:18
This is a nice lesson on statistical mechanics, but doesn't answer the question. He is asking how to calculate T from the microscopic state, but your answer already starts with an ensemble. –  Bruce Connor Jan 23 '11 at 20:05
Temperature really does not make sense for a microstate. Temperature is a measure which emerges with coarse graining, entropy and the whole nine yards of cloth. –  Lawrence B. Crowell Jan 23 '11 at 22:24
Actually temperature is usually defined as $T = (\frac{\partial S}{\partial E})^{-1}$, where $S$ is the entropy of the system. –  Joe Fitzsimons Jan 22 '11 at 7:35
But Boltzmann also taught us that S = log$\Omega$ :) –  wsc Jan 22 '11 at 22:51