Post processing for MINI elements

Dear community,
Does anyone know how to compute the following formulae using six different solutions called u_i coming from previously different set up of the simulation’s boundary conditions? The D stands for the sym(Grad ()) operator and u is a three dimensional field (velocity), hence the dot product occurs between two tensors.
1
Here the element I’ve used for computing the solution of the stokes system:

# Build function spaces on Mini element
P1 = FiniteElement("Lagrange", mesh.ufl_cell(), 1)
B = FiniteElement("Bubble",   mesh.ufl_cell(), mesh.topology().dim() + 1)
V = VectorElement(NodalEnrichedElement(P1, B))
Q = P1
W = FunctionSpace(mesh, V * Q)

Many thanks in advance