How to calculate eigen value of stress tensor

9 weeks ago by

I have stress tensor sigma_w after solving the problem. How to caluclate eigen value of the stress tensor and sort it according to the need (decending order).

Thanks for the help and time.
from dolfin import *    
import mshr
# generate mesh
domain = mshr.Rectangle(Point(0,0), Point(1,1))-mshr.Circle(Point(0.0,0.0), 0.1)
mesh = mshr.generate_mesh(domain, 40)
plot(mesh, interactive=True)

V = VectorFunctionSpace(mesh, 'CG',1)
u = TrialFunction(V)
v = TestFunction(V)
def epsilon(u):
    return 0.5*(grad(u)  + grad(u).T)

def sigma(u):
    return 2.0*mu*epsilon(u) + lmbda*tr(epsilon(u))*Identity(2)

class left(SubDomain):
    def inside(self,x,on_boundary):
        tol = 1e-5
        return abs(x[0]-0.0) < tol and on_boundary

class right(SubDomain):
    def inside(self,x,on_boundary):
        tol = 1e-5
        return abs(x[0]-1.0) < tol and on_boundary

class bottom(SubDomain):
    def inside(self,x,on_boundary):
        tol = 1e-5
        return abs(x[1]) < tol and on_boundary

Bottom = bottom()
Left = left()
Right = right()
# apply BC
bc2 = DirichletBC(V.sub(0),Constant(0.0),Left)
bc = [bc1, bc2]

load =  1.0

g = Constant ((load,0.0 ))
domainBoundaries = FacetFunction("size_t", mesh)

ds = Measure("ds")(subdomain_data=domainBoundaries)

Eu = inner(nabla_grad(v), sigma(u))*dx - inner(g,v)*ds(3)
u = Function(V)

solve(lhs(Eu) == rhs(Eu), u, bc)

W = TensorFunctionSpace(mesh, "Lagrange", 2)
sigma_w = project(2*mu*sym(grad(u)) + lmbda*tr(grad(u))*Identity(2), W)

# How to calculate eigen value of stress tensor sigma_w
Community: FEniCS Project

1 Answer

9 weeks ago by

Check out this thread in the old Q&A forums:

Seems straightforward in my opinion.

Also allow me a comment on your choice of function space:
If your displacement is piecewise linear then your strain is in a discontinuous piecewise constant space since it is a derivative of the displacement. The stress is linear in strains and thus also discontinuous piecewise constant. Projecting onto a quadratic continuous space is not the best idea here.

Please login to add an answer/comment or follow this question.

Similar posts:
Search »