Physics:Pairs

= Two-Body Problems =

This page explains the numerical simulation of two-body problems suitable for a first numerical simulation.

The coordinates of two point particles can be represented by two vectors, $$\vec x_1 \in \mathbb R^3$$ and $$\vec x_2 \in \mathbb R^3$$. They have corresponding masses and velocities ($$m_i,\vec v_i$$).

Because the interaction between the particles is invariant to translations, the energy of interaction can only depend on the difference between coordinates, $$\vec r = \vec x_2 - \vec x_1$$. Even better, since the interaction should be invariant to rotation, the potential energy should really only depend on the length of $$\vec r$$, which we denote $$r = |\vec r|$$. You must memorize the formula for computing the magnitude of a vector,

$$|\vec r|^2 = \sum_i \vec r_i^2 = r_x^2 + r_y^2 + r_z^2$$.

Harmonic Oscillator
The most common energy function is undoubtedly the potential energy of the harmonic oscillator,

$$U(r) = \frac{k}{2} (r - r_0)^2$$.

It has two parameters, k, and $$r_0$$. Because of its commonly usage to represents the energy of a bond between atoms, $$r_0$$ is sometimes referred to as the bond length, and k as the bond stretch constant.

Lennard-Jones
The second most common pair-energy function is arguably the Lennard-Jones form,

$$U(r) = 4 \epsilon\left( \left(\frac{\sigma}{r}\right)^{12} - \left(\frac{\sigma}{r}\right)^6 \right)$$.

This form is used to represent a pair of atoms that are not bonded. It also has two parameters. $$\epsilon$$ is the `well-depth' and $$\sigma$$ is the distance where the energy crosses from positive to negative. There is an alternate way to write this energy by re-defining $$R = \sigma 2^{1/6}$$ and re-factoring the 4 inside the parentheses.

Other Forms
There are many other forms that try to represent the actual physical interaction energy between pairs of atoms more realistically than the primitive approximations above. You should look these up on your own


 * Morse potential
 * Buckingham potential
 * Coulomb potential
 * Gravitational potential
 * FENE (finitely extensible nonlinear elastic) Potential

For the FENE potential (and the others as well) an excellent reference is the Gromacs User Manual and high-level summaries of these functions are also present in the LAMMPS Documentation.

Derivatives of the Energy
According to Newton's law, we must compute the force as,

$$\vec F = -\vec \nabla U$$, where $$U$$ is the potential energy function.

In component form, $$\vec \nabla_i = \frac{\partial}{\partial x_i}$$ is the derivative with respect to the $$ i^\mathrm{th}$$ component.

To find the derivative of $$U(r)$$ with respect to $$\vec x_i$$, the chain rule has to be used at least twice. The first one is easy, and can be summarized in vector form,

$$\vec \nabla_{x_2} = -\vec \nabla_{x_2} = \nabla_r$$

In English, $$\vec x_2$$ increases as much as $$\vec r$$ does, and $$x_1$$ decreases as much as $$\vec r$$ increases.

The second part is harder, since it requires going from $$\vec r$$ dependence to $$\vec r$$ dependence.

It is written in vector form as,

$$ \vec \nabla_r U(r) = \frac{\vec r}{r} \frac{dU(r)}{dr}$$

= Example Implemenentation =

This example shows the steps needed to run a 2-particle simulation in outline form. It is not complete, since the functions are not yet implemented.