import numpy as np
from echoes import *
import math
np.set_printoptions(precision=6, suppress=True)
# to display only 6 significant digits of array components3 Special tensors
Second-order identity
The second-order identity \(\uu{1}=\delta_{ij}\ve{i}\otimes\ve{j}\) is given in Kelvin-Mandel notation (i.e. vector of \(\R^6\)) by the constant vector Id2
δ = Id2
print("𝟏 (Kelvin-Mandel notation) =\n",δ)
print("𝟏 =\n",invKM(δ))𝟏 (Kelvin-Mandel notation) =
[1. 1. 1. 0. 0. 0.]
𝟏 =
[[1. 0. 0.]
[0. 1. 0.]
[0. 0. 1.]]
Fourth-order isotropic tensors
As detailed in Section A.4, the fourth-order identity tensor is
\[ \uuuu{I}=\uu{1}\sboxtimes\uu{1}= \frac{\delta_{ik}\delta_{jl}+\delta_{il}\delta_{jk}}{2}\,\ve{i}\otimes\ve{j}\otimes\ve{k}\otimes\ve{l} \]
and the projectors
\[ \uuuu{J}=\frac{1}{3}\uu{1}\otimes\uu{1} \quad \textrm{and} \quad \uuuu{K}=\uuuu{I}-\uuuu{J}=\uu{1}\sboxtimes\uu{1}-\frac{1}{3}\uu{1}\otimes\uu{1} \]
which are provided in echoes by Id4, J4 and K4
for T in [Id4, J4, K4]:
print(T)[[1. 0. 0. 0. 0. 0.]
[0. 1. 0. 0. 0. 0.]
[0. 0. 1. 0. 0. 0.]
[0. 0. 0. 1. 0. 0.]
[0. 0. 0. 0. 1. 0.]
[0. 0. 0. 0. 0. 1.]]
[[0.333333 0.333333 0.333333 0. 0. 0. ]
[0.333333 0.333333 0.333333 0. 0. 0. ]
[0.333333 0.333333 0.333333 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]]
[[ 0.666667 -0.333333 -0.333333 0. 0. 0. ]
[-0.333333 0.666667 -0.333333 0. 0. 0. ]
[-0.333333 -0.333333 0.666667 0. 0. 0. ]
[ 0. 0. 0. 1. 0. 0. ]
[ 0. 0. 0. 0. 1. 0. ]
[ 0. 0. 0. 0. 0. 1. ]]
Walpole bases
The Walpole bases are useful to decompose transversely isotropic fourth-order tensors. They are presented in Section A.5. The Kelvin-Mandel representation of the \(i^\textrm{th}\) Walpole tensor oriented along an axis \(\n\) is constructed by W(i,n=e₃) (\(i \in \{0,..,5\}\) and the normal is by default oriented along the third axis). The symmetrized version is provided by WS(i,n=e₃) (\(i \in \{0,..,4\}\)).
Note again the shift in indices between the Python convention starting at 0 and the tensors presented in Section A.5.
for i in range(6):
print("𝕎"+str(i+1)+" =\n",W(i))
for i in range(5):
print("𝕎ˢ"+str(i+1)+" =\n",WS(i))𝕎1 =
[[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]
[0. 0. 1. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]]
𝕎2 =
[[0.5 0.5 0. 0. 0. 0. ]
[0.5 0.5 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]]
𝕎3 =
[[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0.707107 0.707107 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]]
𝕎4 =
[[0. 0. 0.707107 0. 0. 0. ]
[0. 0. 0.707107 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]]
𝕎5 =
[[ 0.5 -0.5 0. 0. 0. 0. ]
[-0.5 0.5 0. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 1. ]]
𝕎6 =
[[0. 0. 0.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