Review of the kinetic theory of gases
The kinetic theory of gases describes the connection between velocity of individual molecules and pressure.

The momentum of a particle is mux (in the x-direction).
For an elastic collision with the wall of the container the momentum of the particle is reversed and is now –mux. The change in momentum is
D(mux) = mux – (-mux) = 2mux. If the distance between the two walls perpendicular to the x-direction is a, then the time elapsed between collisions is Dt = 2a/ux because the molecules travels a distance of 2a to arrive back at the right-hand wall. The rate of change of momentum is equal to the force so
.
Since the area of wall is bc the pressure exerted on the wall is

since V =
abc.
One molecule cannot really exert a pressure, but the extension of the above reasoning to a container with N molecules shows that

where

The choice of the x-direction is arbitrary and the results for the y- or z-direction must be equivalent
![]()
Since the mean square speed of any molecule is

we have
for the mean square speed in one direction.
The fundamental equation of the kinetic theory of gases is

This equation relates a macroscopic property, PV, on the left hand side with a microscopic (or molecular) property m<u2> on the left-hand side. The average kinetic energy is related to the temperature by
And therefore the equation also is equivalent to
the ideal gas law.
If we consider Avagadro's number of molecules then the molar mass M = NAm. For one mole of gas molecules we have

The square root or the mean-square speed for an ideal gas is

This is the same as the root-mean-square speed urms = (
áu2ñ - áuñ2)1/2.
The distribution of molecular speeds is given by a Gaussian distribution
All molecules in a system do not have the same speed. This is important for simulations since we need to assign velocities to molecules to initiate the dynamics. The velocities are assigned according to a Maxwell-Boltzmann distribution, which is a Gaussian distribution of speeds. The derivation is due to Maxwell, and was formalized by Boltzmann.
Let h(ux, uy, uz)duxduyduz be the fraction of molecules that have velocity components between ux and ux + dux etc. The key assumption is that the three components of velocity are statistically independent. Thus, we can write
h(ux, uy, uz) = f(ux) f(uy) f(uz)
where f(ux), f(uy), and f(uz) are the probability distributions of the individual velocity components. Because the gas is isotropic, the function h(ux, uy, uz) must depend only upon the magnitude of the velocity u.
h(u) = h(ux, uy, uz) = f(ux) f(uy) f(uz)
Taking the logarithm gives
ln h(u) = ln f(ux) + ln f(uy) + ln f(uz)
Differentiating this equation with respect to ux gives
(¶
ln h(u)/¶ux)uy,uz = ¶ln f(ux)/¶uxBecause the function h(u) depends on u we rewrite the derivative as a function of u.
(¶
ln h(u)/¶ux)uy,uz = [d ln h(u)/du](¶u/¶ux)uy,uz = ux/u [d ln h(u)/du]Thus, we have

Because ux, uy, and uz are independent of one another the above equation must be equal to a constant. We define this constant to be -
g so that
Upon integration
![]()
Since f(uj) is a probability distribution it must be normalized.


Substituting in for the Gaussian function we have obtained for the distribution. This is a Gaussian integral, so A = (
g/p)1/2.![]()
Using the fact that
áux2ñ = 1/3áu2ñ and áu2ñ = 3RT/M, it follows that áux2ñ = RT/M. We can use this information to determine the constant g in the probability distribution. The mean-square velocity is
Because the integral is an even integral it can be rewritten
This integral is discussed in the Math Review section on Gaussian integrals. We obtain

and
g = M/2RT. The distribution function becomes![]()
This is the formula used to assign velocities in the equilibration stage of a molecular dynamics simulation. Because of the independence of the x, y, and z dimensions, these can each be assigned velocities independently.
In three dimensions the expression becomes
![]()
and replacing the infinitesimal volume element duxduyduz with 4
pu2du we have
.