PetMetz / pymls

Python implementation of the dislocation contrast factor calculation reported by Martinez-Garcia, Leoni, and Scardi
Other
0 stars 0 forks source link

Resolve conventions #4

Closed PetMetz closed 1 year ago

PetMetz commented 2 years ago

The Lattice class was initially typed up using Julian (2014) Foundations of Crystallography as a reference, which is aimed at MATLAB and hence column-major. The implemented lattice matrix is row-major (numpy) and takes the first crystal vector $[a,0,0]$.

Consequently, the direct lattice matrix in row-major format

[\vec{a}_1, \vec{a}_2, \vec{a}_3]  = \left[
\begin{matrix}
    a_{11} & a_{12} & a_{13} \\
    a_{21} & a_{22} & a_{21} \\
    a_{31} & a_{32} & a_{33} 
\end{matrix}
\right]

is asymmetric with elements like

[\vec{a}_1, \vec{a}_2, \vec{a}_3]  = \left[
\begin{matrix}
    a_{11} & 0 & 0 \\
    a_{21} & a_{22} & 0 \\
    a_{31} & a_{32} & a_{33} 
\end{matrix}
\right].

By definition, the reciprocal lattice matrix is composed of vectors $b_i$ given by the cyclic permutation of $ijk$

b_i = \frac{a_j \times a_k}{a_i \cdot (a_j \times a_k)}

or equivalently

[\vec{b}_1,\vec{b}_2,\vec{b}_3]^T = [\vec{a}_1, \vec{a}_2, \vec{a}_3]^{-1}

whence we find the reciprocal lattice matrix is asymmetric with elements like

[\vec{b}_1, \vec{b}_2, \vec{b}_3]  = \left[
\begin{matrix}
    b_{11} & b_{12} & b_{13} \\
    0        & b_{22} & b_{21} \\
    0        & 0         & b_{33} 
\end{matrix}
\right].

The definition of $M$ given in the MLS (2014) paper does not state which conventions they subscribe to, but write

M = \left[
\begin{matrix}
   \frac{1}{a}  &  0  &  0 \\
   \frac{-cos(\gamma)}{a\ sin(\gamma)} & \frac{1}{b\ sin(\gamma)} & 0 \\
   a^*\ cos(\beta^*) & b^*\ cos(\alpha^*) & c^*
\end{matrix}
\right]

and

G_m = M^{-1}(M^{-1})^T

where $G_m$ is the metric tensor of the direct crystal lattice, ${a,b,c,\alpha,\beta,\gamma}$ have their usual crystallographic meaning, and $^*$ indicates a reciprocal lattice quantity.

Consequently, in the notation of MLS (2014):

PetMetz commented 2 years ago

Should also test and confirm conventions in the formulation of $P$, the rotation matrix $R(\phi,\vec{e}_2)$, ...

PetMetz commented 2 years ago

Formulation of rotation matrix of $\vec{b}$ around $\xi_2$ by $\phi$ has been rewritten in a conventional matrix formulation. Should check handedness reference to MLS description.

Worryingly, $\vec{e}_1 = \vec{e}_2 \times \vec{e}_3$, where $e_i$ is the orthonormal basis of the dislocation reference frame, is not a unit vector.

Since the length of the cross product is the area of the corresponding parallelogram, this implies vectors $e_2$ and $e_3$ are also not orthogonal.