6
$\begingroup$

Given a vector-valued PDE, I'd like to enforce the boundary conditions $$ \vec{n}\cdot u = g\\ \vec{n}\cdot \nabla (\vec{t}\cdot u) = 0 $$ on the solution $\vec{u}$. If the boundary happens to align with one of the coordinate axes, I could use

bcs = DirichletBC(V.sub(0), g, 'on_boundary')

as Dirichlet condition. What to do for other geometries though?

$\endgroup$
7
$\begingroup$

You can use a Nitsche-type method for this. See the following reference:

J. Freund, R. Stenberg. On weakly imposed boundary conditions for second order problems. Proceedings of the Ninth Int. Conf. Finite Elements in Fluids, Venice 1995. M. Morandi Cecchi et al., Eds. pp. 327-336.

I have implemented this a while ago in some simple FEniCS-Code to deal with free-slip boundaries in general 2d geometries. Find the demo code here and the mesh here (tested with FEniCS 1.3).

Cylinder bump: free-slip boundary conditions via Nitsche's method

Update: Meanwhile, others have made similar implementations available. See for instance this github repository.

$\endgroup$
  • $\begingroup$ The link to the demo code is out of date. $\endgroup$ – Nico Schlömer Apr 7 '18 at 20:37
  • $\begingroup$ @NicoSchlömer: thanks. The file was still up, but Dropbox seems to have forgotten that it was supposed to be shared. Hope pastebin lasts longer. $\endgroup$ – Christian Waluga Apr 11 '18 at 3:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.