# How statistical thermodynamics actually solves these problems?

Our primary objective in thermodynamics is to explain the bulk behavior of matter. In trying to do so we may think of going with the straightforward approach of explaining the bulk behavior by explaining the behavior of its constituents. This would require us to find the positions and velocities of each particle as a function of time. However, this is an extremely difficult task even for the fastest computers that we have now, since the number of particles is very large. Even if it was possible to find position and velocities as a function of time for each particle, we would only get an information on the behavior of these particles but not on the bulk behavior of matter (as I read in a book, explaining the trees doesn't mean we have explained the forest).

So there are two problems that we face while trying to explain the behavior of matter using its constituents:

1) There are a large number of particles and it is impossible to find the position and velocity of each as a function of time.

2) We do not get info on how the matter behaves on a bulk basis, but rather only how these constituents behave.

As much as I've read on the internet, statistical thermodynamics solves these problems. However, I do not understand how it does so. Does it not require finding the position and velocity of each particle? How are we able to circumvent finding each particle's position and velocity?

P.S.- I'm studying mechanical engineering at the undergrad level, and haven't taken any course in statistical mechanics. I was just interested in knowing how statistical mechanics actually helps.

The answers to this question that I asked earlier do not discuss much on how the problems that I highlighted above are solved by statistical mechanics. Nevertheless, I've linked them, they might be useful to future readers.

• “ Our primary objective in thermodynamics is to explain the bulk behavior of matter”. This is too broad. It could just as well describe Newtonian mechanics. Macro thermodynamics is better described as the study of energy transfer between a system and its surroundings in relation to the bulk properties of substances. Aug 13, 2022 at 15:54
• > "As much as I've read on the internet, statistical thermodynamics solves these problems." Problem 1 is a fact, it was never solved. The number of particles is just too high and our measurement and calculations capabilities too weak. "Problem 2" is too vaguely stated. Where does the statement "We do not get info on how the matter behaves" come from? Some models deal with matter in bulk, some deal with particles (constituents). It depends on which model we use. Aug 13, 2022 at 22:28
• Regarding problem 2: It's not quite right. If you had an imaginary supercomputer that was able to simulate each individual particle, you'd reproduce the bulk behavior exactly - so you would be able to make accurate predictions by brute force number crunching (after all, nature is already performing such a computation). It's just that you, as a human, wouldn't necessarily be able to have a deeper insight into what is going on in terms of the broad strokes - because you wouldn't have a theoretical framework that helps you think about what the number crunching is doing in broad strokes. Aug 14, 2022 at 7:47
• That's what I'm saying; it wouldn't help us understand the bulk behavior, only predict it (which would be useful, but that's not the point). By "brute force number crunching" I just mean the computer isn't doing anything clever (no averaging, no high-level thermodynamic concepts) - it just updates the state of constituents as time progresses. Its basically a simulation that perfectly corresponds to reality - e.g. suppose you simulate a gas; you could then take those outputs, and render an animation and see what the gas does (the bulk behavior). That's what I meant by 2 is not quite right 1/2 Aug 15, 2022 at 20:57
• That is, the problem is not that the bulk behavior is not recoverable from the behavior of the constituents, but rather that the full computation that gets you from one to the other is too "zoomed in", too complex, convoluted and obscure for human beings to think about all its implications. What you need instead is a theoretical model (a more abstract, simplified representation of the real-world phenomena of interest) that introduces concepts at a higher level of abstraction (more "zoomed out") so that you can express/study the bulk behavior in terms of those. 2/2 Aug 15, 2022 at 20:58

Statistical thermodynamics in my mind has two purposes. First it provides a framework for understanding the connections between the microscopic and macroscopic world and lets us connect parameters that we can measure such as pressure and temperature with the idea that we don't need to understand the details of individual particles, but rather understand their distribution of energies, or their average property such as mean free path. Second it does it in a rigorous mathematical way showing that we get the same answers when we treat the collection of particles individually or if we instead treat them as a distribution of some characteristics. Statistical mechanics works well with Maxwell-Boltzmann, Fermi-Dirac, and Bose-Einstein distributions.

Formally to solve a statistical mechanics problem you need to find an equation of state, then everything would fall out from knowing that equation of state. However, other than a few simple systems it is very very hard to find the equation of state for the system. So from that sense solving problems with statistical mechanics is not easy or useful for many real world problems. So people will often use Monte Carlo, or a stochastic method to randomize the detailed interactions assuming a distribution and still consider it statistical mechanics approach.

This can be very powerful to disconnect the individual properties from the mathematics. If you treat each particle individually you end up with a set of equations for each particle and their interactions with all the other particles. If instead you only need to know the mean free path length, mean time between collisions, or other variables that depend on the distribution and use that as a parameter it can be a very powerful.

One example is the transport of electrons in semiconductors. There is obviously a lot going on. The electron is traveling through a lattice of atoms, the allowed energies of the electrons depend on the band structure of the material, there can be impurities imperfections in the lattice.

But if instead of trying to account for all of the details and looking at it statistically you can come up with a Boltzmann transport equation, or even simpler just consider the electrons as a gas.

If you think of the electrons as a gas, and you know the concentration you can find the mean free time between collisions. When an electric field is applied the electron only accelerates on average to reach a mean velocity. Using this you can then know the mobility of the electrons which gives you the conductivity of the material. Using the Boltzmann Transport equations and the mean relaxation time approximation you can also find things like thermoelectric properties, or heat capacities, etc.

I believe the question to be very well posed and interesting. I also think that it taks far more knowledge than I have to give an appropriate answer, but I will try to convey how I understand the topic.

When considering a system, (say classical for argument sake) There is an intuitive distinction between states of the system one can make:

• Microstate: This is quite litterally knowing all positions and velocities of the particles in a sytem. To say that a system is in a particular microstate is equivalent to say that you know position and velocity of every single particle in your system. As you already noted knowing the exact microstate of a sysem is quite difficul, if not practically impossible.

• Macrostate: A macro state is knowing and specifying the values of only macroscopic variables instead (Temperature, energy, etc).

The key idea is that there are a huge number of distinct microstate that corrspond to the same macrostate; e.g., there are millions of different particle positions and velocity which give the same total energy of the system. Similarly, countless microstate corrspond to the same temperature of the whole system. Thus, by making some assumptions, such as the assumption that a system has an equal probability of being in any microstate compatible with its current macrostate, one can apply probabilistic reasoning to guess how the system will behave in the future.

1. By keeping track only of macrovariables and macrostates one does not need to know the exact microstate in which the system is in.
2. By describing the system by its macro-variables one is effectively giving a quite different description of the system. Think of a gas in a chamber. Knowing every single position and velocity of all particles in the gas one can determine whether the gas is evenly spread out in the chamber or it is all clumped in one corner. Say this is evenly spread out. To describe this micro-state is to give an enormous list of vectors. One for each position and one for each velocity. All of this to describe a rather simple state. On the other hand, by keeping track only of macro-variables such as the temperature of the gas, and applying some probablistic reasoning, one can describe the same system wiht much less informaion. Furhtermore, and more crucially, the two descriptions emphasize different things. In the microstate description, one looks almost to close to the system and loses important aspects which are only displayd at the macro-scale.

## Average over all possible states

We assume that the system randomly samples states and that the average behavior coincides with the average over all possible states. We don't know the exact trajectory between the states and we don't care. We just hope that the system rattles around enough that the average over a long time or many particles will be similar to the average over all possible states.

The key to statistical mechanics is assuming that the state of the system is randomized over time and it can visit all possible states, subject to whatever constraints we have. We then can calculate macroscopic quantities (pressure, density, magnetization, temperature, even things like color—see the blackbody spectrum, etc.) by averaging over all possible states:

$$\left< A \right> = \sum_{\mathrm{all~possible~states}~i}{A(\mathbf{X}_i) P(\mathbf{X}_i)},$$ where $$A$$ is the macroscopic quanity, $$\mathbf{X}_i$$ is a state of the system (usually specifying the 3D positions and momenta for each particle), and $$P(\mathbf{X}_i)$$ is the probability of the state $$\mathbf{X}$$.

Here, I'm assuming the states are discrete (countable), if they are continuous, then the sum becomes an integral. For particles, this is usually an integral over momentum ($$p$$) and position ($$q$$) states. If we work with systems in contact with an environment of fixed temperature $$T$$, then the probability is $$\exp (-\frac{E}{kT})$$, where the $$E$$ is the energy of the state and $$k$$ is Boltzmann's constant. This relation comes from assuming that energy is randomly distributed between the system and environment (in other words, maximization of the total entropy). Let's also assume we have $$N$$ particles and that these particles are conserved. Under these conditions, we can calculate the average of some quantity $$A$$ by:

$$\left< A \right> = \frac{\int \mathrm{d}^{3N}\mathbf{q} \int \mathrm{d}^{3N}\mathbf{p} \, A(\mathbf{q},\mathbf{p}) \exp \left[ -E(\mathbf{q},\mathbf{p})/(kT) \right] }{ \int \mathrm{d}^{3N}\mathbf{q} \int \mathrm{d}^{3N}\mathbf{p} \, \exp \left[ -E(\mathbf{q},\mathbf{p})/(kT) \right] }$$

To make it simple, let's say we have only one particle moving in one dimension that bounces elastically off the walls of the 1D box of length L and has only kinetic energy $$E = \frac{1}{2}mv^2 = p^2/(2m)$$. We want to calculate the mean energy:

$$\left< E \right> = \frac{\int_0^L \mathrm{d}q \int_{-\infty}^\infty \mathrm{d}p \, p^2/(2m) \exp \left[ -p^2/(2mkT) \right] }{ \int_0^L \mathrm{d}q \int_{-\infty}^{\infty} \mathrm{d}p \, \exp \left[ -p^2/(2mkT) \right] }$$

The $$q$$ integrals give $$L$$ in both numerator and denominator, so they cancel.

I'll use sympy to do the $$p$$ integrals:

from sympy import *
kT, m = symbols('kT m', real=True, positive=True)
p = symbols('p', real=True)
E = p**2/(2*m)
numer = integrate(E*exp(-E/kT), (p, -oo, oo))
denom = integrate(exp(-E/kT), (p, -oo, oo))
mean_energy = simplify(numer/denom)
print(mean_energy)


So the average energy of this particle is $$\left = kT/2$$. From this you can get a typical speed (root-mean-square speed). Since $$\frac{1}{2}m\left = \left$$, so $$v_\mathrm{RMS} = \sqrt{kT/m}$$

The point is, we average over all possible momentum states of the system (from $$-\infty$$ to $$\infty$$) and can use that to determine what the average energy and typical velocity are. We don't need to know the detailed trajectory of the particle in time. We don't need to think about how the particle bounces off the walls or how it exchanges energy with the environment through the walls. We just assume that on long times it effectively randomly samples states and that the average behavior will be the average over all states it can access.

So the field of statistical mechanics is about clever ways to average over states and come up with probability distributions for different quantities in model systems.