0
$\begingroup$
C_ijkl = np.array([[A11, A12, A13, 0, 0, 0],
                   [A12, A22, A23, 0, 0, 0],
                   [A13, A23, A33, 0, 0, 0],
                   [0, 0, 0, A44, 0, 0],
                   [0, 0, 0, 0, A55, 0],
                   [0, 0, 0, 0, 0, A66]])

# Define the lattice constant of the BCC plate lattice structure
a = 30  # actual lattice constant which is the length of latice cell

# Define the transformation matrix S_ik
S_ik = np.linalg.inv(np.array([[a/2, 0, a/2],
                               [a/2, a/2, 0],
                               [0, a/2, a/2]])) @ np.array([[1, 0, 0],
                                                               [0, 1, 0],
                                                               [0, 0, 1]]) @ np.array(
[[a/2, 0, a/2],
 [a/2, a/2, 0],
[0, a/2, a/2]])


# Define the transpose of the transformation matrix S_jl
S_jl = np.array([[a/2, a/2, 0],
                 [0, a/2, a/2],
                 [a/2, 0, a/2]])

# Perform the transformation of the orthotropic material stiffness matrix to the BCC plate lattice structure stiffness matrix
C_abcde = np.einsum('ai,bj,ck,dl,ijkl,em,fn,go,hp->abcde', S_ik, S_ik, S_ik, S_ik, C_ijkl, S_jl, S_jl, S_jl, S_jl)

# Print the transformed stiffness matrix
print(C_abcde)

And I get this: ValueError: einstein sum subscripts string contains too many subscripts for operand 4 Which I think is for the line C_abcde. But I'm not sure can anyone help me with this?

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.