Hi,
Apologies in advance for my lack of knowledge in FEA and FEniCS.
I’ve recently modeled a beam in 1D using this demo, https://comet-fenics.readthedocs.io/en/latest/demo/beams_3D/beams_3D.html
I’m now wondering how calculate and extract von_Mises stress from this as I’m not too sure how the stresses are represented. I’ve tried
d = u.geometric_dimension()
Sig = generalised_stresses(u)
s = Sig - (1./3)*tr(Sig*Identity(d)) # deviatoric stress
von_Mises = sqrt(3./2*inner(s, s))
V = FunctionSpace(mesh, 'CG', 2)
von_Mises = project(von_Mises, V)
However this gives the error Invalid ranks 1 and 2 in product.
. It works if I use Sig[4]
or another number but I’m not to sure what this is representing.
Any guidance would be much appreciated!