scikit-elasticity

A library for working with anisotropic elasticity in Python.

Homogenization

Calculation of elastic constants from elastic stiffness and a list of orientations.

>>> import skel
>>> import damask
>>> import numpy as np

>>> N = 1000
>>> C_Al = skel.stiffness('cubic',C_11=106.9e9,C_12=60.5e9,C_44=28.4e9)
>>> O = damask.Rotation.from_random(N)
>>> p = skel.Polycrystal(C_Al,O)
>>> with np.printoptions(precision=2,suppress=True):
>>>    print(p.C_Reuss/1e9)
>>>    print(p.C_Voigt/1e9)
>>>    print(p.C_Hill_C/1e9)
>>>    print(p.C_Hill_S/1e9)
class skel.VolumeElement(C, O)[source]
property C_Hill

Homogenized stiffness according to Hill.

Average of C and S average from Voigt and Reuss.

property C_Hill_C

Homogenized stiffness according to Hill.

Average of C from Voigt and Reuss.

property C_Hill_S

Homogenized stiffness according to Hill.

Average of S from Voigt and Reuss.

property C_Hill_geometric

Homogenized stiffness according to Hill.

property C_Reuss

Homogenized compliance according to Reuss.

property C_Voigt

Homogenized stiffness according to Voigt.

property S_Hill

Homogenized compliance according to Hill.

Average of S and C average from Voigt and Reuss.

property S_Hill_C

Homogenized compliance according to Hill.

Average of C from Voigt and Reuss.

property S_Hill_S

Homogenized compliance according to Hill.

Average of S from Voigt and Reuss.

property S_Hill_geometric

Homogenized compliance according to Hill.

property S_Reuss

Homogenized stiffness according to Reuss.

property S_Voigt

Homogenized compliance according to Voigt.

Conversions and Representations

skel.Voigt.rotate_compliance(O, S_tilde)[source]

Rotate symmetric 4th order compliance tensor in Voigt notation.

Parameters

O: damask.Orientation of shape (…)

Orientations.

S_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order compliance tensor in Voigt notation.

Returns

S_tilde’numpy.ndarray of shape (…,6,6)

Rotated 4th order compliance tensor in Voigt notation.

skel.Voigt.rotate_stiffness(O, C_tilde)[source]

Rotate symmetric 4th order stiffness tensor in Voigt notation.

Parameters

O: damask.Orientation of shape (…)

Orientations.

C_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order stiffness tensor in Voigt notation.

Returns

C_tilde’numpy.ndarray of shape (…,6,6)

Rotated 4th order stiffness tensor in Voigt notation.

skel.Voigt.rotate_strain(O, epsilon_tilde)[source]

Rotate symmetric 2nd order strain tensor in Voigt notation.

Parameters

O: damask.Orientation of shape (…)

Orientations.

epsilon_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order strain tensor in Voigt notation.

Returns

epsilon_tilde’numpy.ndarray of shape (…,6)

Rotated 2nd order strain tensor in Voigt notation.

skel.Voigt.rotate_stress(O, sigma_tilde)[source]

Rotate symmetric 2nd order stress tensor in Voigt notation.

Parameters

O: damask.Orientation of shape (…)

Orientations.

sigma_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order stress tensor in Voigt notation.

Returns

sigma_tilde’numpy.ndarray of shape (…,6)

Rotated 2nd order stress tensor in Voigt notation.

skel.Voigt.to_3x3_strain(epsilon_tilde)[source]

Convert symmetric 2nd order strain tensor in Voigt notation to matrix notation.

Parameters

epsilon_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order strain tensor in Voigt notation.

Returns

epsilonnumpy.ndarray of shape (…,3,3)

Symmetric 2nd order strain tensor in matrix notation.

skel.Voigt.to_3x3_stress(sigma_tilde)[source]

Convert symmetric 2nd order stress tensor in Voigt notation to matrix notation.

Parameters

sigma_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order stress tensor in Voigt notation.

Returns

sigmanumpy.ndarray of shape (…,3,3)

Symmetric 2nd order stress tensor in matrix notation.

skel.Voigt.to_3x3x3x3_compliance(S_tilde)[source]

Convert symmetric 4th order compliance tensor in Voigt notation to matrix notation.

Parameters

S_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order tensor in Voigt notation.

Returns

Snumpy.ndarray of shape (…,3,3,3,3)

Symmetric 4th order compliance tensor in matrix notation.

skel.Voigt.to_3x3x3x3_stiffness(C_tilde)[source]

Convert symmetric 4th order stiffness tensor in Voigt notation to matrix notation.

Parameters

C_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order stiffness tensor in Voigt notation.

Returns

Cnumpy.ndarray of shape (…,3,3,3,3)

Symmetric 4th order stiffness tensor in matrix notation.

skel.Voigt.to_6_strain(epsilon)[source]

Convert symmetric 2nd order strain tensor in matrix notation to Voigt notation.

Parameters

epsilonnumpy.ndarray of shape (…,3,3)

Symmetric 2nd order strain tensor in matrix notation.

Returns

epsilon_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order strain tensor in Voigt notation.

skel.Voigt.to_6_stress(sigma)[source]

Convert symmetric 2nd order stress tensor in matrix notation to Voigt notation.

Parameters

sigmanumpy.ndarray of shape (…,3,3)

Symmetric 2nd order stress tensor in matrix notation.

Returns

sigma_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order stress tensor in Voigt notation.

skel.Voigt.to_6x6_compliance(S)[source]

Convert symmetric 4th order compliance tensor in matrix notation to Voigt notation.

Parameters

Snumpy.ndarray of shape (…,3,3,3,3)

Symmetric 4th order compliance tensor in matrix notation.

Returns

S_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order compliance tensor in Voigt notation.

skel.Voigt.to_6x6_stiffness(C)[source]

Convert symmetric 4th order stiffness tensor in matrix notation to Voigt notation.

Parameters

Cnumpy.ndarray of shape (…,3,3,3,3)

Symmetric 4th order stiffness tensor in matrix notation.

Returns

C_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order stiffness tensor in Voigt notation.

skel.Mandel.rotate_2nd(O, t_tilde)[source]

Rotate symmetric 2nd order tensor in Mandel notation.

Parameters

O: damask.Orientation of shape (…)

Orientations.

t_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order tensor in Mandel notation.

Returns

t_tilde’numpy.ndarray of shape (…,6)

Rotated 2nd order tensor in Mandel notation.

Notes

Due to the definition of the Mandel notation, this function can be used to rotate strain and stress tensors.

skel.Mandel.rotate_4th(O, T_tilde)[source]

Rotate symmetric 4th order tensor in Mandel notation.

Parameters

O: damask.Orientation of shape (…)

Orientations.

T_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order tensor in Mandel notation.

Returns

T_tilde’numpy.ndarray of shape (…,6,6)

Rotated 4th order tensor in Mandel notation.

Notes

Due to the definition of the Mandel notation, this function can be used to rotate compliance and stiffness tensors.

skel.Mandel.rotate_compliance(O, S_tilde)[source]

Rotate symmetric 4th order compliance tensor in Mandel notation.

Parameters

O: damask.Orientation of shape (…)

Orientations.

S_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order compliance tensor in Mandel notation.

Returns

S_tilde’numpy.ndarray of shape (…,6,6)

Rotated 4th order compliance tensor in Mandel notation.

skel.Mandel.rotate_stiffness(O, C_tilde)[source]

Rotate symmetric 4th order stiffness tensor in Mandel notation.

Parameters

O: damask.Orientation of shape (…)

Orientations.

C_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order stiffness tensor in Mandel notation.

Returns

C_tilde’numpy.ndarray of shape (…,6,6)

Rotated 4th order stiffness tensor in Mandel notation.

skel.Mandel.rotate_strain(O, epsilon_tilde)[source]

Rotate symmetric 2nd order strain tensor in Mandel notation.

Parameters

O: damask.Orientation of shape (…)

Orientations.

epsilon_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order strain tensor in Mandel notation.

Returns

epsilon_tilde’numpy.ndarray of shape (…,6)

Rotated 2nd order strain tensor in Mandel notation.

skel.Mandel.rotate_stress(O, sigma_tilde)[source]

Rotate symmetric 2nd order stress tensor in Mandel notation.

Parameters

O: damask.Orientation of shape (…)

Orientations.

sigma_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order stress tensor in Mandel notation.

Returns

sigma_tilde’numpy.ndarray of shape (…,6)

Rotated 2nd order stress tensor in Mandel notation.

skel.Mandel.to_3x3(t_tilde)[source]

Convert symmetric 2nd order tensor in Mandel notation to matrix notation.

Parameters

t_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order tensor in Mandel notation.

Returns

tnumpy.ndarray of shape (…,3,3)

Symmetric 2nd order tensor in matrix notation.

Notes

Due to the definition of the Mandel notation, this function can be used to convert strain and stress tensors.

skel.Mandel.to_3x3_strain(epsilon_tilde)[source]

Convert symmetric 2nd order strain tensor in Mandel notation to matrix notation.

Parameters

epsilon_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order strain tensor in Mandel notation.

Returns

epsilonnumpy.ndarray of shape (…,3,3)

Symmetric 2nd order strain tensor in matrix notation.

skel.Mandel.to_3x3_stress(sigma_tilde)[source]

Convert symmetric 2nd order stress tensor in Mandel notation to matrix notation.

Parameters

sigma_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order stress tensor in Mandel notation.

Returns

sigmanumpy.ndarray of shape (…,3,3)

Symmetric 2nd order stress tensor in matrix notation.

skel.Mandel.to_3x3x3x3(T_tilde)[source]

Convert symmetric 4th order tensor in Mandel notation to matrix notation.

Parameters

T_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order tensor in Mandel notation.

Returns

Tnumpy.ndarray of shape (…,3,3,3,3)

Symmetric 4th order tensor in matrix notation.

Notes

Due to the definition of the Mandel notation, this function can be used to convert compliance and stiffness tensors.

skel.Mandel.to_3x3x3x3_compliance(S_tilde)[source]

Convert symmetric 4th order compliance tensor in Mandel notation to matrix notation.

Parameters

S_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order tensor in Mandel notation.

Returns

Snumpy.ndarray of shape (…,3,3,3,3)

Symmetric 4th order compliance tensor in matrix notation.

skel.Mandel.to_3x3x3x3_stiffness(C_tilde)[source]

Convert symmetric 4th order stiffness tensor in Mandel notation to matrix notation.

Parameters

C_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order stiffness tensor in Mandel notation.

Returns

Cnumpy.ndarray of shape (…,3,3,3,3)

Symmetric 4th order stiffness tensor in matrix notation.

skel.Mandel.to_6(t)[source]

Convert symmetric 2nd order tensor in matrix notation to Mandel notation.

Parameters

tnumpy.ndarray of shape (…,3,3)

Symmetric 2nd order tensor in matrix notation.

Returns

t_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order tensor in Mandel notation.

Notes

Due to the definition of the Mandel notation, this function can be used to convert strain and stress tensors.

skel.Mandel.to_6_strain(epsilon)[source]

Convert symmetric 2nd order strain tensor in matrix notation to Mandel notation.

Parameters

epsilonnumpy.ndarray of shape (…,3,3)

Symmetric 2nd order strain tensor in matrix notation.

Returns

epsilon_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order strain tensor in Mandel notation.

skel.Mandel.to_6_stress(sigma)[source]

Convert symmetric 2nd order stress tensor in matrix notation to Mandel notation.

Parameters

sigmanumpy.ndarray of shape (…,3,3)

Symmetric 2nd order stress tensor in matrix notation.

Returns

sigma_tilde: numpy.ndarray of shape (…,6)

Symmetric 2nd order stress tensor in Mandel notation.

skel.Mandel.to_6x6(T)[source]

Convert symmetric 4th order tensor in matrix notation to Mandel notation.

Parameters

Tnumpy.ndarray of shape (…,3,3,3,3)

Symmetric 4th order tensor in matrix notation.

Returns

T_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order tensor in Mandel notation.

Notes

Due to the definition of the Mandel notation, this function can be used to convert compliance and stiffness tensors.

skel.Mandel.to_6x6_compliance(S)[source]

Convert symmetric 4th order compliance tensor in matrix notation to Mandel notation.

Parameters

Snumpy.ndarray of shape (…,3,3,3,3)

Symmetric 4th order compliance tensor in matrix notation.

Returns

S_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order compliance tensor in Mandel notation.

skel.Mandel.to_6x6_stiffness(C)[source]

Convert symmetric 4th order stiffness tensor in matrix notation to Mandel notation.

Parameters

Cnumpy.ndarray of shape (…,3,3,3,3)

Symmetric 4th order stiffness tensor in matrix notation.

Returns

C_tilde: numpy.ndarray of shape (…,6,6)

Symmetric 4th order stiffness tensor in Mandel notation.