homopy.tensor module
Created on Wed Apr 27 21:09:24 2022
@author: nicolas.christ@kit.edu
Tensor class for basic arithmetic operations. More information on tensor representation in Voigt and Mandel notations are given in [Brannon2018].
- class homopy.tensor.Tensor[source]
Bases:
object
Tensor class to help with basic arithmetic operations on tensor space.
- Variables:
~Tensor.e1 (ndarray of shape (3,)) – Vector 1 of orthonormalbasis of 1st order tensors.
~Tensor.e2 (ndarray of shape (3,)) – Vector 2 of orthonormalbasis of 1st order tensors.
~Tensor.e3 (ndarray of shape (3,)) – Vector 3 of orthonormalbasis of 1st order tensors.
~Tensor.B (ndarray of shape (3, 3, 6)) – Orthonormalbasis of 4th order tensors in normalized Voigt notation.
- _diade(di, dj)[source]
Return diadic product of two directional vectors. This is used to calculate the basis tensors in the normalized Voigt notation.
- Parameters:
di (ndarray of shape (3,)) – Directional vector #1.
dj (ndarray of shape (3,)) – Directional vector #2.
- Returns:
ndarray of shape (3, 3) – Tensor of 2nd order in tensor notation.
- _diade4(bi, bj)[source]
Return diadic product of two tensors. This is used to transfer stiffness tensors from normalized Voigt notation to regular tensor notation.
- Parameters:
bi (ndarray of shape (3, 3)) – Orthonormal basis tensor #1.
bj (ndarray of shape (3, 3)) – Orthonormal basis tensor #2.
- Returns:
ndarray of shape (3, 3, 3, 3) – Tensor of 4th order in tensor notation.
- tensor_product(tensor_a, tensor_b)[source]
Return the mapping of one tensor of 4th order to another in the normalized Voigt notation.
- Parameters:
tensor_a (ndarray of shape (6, 6)) – Tensor #1.
tensor_b (ndarray of shape (6, 6)) – Tensor #2.
- Returns:
ndarray of shape (6, 6) – Resulting mapping.
- matrix2voigt(matrix)[source]
Return the Voigt notation of a tensor of 2nd order calculated from the regular tensor notation.
- Parameters:
matrix (ndarray of shape (3, 3)) – Tensor of 2nd order in regular tensor notation.
- Returns:
ndarray of shape (6,) – Tensor in Voigt notation.
- matrix2mandel(matrix)[source]
Return the normalized Voigt notation of a tensor of 2nd order calculated from the regular tensor notation.
- Parameters:
matrix (ndarray of shape (3, 3)) – Tensor of 2nd order in regular tensor notation.
- Returns:
ndarray of shape (6,) – Tensor in normalized Voigt notation.
- tensor2mandel(tensor)[source]
Return the normalized Voigt (Mandel) notation of a tensor of 4th order calculated fromthe regular tensor notation.
- Parameters:
tensor (ndarray of shape (3, 3, 3, 3)) – Tensor of 4th order in regular tensor notation.
- Returns:
ndarray of shape (6, 6) – Tensor in normalized Voigt notation.
- mandel2tensor(mandel)[source]
Return the regular tensor notation of a tensor calculated from the normalized Voigt (Mandel) notation.
- Parameters:
mandel (ndarray of shape (6, 6)) – Tensor of 4th order in normalized Voigt notation.
- Returns:
tensor (ndarray of shape (3, 3, 3, 3)) – Tensor in regular tensor notation.