anupama
1
Tangent matrix for my problem is given by,
Kij = −∫∇N_{i} C^{n+1} ∇N_{j} dV
C is a forth order tensor(shape(3,3,3,3))
∇N is a second order tensor.
And I tried writing the variational form as
a_Newton = inner(gradv(v), inner(consistent_tang(u), gradv(u_))) * dxm
v and u_ are my test and trial functions and u is the displacement from the last time step.
it shows the error
Shapes do not match.
Why am I unable to write the action of a 4 the order tensor on a second order tensor in fenics.
Thanks for reading the question
Anupama
dokken
2
1 Like
Thank you very much for the reply. I understood I needed to use dot product. But still it is making problems. I tried writing the weak form as below,
a1,a2,a3,a4 = indices(4)
a_Newton = inner(gradv(v), as_tensor(consistent_tang(u)[a1,a2,a3,a4]* gradv(u_)[a3,a4],(a1,a2))) * dxm
It is now giving me a new error.
RecursionError: maximum recursion depth exceeded
I am still a beginner in Fenics. Is there anything important that I am missing? Is there any other way to write this product without using indices?