I’m working with structures under plane stress state and for that I have to solve a linear elasticity problem. I’m currently able to solve the PDE for the displacement and then compute the structure’s compliance (strain energy), which is a real number (scalar). The problem is that for the post processing I’m intersted, I need a element or nodal value of energy and I’m having trouble doing that.
When solving the problem without using FEniCS, It works fine, because I actually find a element wise value and then sum them all for the structures compliance. However, since FEniCS returns me the “sum” directly, I don’t know how to proceed. I tried projecting the value on a mesh, but I don’t know if that is correct. Could anyone please help me?
This is how I am currently getting the compliance value (assuming that U is the structure’s displacement, soluting of the PDE):
eU = sym(grad(U))
S1 = 2.0*mu*inner(eU,eU) + lmbda*tr(eU)**2
compliance = assemble( eps_er*S1* dx(0) + S1*dx(1)) ##returns me a scalar
I have two components of dx because I’m working with a rectangular domain and the sctructure is a subset of this domain. Then, dx(1) refers to the inside of the structure and eps_er is a small value associate with the complementary part.