Operators: Deviators and Application to Fiber Orientation TensorsΒΆ

[1]:
import mechkit
import numpy as np
[2]:
np.set_printoptions(
    linewidth=140,
    precision=3,
    # suppress=False,
)
converter = mechkit.notation.Converter()
[3]:
# Define convenient function
def print_N2_and_deviators(N4_mandel):
    N4 = converter.to_tensor(N4_mandel)
    dev_N4 = converter.to_mandel6(mechkit.operators.dev(N4, order=4))

    N2 = np.einsum("ijkk->ij", N4)
    dev_N2 = mechkit.operators.dev(N2, order=2)

    print("N4=")
    print(N4_mandel)
    print("dev_N4=")
    print(dev_N4)

    print("N2=")
    print(N2)
    print("dev_N2=")
    print(dev_N2)
[4]:
# ## Isotropic N4: No deviation from the isotropic fourth order fiber orientation tensor
print("Isotropic")
print_N2_and_deviators(N4_mandel=mechkit.fabric_tensors.Basic().N4["iso"])
Isotropic
N4=
[[0.2   0.067 0.067 0.    0.    0.   ]
 [0.067 0.2   0.067 0.    0.    0.   ]
 [0.067 0.067 0.2   0.    0.    0.   ]
 [0.    0.    0.    0.133 0.    0.   ]
 [0.    0.    0.    0.    0.133 0.   ]
 [0.    0.    0.    0.    0.    0.133]]
dev_N4=
[[ 1.943e-16 -2.429e-17 -2.429e-17  0.000e+00  0.000e+00  0.000e+00]
 [-2.429e-17  1.943e-16 -2.429e-17  0.000e+00  0.000e+00  0.000e+00]
 [-2.429e-17 -2.429e-17  1.943e-16  0.000e+00  0.000e+00  0.000e+00]
 [ 0.000e+00  0.000e+00  0.000e+00 -4.857e-17  0.000e+00  0.000e+00]
 [ 0.000e+00  0.000e+00  0.000e+00  0.000e+00 -4.857e-17  0.000e+00]
 [ 0.000e+00  0.000e+00  0.000e+00  0.000e+00  0.000e+00 -4.857e-17]]
N2=
[[0.333 0.    0.   ]
 [0.    0.333 0.   ]
 [0.    0.    0.333]]
dev_N2=
[[0.000e+00 0.000e+00 0.000e+00]
 [0.000e+00 0.000e+00 0.000e+00]
 [0.000e+00 0.000e+00 5.551e-17]]
[5]:
# ## Unidirectional N4: Large deviations from isotropic fourth order fiber orientation tensor
print("Unidirectional")
print_N2_and_deviators(N4_mandel=mechkit.fabric_tensors.Basic().N4["ud_x"])
Unidirectional
N4=
[[1. 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. 0.]
 [0. 0. 0. 0. 0. 0.]]
dev_N4=
[[ 0.229 -0.114 -0.114  0.     0.     0.   ]
 [-0.114  0.086  0.029  0.     0.     0.   ]
 [-0.114  0.029  0.086  0.     0.     0.   ]
 [ 0.     0.     0.     0.057  0.     0.   ]
 [ 0.     0.     0.     0.    -0.229  0.   ]
 [ 0.     0.     0.     0.     0.    -0.229]]
N2=
[[1. 0. 0.]
 [0. 0. 0.]
 [0. 0. 0.]]
dev_N2=
[[ 0.667  0.     0.   ]
 [ 0.    -0.333  0.   ]
 [ 0.     0.    -0.333]]