# How to reproduce this tensor calculation with Mathematica [closed]

The tensor operation shown in the red box is used in the textbook(P117-P120) to prove that there are only 9 independent constants for orthotropic materials:

I want to use MMA to reproduce the operation of $$C_{pqmn}=l_{ip}\;l_{jq}\;l_{km}\;l_{ln}\;C_{ijkl}$$ (Where $$C_{ijkl}$$ is the stiffness tensor), but at present, I have no specific idea. I will continue to update the details to make it perfect.

Thanks to the help of xzczd, I updated some details of the problem. I want to know how to get 5 independent constants of transversely isotropic materials in the textbook when $$l_{ij}$$ is the rotation matrix of any angle below:

$$l_{ij}=\left( \begin{array}{ccc} \cos (\alpha ) & \sin (\alpha ) & 0 \\ -\sin (\alpha ) & \cos (\alpha ) & 0 \\ 0 & 0 & 1 \\ \end{array} \right)$$

Anisotropic material:

The following formula is the constitutive relation of anisotropic materials:

$${\displaystyle {\begin{bmatrix}\sigma _{1}\\\sigma _{2}\\\sigma _{3}\\\sigma _{4}\\\sigma _{5}\\\sigma _ {6}\end{bmatrix}}\,=\,{\begin {bmatrix} C_ {11}& C_ {12}& C_ {13}& C_ {14}& C_ {15}& C_ {16} \\ C_ {12}& C_ {22}& C_ {23}& C_ {24}& C_ {25}& C_ {26} \\ C_ {13}& C_ {23}& C_ {33}& C_ {34}& C_ {35}& C_ {36} \\ C_ {14}& C_ {24}& C_ {34}& C_ {44}& C_ {45}& C_ {46} \\ C_ {15}& C_ {25}& C_ {35}& C_ {45}& C_ {55}& C_ {56} \\ C_ {16}& C_ {26}& C_ {36}& C_ {46}& C_ {56}& C_ {66}\end {bmatrix}}{\begin{bmatrix}\varepsilon _{1}\\\varepsilon _{2}\\\varepsilon _{3}\\\varepsilon _{4}\\\varepsilon _{5}\\\varepsilon _ {6}\end{bmatrix}}}$$

It can be seen from the stiffness matrix that there are 21 independent elastic constants.

Orthotropic material:

Orthotropic materials have three elastic symmetries which are perpendicular to each other(Orthotropic materials have three orthogonal planes of symmetry). In other words, if the coordinate axes are perpendicular to the three material symmetry planes of orthotropic materials, the elastic properties of the materials will not change after 180 degrees of rotation around these axes.

In the transformation process of the coordinate axis, the elastic symmetry of the material requires the fourth-order tensor to meet the following conditions:

$$C_{pqmn}=l_{ip}\;l_{jq}\;l_{km}\;l_{ln}\;C_{ijkl}$$

Where $$l_{ij}$$ is the symmetric transformation tensor.

For example, first of all, consider the material symmetry of orthotropic materials rotating 180 degrees around the z axis, so $$l_{ij}$$ is :

$$l_{\text{ij}}=\left( \begin{array}{ccc} -1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right)$$

From formula $$C_{pqmn}=l_{ip}\;l_{jq}\;l_{km}\;l_{ln}\;C_{ijkl}$$, we can get the following relations in this case:

$$C_{1311} = -C_{1311},\quad C_{1322} = -C_{1322}$$ $$C_ {1333} = -C_ {1333}, \quad C_ {1313} = -C_ {1313}$$ So, $$C_ {1311} = C_ {1322} = C_ {1333} = C_ {1313} = 0$$

the following relationships can also be obtained:

$$C_ {2311} = C_ {2322} = C_ {2333} = C_ {2312} = 0 \\ C_ {1213} = C_ {1223} = C_ {1123} = C_ {1113} = 0 \\ C_ {2223} = C_ {2213} = C_ {3323} = C_ {3313} = 0$$

Similarly, a similar relationship can be obtained by rotating around the x-axis or y-axis; thus, the symmetry of these subscripts reduces the independent elastic constants to 12.

Since the symmetry of Green elastic material also needs to satisfy the following relation :

$$E_ {x} \nu_ {yz} = E_ {y} \nu_ {xy} \\ E_ {y} \nu_ {zy} = E_ {z} \nu_ {yz} \\ E_ {z} \nu_ {xz} = E_ {x} \nu_ {zx}$$

So the number of independent elastic constants is further reduced to 9.

Transversely isotropic material:

In this case, the material exhibits rotational elastic symmetry about a certain coordinate axis. If the z-axis is an elastic symmetry axis, then the isotropic plane is xoy plane. The symmetry condition of transverse isotropy can be obtained from orthotropic materials. That is, for any rotation transformation $$l_{ij}$$ about the z-axis, equation x must satisfy $$C_{pqmn}=l_{ip}\;l_{jq}\;l_{km}\;l_{ln}\;C_{ijkl}$$:

$$l_{ij}=\left( \begin{array}{ccc} \cos (\alpha ) & \sin (\alpha ) & 0 \\ -\sin (\alpha ) & \cos (\alpha ) & 0 \\ 0 & 0 & 1 \\ \end{array} \right)$$

where $$\alpha$$ is any rotation angle about elastic plane axis (z axis).

Current problems to be solved:

xzczd has answered the solution of the number of independent constants of orthotropic materials when $$l_{\text{ij}}=\left( \begin{array}{ccc} -1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right)$$. But now I want to know how to solve the number of independent constants of transversely isotropic materials when $$l_{ij}=\left( \begin{array}{ccc} \cos (\alpha ) & \sin (\alpha ) & 0 \\ -\sin (\alpha ) & \cos (\alpha ) & 0 \\ 0 & 0 & 1 \\ \end{array} \right)$$.

Because at this time, $$l_{ij}$$ is not a fixed number matrix, but a matrix related to the rotation angle $$\alpha$$, which increases the difficulty of solving. I need to change the existing code of xzczd to solve this problem.

This kind of tensor operation is very common in the course of elastic mechanics, and it is necessary to write MMA version functions for them.

• Once again, you should put more effort in preparing your question. The wikipedia page for Hooke's law is a much better reference. Mar 26, 2020 at 6:00
• Though OP has edited the question for several times, the critical information for reducing the number of variables to 9 is still missing. I'm voting to close this question. Mar 29, 2020 at 6:52

The formulas given in the screenshot is not enough to deduce the conclusion therein i.e. there're only 12 independent variables in $$C_{ijkl}$$. The missing formulas are

$$C_{ijkl}=C_{jikl}$$

$$C_{ijkl}=C_{ijlk}$$

which can be implemented as

c[i_, j_, k_, l_] /; i > j := c[j, i, k, l]
c[i_, j_, k_, l_] /; k > l := c[i, j, l, k]


Then generate $$C$$ and $$l$$s. I've turned to L to denote the matrix $$l$$ because $$l$$ is already used for index. (Why not turn to a better textbook? )

listL = RotationMatrix[180 Degree, #] & /@ IdentityMatrix@3;

tensorc = Array[c, {3, 3, 3, 3}];


Generate the 3 equation system with my allowtensor:

(* Definition of allowtensor isn't included in this post,
systemall =
Table[
allowtensor[
tensorc[[p, q, m, n]] == L[[i, p]] L[[j, q]] L[[k, m]] L[[l, n]] tensorc[[i, j, k, l]],
{i, j, k, l, p, q, m, n}], {L, listL}];


Alternatively, with TensorProduct and TensorContract:

systemall =
Table[
tensorc == TensorContract[
L\[TensorProduct]L\[TensorProduct]L\[TensorProduct]L\[TensorProduct]tensorc,
{{1, 9}, {3, 10}, {5, 11}, {7, 12}}], {L, listL}];


and solve them:

sol = Solve /@ systemall // Flatten;

sol /. c[i__] :> Subscript[c, i] // Union


DeleteCases[tensorc /. sol // Flatten // Union, 0]
Length@%
(* 12 *)