I'm trying to find values of stress (2nd rank tensor, here shown as principal stress matrix - eigenvalues along x,y,z eigenvectors):
$$ \pmb{\sigma}= \begin{bmatrix} \sigma_{x} & 0 & 0\\0 & \sigma_{y} & 0\\ 0 & 0 & \sigma_{z} \end{bmatrix} $$
along axes of a given coordinate system X,Y,Z (hence, $\sigma_{X}, \sigma_{Y}$ and $\sigma_{Z}$).
$$ \pmb{\sigma}= \begin{bmatrix} \sigma_{X} & \sigma_{XY} & \sigma_{XZ}\\\sigma_{YX} & \sigma_{Y} & \sigma_{YZ}\\ \sigma_{ZX} & \sigma_{ZY} & \sigma_{Z} \end{bmatrix} $$
I know the angles between the eigenvectors of the stress tensor (x,y,z) and the axes of the system (X,Y,Z).
(corresponding figure: http://anorganik.uni-tuebingen.de/klaus/nmr/conventions/euler/euler.gif)
Is there any way I could use these angles to obtain Euler angles to carry out this rotation? I'm not really interested in the exact rotation angles $\alpha, \beta$ (although this one is known) and $ \gamma$, as far as I get correct diagonal elements of the rotated stress matrix for given x-X, y-Y, z-Z angles. Or maybe there is a different, better way to do it without using Euler angles?
I would really appreciate any help. Best regards!
The eigenvectors of the stress tensor define the 3×3 rotation matrix for the principal axes.
How?
Consider a matrix $\boldsymbol{A}$ with three eigenvalues $\lambda_1$, $\lambda_2$ and $\lambda_3$ and the corresponding eigenvectors
$$ \begin{aligned} \boldsymbol{u} & = \pmatrix{u_x \\ u_y \\ u_z} & \boldsymbol{v} & = \pmatrix{v_x \\ v_y \\ v_z} & \boldsymbol{w} & = \pmatrix{w_x \\ w_y \\ w_z} & \end{aligned} $$
Subject to the normalizations $\boldsymbol{u}^\top \boldsymbol{u}=1$, $\boldsymbol{v}^\top \boldsymbol{v}=1$ and $\boldsymbol{w}^\top \boldsymbol{w}=1$.
Now construct the rotation matrix from the columns of the eigenvectors
$$\mathbf{R}=\left[\begin{array}{c|c|c} \vdots & \vdots & \vdots\\ \boldsymbol{u} & \boldsymbol{v} & \boldsymbol{w}\\ \vdots & \vdots & \vdots \end{array}\right]$$
This allows for the decomposition of $\boldsymbol{A}$ by
$$ \boldsymbol{A} = \mathbf{R}^{-1} \underbrace{\begin{bmatrix}\lambda_{1}\\ & \lambda_{2}\\ & & \lambda_{3} \end{bmatrix}}_{\boldsymbol{D}} \mathbf{R} $$
or
$$ \boldsymbol{D} = \mathbf{R}\, \boldsymbol{A}\, \mathbf{R}^{-1} $$
Note that the three eigenvectors should be orthogonal such that $\boldsymbol{u}^\top \boldsymbol{v}=0$, $\boldsymbol{v}^\top \boldsymbol{w}=0$ and $\boldsymbol{w}^\top \boldsymbol{u}=0$ which means that $\mathbf{R}^{-1} = \mathbf{R}^\top$.
Note that you can go from $\mathbf{R}$ to any set of Euler angles you want using any 3D math library available to you.
You can kind of prove the above when considering the eigenvalue problem
$$ \boldsymbol{A} \boldsymbol{x} = \lambda \boldsymbol{x} $$
and the transformation of coordinates $\boldsymbol{q} = \mathbf{R} \boldsymbol{x}$ and use it above as
$$ \boldsymbol{A} \mathbf{R}^{-1} \boldsymbol{q} = \lambda \mathbf{R}^{-1} \boldsymbol{q} $$ and
$$ \left(\mathbf{R} \boldsymbol{A} \mathbf{R}^{-1} \right) \boldsymbol{q} = \lambda \left(\mathbf{R} \mathbf{R}^{-1} \right) \boldsymbol{q} = \lambda \boldsymbol{q} $$
or
$$ \mathbf{R} \boldsymbol{A} \mathbf{R}^{-1} = \underbrace{ \lambda\; \mathbf{1}}_{\rm diag} = \boldsymbol{D}$$