# DMD:Background:The DMD Model Equations

 Introduction Background Basic Layout Examples Problems Run Simulation Assessment Credits Etomica Modules

The relationship between time and position gives:

${\displaystyle (1)r_{ij}=r_{i}-r_{j}=(r_{i}^{0}+u_{i}(t-t_{0}))-(r_{j}^{0}+u_{j}(t-t_{0}))}$
${\displaystyle =(r_{ij}^{x},r_{ij}^{y},r_{ij}^{z})}$

where ${\displaystyle r_{i}}$ is the vector ${\displaystyle (r_{i}^{x},r_{i}^{y},r_{i}^{z})}$ position of the ${\displaystyle i^{th}}$ particle and ${\displaystyle u_{i}}$ is the vector velocity.
Note: html to make bold typeface for vectors in math mode is unknown to this author. Sorry.
At the time of contact, ${\displaystyle t_{ij}^{c}}$, we have ,

${\displaystyle (2)\sigma _{ij}^{2}=(r_{ij}^{c})^{2}=\{(r_{i}^{0}+u_{i}t_{ij}^{c})-(r_{j}^{0}+u_{j}t_{ij}^{c})\}^{2}}$
${\displaystyle \equiv \{(r_{ij}+u_{ij}t_{ij}^{c})\}^{2}=\{r_{ij}\bullet r_{ij}+2t_{ij}^{c}r_{ij}\bullet u_{ij}+u_{ij}(t_{ij}^{c})^{2}\}}$

Where ${\displaystyle r_{ij}=(r_{ij}\bullet r_{ij})^{1/2}=\{(r_{ij}^{x})^{2}+(r_{ij}^{y})^{2}+(r_{ij}^{z})^{2}\}^{1/2}}$

The relation leads to a quadratic equation for the ij collision time, ${\displaystyle t_{ij}^{c}\equiv (t_{ij}-t_{0})}$.

${\displaystyle (3)u_{ij}^{2}(t_{ij}^{c})^{2}+2b_{ij}t_{ij}^{c}+r_{ij}^{2}-\sigma _{ij}^{2}=0}$
${\displaystyle (4)t_{ij}^{c}=\{-b_{ij}-(b_{ij}^{2}-u_{ij}^{2}(r_{ij}^{2}-\sigma _{ij}^{2}))^{1/2}\}/u_{ij}^{2}\equiv \{-b_{ij}-D_{ij}^{1/2}\}/u_{ij}^{2}}$

Where :
${\displaystyle (5)b_{ij}=r_{ij}\bullet u_{ij}}$

${\displaystyle (6)u_{ij}^{2}=(u_{i}-u_{j})^{2}}$

${\displaystyle (7)D_{ij}=(b_{ij}^{2}-u_{ij}^{2}(r_{ij}^{2}-\sigma _{ij}^{2}))\equiv }$ discriminant. Note that ${\displaystyle u_{ij}}$ in m/s is a large number while ${\displaystyle r_{ij}}$ is very small.

 ${\displaystyle b_{ij}>0}$(forget about it) ${\displaystyle D_{ij}<0}$(forget about it) ${\displaystyle D_{ij}>0}$(schedule it)

At the time of the collision, the velocities of the particles change according to,

${\displaystyle (8){\frac {\vartriangle u_{i}}{m_{j}}}={\frac {-2(b_{ij}^{c}/\sigma ^{2})r_{ij}^{c}}{(m_{i}+m_{j})}}={\frac {-\vartriangle u_{j}}{m_{i}}}}$

 We can derive this formula by assuming that particle j is stationary (reference frame) and particle i is moving on the x-axis with equal mass. The j-direction after collision is given by the line of action ${\displaystyle r_{ij}^{c}}$, since that is all j feels about momentum change. Conservation of momentum means that ${\displaystyle u_{i}^{f}+u_{j}^{f}=u_{i}^{i}}$ with the geometric interpretation of a sum of vectors in the form of a triangle. Conservation of energy gives ${\displaystyle (u_{i}^{f})^{2}+(u_{j}^{f})^{2}=(u_{i}^{i})^{2}}$. The Pythagorean theorem applied to the conservation of energy means that this triangle must be a right triangle. Therefore, we can rotate the coordinate system such that ${\displaystyle y=u_{i}^{f};x=u_{i}^{f};u_{i}^{f}=u_{i}^{i}cos\theta ;u_{j}^{f}=u_{i}^{i}sine\theta }$

Note that ${\displaystyle r_{ij}^{c}}$ and ${\displaystyle b_{ij}^{c}}$ must be updated to the point of collision before computing the velocity changes.