cratepy.tensor.tensoroperations

Algebraic tensorial operations and standard tensorial operators.

This module is essentially a toolkit containing the definition of several standard tensorial operators (e.g., Kronecker delta, second- and fourth-order identity tensors, rotation tensor) and tensorial operations (e.g., tensorial product, tensorial contraction, spectral decomposition) arising in computational mechanics.

Functions

dyad11

Dyadic product: \(i \otimes j \rightarrow ij\).

dyad22_1

Dyadic product: \(ij \otimes kl \rightarrow ijkl\).

dyad22_2

Dyadic product: \(ik \otimes jl \rightarrow ijkl\).

dyad22_3

Dyadic product: \(il \otimes jk \rightarrow ijkl\).

dot21_1

Single contraction: \(ij \cdot j \rightarrow i\).

dot12_1

Single contraction: \(i \cdot ij \rightarrow j\).

dot42_1

Single contraction: \(ijkm \cdot lm \rightarrow ijkl\).

dot42_2

Single contraction: \(ipkl \cdot jp \rightarrow ijkl\).

dot42_3

Single contraction: \(ijkm \cdot ml \rightarrow ijkl\).

dot24_1

Single contraction: \(im \cdot mjkl \rightarrow ijkl\).

dot24_2

Single contraction: \(jm \cdot imkl \rightarrow ijkl\).

dot24_3

Single contraction: \(km \cdot ijml \rightarrow ijkl\).

dot24_4

Single contraction: \(lm \cdot ijkm \rightarrow ijkl\).

ddot22_1

Double contraction: \(ij : ij \rightarrow \text{scalar}\).

ddot42_1

Double contraction: \(ijkl : kl \rightarrow ij\).

ddot44_1

Double contraction: \(ijmn : mnkl \rightarrow ijkl\).

dd

Kronecker delta function.

get_id_operators

Set common second- and fourth-order identity operators.

spectral_decomposition

Perform spectral decomposition of symmetric second-order tensor.

isotropic_tensor

Isotropic symmetric tensor-valued function of symmetric tensor.

derivative_isotropic_tensor

Derivative of isotropic tensor-valued function of symmetric tensor.

diso_scalars

Auxiliar scalars of derivative of isotropic tensor-valued function.

rotate_tensor

Rotation of \(n\)-dimensional tensor.

rotation_tensor_from_euler_angles

Set rotation tensor from Euler angles (Bunge convention).

Functions

dd(i, j)

Kronecker delta function.

ddot22_1(a2, b2)

ddot42_1(a4, b2)

ddot44_1(a4, b4)

derivative_isotropic_tensor(mode, x)

Derivative of isotropic tensor-valued function of symmetric tensor.

diso_scalars(abc, eigenvalues, fun, fund)

Auxiliar scalars of derivative of isotropic tensor-valued function.

dot12_1(a1, b2)

dot21_1(a2, b1)

dot24_1(a2, b4)

dot24_2(a2, b4)

dot24_3(a2, b4)

dot24_4(a2, b4)

dot42_1(a4, b2)

dot42_2(a4, b2)

dot42_3(a4, b2)

dyad11(a1, b1)

dyad22_1(a2, b2)

dyad22_2(a2, b2)

dyad22_3(a2, b2)

get_id_operators(n_dim)

Set common second- and fourth-order identity operators.

isotropic_tensor(mode, x)

Isotropic symmetric tensor-valued function of symmetric tensor.

rotate_tensor(tensor, r)

Rotation of \(n\)-dimensional tensor.

rotation_tensor_from_euler_angles(euler_deg)

Set rotation tensor from Euler angles (Bunge convention).

spectral_decomposition(x[, is_real_if_close])

Perform spectral decomposition of symmetric second-order tensor.