Questions about stress strain calculation

Please follow the guidelines of:

meaning:

  1. Use proper formatting of code (3x` syntax, see: How to Format Code in Markdown)
  2. Make a minimal reproducible example, i.e. a code that people can run and reproduce your output. Usually, it is common to use one of the “built-in” meshes, such as an interval, square or cube mesh.
  3. I would suggest looking at: Form language — Unified Form Language (UFL) 2021.1.0 documentation
  4. Note that FEniCS uses UFL for the syntax of the variational form, thus you would have to use something along the lines of ufl package — Unified Form Language (UFL) 2021.1.0 documentation and project/interpolate this into an appropriate space, depending on what version of dolfin you are using (legacy or DOLFINx).