I would start by thinking a bit harder about what you are trying simulate with this script. This script has a “toy” material model that was implemented to visually inspect results, per page 55 of The legacy FEniCS tutorial. While it does model the equations of linear elasticity, it turns out that material behavior drives much of the actual output. For example, it’s plainly obvious that polyurethane and aluminum have extremely different responses to loads.
Consider these thoughts:
- You have applied a relatively large rotation to a relatively flexible object. What do you think would happen? (I would expect local failure, which is something you are seeing in your example) Try lowering that rotation angle to ~1-2 deg and see what you result looks like
- Additionally, try increasing the non-dimensional “elasticity” parameter \beta and see what happens (you should see something more like you expected)
For example, with \beta=50 and \theta=\frac{\pi}{4}, I get the following plot:
As a side note if you are interested in 1D torsional models and predicting torsional behaviour of slender objects, you may find this post helpful.