Apply a rotation to stiffness tensors

This example shows how to apply a rotation to a stiffness tensor.

Define the stiffness tensor for copper

We define the stiffness tensor for a cubic copper using its elastic constants. They are taken from the Materials Project (mp-30).

from elasticipy.tensors.elasticity import StiffnessTensor
C = StiffnessTensor.cubic(C11=186, C12=134, C44=77)
print(C)
Stiffness tensor (in Voigt mapping):
[[186. 134. 134.   0.   0.   0.]
 [134. 186. 134.   0.   0.   0.]
 [134. 134. 186.   0.   0.   0.]
 [  0.   0.   0.  77.   0.   0.]
 [  0.   0.   0.   0.  77.   0.]
 [  0.   0.   0.   0.   0.  77.]]

Plot the the Young modulus of the crystal

The illustrates the cubic symmetries of the elastic moduli, one can look at the Young modulus:



Rotate the tensor

Assume a rotation of 30° around the X axis:

from scipy.spatial.transform import Rotation
r = Rotation.from_euler('X', 30, degrees=True)

Now apply rotation, and check out the “shape” of such tensor:

Crot = C * r
print(Crot)
Stiffness tensor (in Voigt mapping):
[[186.   134.   134.     0.     0.     0.  ]
 [134.   224.25  95.75 -22.08   0.     0.  ]
 [134.    95.75 224.25  22.08   0.     0.  ]
 [  0.   -22.08  22.08  38.75   0.     0.  ]
 [  0.     0.     0.     0.    77.     0.  ]
 [  0.     0.     0.     0.     0.    77.  ]]

Finally, plot the corresponding Young modulus:



Total running time of the script: (0 minutes 0.046 seconds)

Gallery generated by Sphinx-Gallery