Yes thanks indeed, but since i’m just using the radius and the longitudinal length
z
, the gradient doesn’t change between the cartesian and the cylindrical coordinates (all the terms related to the angle disappear in my axisymmetrical assumption)
This is not correct. You’re missing the term \vec{u}_{r} / r which appears in (\nabla \vec{u})_{\phi\phi}. This component does not vanish and must be incorporated into the inner product (\nabla \vec{u}, \nabla \vec{v}) in your weak formulation.
You can see an example in the link you’ve already provided:
Specifically:
def epsilon(v):
return sym(as_tensor([[v[0].dx(0), 0, v[0].dx(1)],
[0, v[0] / x[0], 0],
[v[1].dx(0), 0, v[1].dx(1)]]))
from which you can determine that an appropriate definition of grad(u)
would be:
def grad_cyl(v):
return as_tensor([[v[0].dx(0), 0, v[0].dx(1)],
[0, v[0] / x[0], 0],
[v[1].dx(0), 0, v[1].dx(1)]])
Adjusting indices as necessary for your axis orientation.