Hello everyone,
I want to find the eigenvectors of stress function on each element. Can anyone help me with this?
Below is my MWE for finding the stress tensor.
from dolfin import *
mesh = RectangleMesh(Point(0.,0.),Point(1.,1.),10,10)
W = VectorFunctionSpace(mesh, 'CG', 1)
TS = TensorFunctionSpace(mesh, "CG", 1)
u, v= Function(W), TestFunction(W)
def Sigma(u):
I = Identity(len(u))
F = variable(I + grad(u))
C = F.T*F
Ic, J = tr(C), det(F)
E = (1/2)*(Ic - 3) - ln(J) + (1/2)*(ln(J))**2
sigma = diff(E, F)
return sigma
stress = project(Sigma(u), TS)
Thanks,