# The Boltzmann Equation

## Table of Contents

*This the first post in a series about the fundamentals equations for modeling astrophysics. I'm not sure how long this series will end up being, but you can see the whole list here*.

The Boltzmann equation is a fundamental statistical relation that lays the foundation for both hydrodynamics (e.g. Navier-Stokes) and radiation transfer (radiation hydrodynamics), and one I under-appreciated as an undergrad. Hopefully this post will make you appreciate it too.

## 1. Background

Gases and liquids are composed of atoms and molecules, all of which are sloshing around in an amorphous blob. But, assuming we know each position \(\boldsymbol{X}_i\), velocity \(\boldsymbol{u}_i\), and force per unit mass \(\boldsymbol{F}_i\), for each particle \(i\) in the gas or liquid. Using the magic of classical mechanics, we can derive the **future position** with:

and **velocity** with:

Here, we assume that the force \(\boldsymbol{F}_i\) on \(i\) particles is a quantifiable value, something we can derive from another set of known functions and positions.

The issue with this is that these equations are inherently limited in their scale, simulating thousands of particles is a challenge for a regular computer, a supercomputing cluster can reach up to hundreds of thousands, but ultimately the computation ceiling for these equations marches to the beat of Moore's Law.

Fortunately, we don't need to know the exact position of every particle and their velocities. Using statistical physics, we can define the evolution and formation of gases and liquids, in astrophysics in particular, gases and liquids can simply be defined as a continuous medium. This leads us into the idea of **hydrodynamics**, for which the Boltzmann equation is the base.

## 2. The Actual Boltzmann Equation - Hydrodynamics 101

Consider a gas with particles that are identical with mass \(m\), no internal degrees of freedom (the particles can't rotate or vibrate), and assume quantum effects are negligible (yeah, I know, we're making a lot of assumptions). We can define attributes for each of the particles like so:

- Position of the particle: Let \(\boldsymbol{x} = (x_1, x_2, x_3)\) where \(x_i\) is the position of the particle in \(i\) dimension. In essence, this represents 3D space.
- Velocity of the particle: Let \(\boldsymbol{u} = (u_1, u_2, u_3)\), where \(\boldsymbol{u}\) is the velocity for each individual particle.
- Momentum of the particle: Let \(\boldsymbol{q} = (q_1, q_2, q_3)\), such that \(\boldsymbol{q} = m\boldsymbol{u}\) (momentum = mass*velocity).

We now define a distribution function \(f_{dist}\), such that:

\begin{equation} dN = f_{dist}(\boldsymbol{x}, \boldsymbol{u}, t) \ \boldsymbol{dx}\ \boldsymbol{du} \end{equation}where \(dN\) is the number of particles at time \(t\) with positions between \(\boldsymbol{x}\) and \(\boldsymbol{x} + \boldsymbol{dx}\) and velocities between \(\boldsymbol{u}\) and \(\boldsymbol{u} + \boldsymbol{du}\).

Using these basic equations that define attributes, imagine a volume occupied between \(\boldsymbol{x} + \boldsymbol{dx}\) and \(\boldsymbol{u} + \boldsymbol{du}\), meaning a constrained volume with the particles inside it having velocities bound by \(\boldsymbol{u}\) and \(\boldsymbol{u} + \boldsymbol{du}\). This is a 6 dimensional space (3 different physical dimensions + 3 different velocities), which we can project onto the space into multiple 2D spaces like \((x_1, u_1)\). We call this 6 dimensional space the `phase space`

.

There's a representation of the phase space below (you can play with the camera on it):

<iframe src="https://tokamak.io/demos/mathbox/volume.html" style="border: 0px; width:100%; height: 500px; overflow: 0px;"></iframe>

Each vector in this volume space represents a particle. The start of each vector is the position of the particle (\(\boldsymbol{x}\)), and the direction of the vector represents \(\boldsymbol{u}\), thus creating the 6 dimensions.

Now imagine there's a force field normalized such that \(\boldsymbol{F} = (F_1, F_2, F_3)\), where essentially there's a force acting at every combination of the 3 dimensions. If we apply this force into our phase space, we can show that after time \(dt\), the momentum changes to \(\boldsymbol{q} + m\boldsymbol{F}dt\), the velocity becomes \(\boldsymbol{u} + \boldsymbol{F}dt\), and its position changes from \(\boldsymbol{x}\) to \(\boldsymbol{x} + \boldsymbol{u}dt\). Since the number of particles within our phase space remains consistent, the number of particles before is equal to the number of particles after. If we neglect the effect of collisions, we can write it as:

\begin{equation} f(\boldsymbol{x}, \boldsymbol{u}, t) = f(\boldsymbol{x} + \boldsymbol{u}dt, \boldsymbol{u} + \boldsymbol{F}dt, t + dt) \end{equation}Rewritten in another form:

\begin{equation} f(\boldsymbol{x} + \boldsymbol{u}dt, \boldsymbol{u} + \boldsymbol{F}dt, t + dt) - f(\boldsymbol{x}, \boldsymbol{u}, t) = 0 \end{equation}Now if we allow for collisions, the difference between the two is simply the change in distribution due to collisions, which we'll write as \([\Delta f]_{coll}\):

\begin{equation} f(\boldsymbol{x} + \boldsymbol{u}dt, \boldsymbol{u} + \boldsymbol{F}dt, t + dt) - f(\boldsymbol{x}, \boldsymbol{u}, t) = [\Delta f]_{coll} \end{equation}because of the left hand side is simply the change in \(f\) during the time interval \(dt\), we can rewrite it as:

\begin{equation} \frac{\partial f}{\partial t} + u_1\cdot \frac{\partial f}{\partial x_1} + u_2\cdot \frac{\partial f}{\partial x_2} + u_3\cdot \frac{\partial f}{\partial x_3} \\ + F_1\cdot \frac{\partial f}{\partial u_1} F_2\cdot \frac{\partial f}{\partial u_2} + F_3\cdot \frac{\partial f}{\partial u_3} = [\frac{\partial f}{\partial t}]_{coll} \end{equation}by summing over repeated indices for each dimension, we arrive the Boltzmann transport equation, written as such:

\begin{equation} \frac{\partial f}{\partial t} + u_1\frac{\partial f}{\partial x_i} + F_i \frac{\partial f}{\partial u_i} = [\frac{\partial f}{\partial t}]_{coll} \end{equation}This nifty little equation allows us to describe the evolution of the distribution function in the six-dimensional phase phase. The Boltzmann equation expresses that the change in the number of particles within a constrained space (\(\boldsymbol{dx\ du}\)) is equal to the net number of particles that enter or leave the element.