This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

How to specify tangential component of a vector field on the boundary?

+1 vote

Hi,
I am working on an elasticity problem, for which I need to impose a boundary condition whereby the component of the (unknown) displacement vector field that is tangential to the boundary is specified. What is the best way to do this?

The gov eq is
rho * u,t = div (sigma)
where sigma is the stress tensor.

I have a vector function space set up in my Python code as follows:

V=VectorFunctionSpace(mesh, "CG", 1)

I know that if the boundary is aligned with one of the coordinate axes (say the x-axis), I can do sth like
bc=DirichletBC(V.sub(0), Constant(1.5), myBdry)

But I would like to know how to do it for the general case when the boundary is not aligned with a coordinate axis, and possibly is curved.

Thanks much in advance
Anirban

PS. I have seen the post below about the Nitsche trick, but it was not fully clear to me how to apply it to my problem, and if that is the best (or only) way.
http://scicomp.stackexchange.com/questions/7123/fenics-separate-boundary-conditions-in-normal-and-tangential-direction-of-mesh

asked Aug 26, 2016 by janzz2k FEniCS Novice (160 points)

Hi, the Nitsche trick is convenient here, because it can be stated in a variational form, which is always good if you work with FEniCS. With some obvious modifications is should also be possible to do the same for elasticity. Maybe the paper of Freund and Stenberg also has some clues on this.

...