User:Xyzheng/distance of closest approach of two hard ellipses



The distance of closest approach of hard particles is a key parameter of their interaction and plays an important role in the resulting phase behavior. For non-spherical particles, the distance of closest approach depends on orientation, and its calculation can be surprisingly difficult. Although overlap criteria have been developed for use in computer simulations, analytic solutions for the distance of closest approach and the location of the point of contact have only recently become available. The details of the calculations are provided in Ref. . The Fortran90 subroutine are provided in Ref.

The Method
The procedure constists of three steps:
 * 1) Transformation of the two tangent ellipses $$E_1$$ and $$E_2$$, whose centers are joined by the vector $$d$$, into a circle $$ C_1'$$ and an ellipse $$ E_2'$$, whose centers are joined by the vector $$d'$$. The circle $$ C_1'$$  and the ellipse $$ E_2'$$  remain tangent after the transformation.
 * 2) Determination of the distance $$d'$$ of closest approach of $$ C_1'$$ and $$ E_2'$$ analytically. It requires the appropriate solution of a quartic equation. The normal $$ n'$$ is calculated.
 * 3) Determination of the distance $$d$$ of closest approach and the location of the point of contact of $$ E_1$$  and $$ E_2$$ by the inverse transformations of the vectors $$d'$$ and $$n'$$.

Input:
 * lengths of the semiaxes $$a_1,b_1,a_2, b_2$$,
 * unit vectors $$k_1$$,$$k_2 $$ along major axes of both ellipses, and
 * unit vector $$d$$ joining the centers of the two ellipses.

Output:
 * distance $$d$$ between the centers when the ellipses $$E_1$$ and $$ E_2$$ are externally tangent, and
 * location of point of contact in terms of $$k_1$$,$$k_2 $$.