# Axis transformation

If the material and local axes are not aligned the constitutive relationship needs to be transformed into the local axes of the element. If $l_i, m_i, n_i$ are the direction cosines relating the material axes, $x_i'$ to the local axes $x_i$ such that

$x_i' = l_i x_1+ m_i x_2 + n_i x_3 \qquad for \: i=1,2,3$

In the local axes the stress and strain relationship becomes

$\sigma = C \epsilon = T^T C_m T \epsilon$

where $T$ is

$T= \begin{bmatrix} l_1^2 & m_1^2 & n_1^2 & l_1 m_1 & m_1 n_1 & n_1 l_1 \\ l_2^2 & m_2^2 & n_2^2 & l_2 m_2 & m_2 n_2 & n_2 l_2 \\ l_3^2 & m_3^2 & n_3^2 & l_3 m_3 & m_3 n_3 & n_3 l_3 \\ 2 l_1 l_2 & 2m_1 m_2 & 2 n_1 n_2 & (l_1 m_2 + l_2 m_1) & (m_1 n_2 + m_2 n_1) & (n_1 l_2 + n_2 l_1) \\ 2 l_2 l_3 & 2m_2 m_3 & 2 n_2 n_3 & (l_2 m_3 + l_3 m_2) & (m_2 n_3 + m_3 n_2) & (n_2 l_3 + n_3 l_2) \\ 2 l_3 l_1 & 2m_3 m_1 & 2 n_3 n_1 & (l_3 m_1 + l_1 m_3) & (m_3 n_1 + m_1 n_3) & (n_3 l_1 + n_1 l_3) \\ \end{bmatrix}$

As an example if the material $x$ and $y$ axes are rotated 90° from the local axes the transformation matrix becomes

$T= \begin{bmatrix} 0 & 1 & 0 & 0 & 0 & 0 \\ -1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & -1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & -1 \\ 0 & 0 & 0 & 0 & 1 & 0 \\ \end{bmatrix}$

Multiplying the constitutive relationship results in an updated constitutive matrix

$C= \begin{bmatrix} c_{22} & c_{21} & c_{23} & 0 & 0 & 0 \\ c_{12} & c_{11} & c_{13} & 0 & 0 & 0 \\ c_{32} & c_{31} & c_{33} & 0 & 0 & 0 \\ 0 & 0 & 0 & c_{44} & 0 & 0 \\ 0 & 0 & 0 & 0 & c_{66} & 0 \\ 0 & 0 & 0 & 0 & 0 & c_{55} \\ \end{bmatrix}$