Principal directions of quad mesh elements (local frame)

How can I get the principal directions of a quad mesh (defined in 3D space) ?
principal direction of element mean direction of max and min curvatures.

  1. For the local frame in [shell tutorial] (Linear shell model — Numerical tours of continuum mechanics using FEniCS master documentation, the 2 directions (e1 and e2) are arbitrary. Is there any way in dolfinx where, the normal to element and principal curvature can be extracted?

  2. Can you explain t=Jacobian(mesh). Does it ensure t1 = as_vector([t[0, 0], t[1, 0], t[2, 0]]) and t2=as_vector([t[0, 1], t[1, 1], t[2, 1]]) lie on mesh plane (so that cross(t1,t2) is normal to element. Can we try Facetnormal(mesh) to replace t1, t2 process.

  3. Alternatively, I tried assuming a ufl variable (Coefficient) as unknown to be determined after solving ufl equations, but, I find ufl doesn’t allow to solve equations (like sympy.solve).

Any help is greatly appreciated.