In FEM, the displacements are known in mesh nodes. The strain tensor Eps is then computed using the strain-displacement matrix, usually noted with B, so that Eps= Bu for displacement vector u.

Additionally, stress tensor can be obtained as sigma = E Eps, for elasticity tensor E. Finally, the divergence of the stress tensor then becomes div(sigma) = B^T sigma

Goal

My goal is to compute the divergence of the stress tensor. But I can’t figure out how to do that wihtout knowing the strain displacement matrix B. Is there a way to obtain that matrix B from FreeFem?

the only problem is div(Eps(u)) is a operator of order 2 , so the derivative with distribution sense is not so easy ( you get dirac on edge, in 2d). but you can try to solve

Sadly this will not do the job. I must be able to compute the divergence of the stress tensor, without computing the strains from displacements.

In plasticity, for example, the stresses in each node can be and are corrected with Newton-Raphson method. And the exit condition for the N-R method requires computation of the divergence of the stress tensor - not from the displacements, but rather directly. In general FEM, that’s supposed to be easy by taking f = B^T * sigma.