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

Tangential Gradient Boundary Conditions

+2 votes

Hello, this is perhaps a simple question with an obvious answer, but I am attempting to solve what amouts to laplace's equation on a simple mesh. The issue is I have boundary conditions that specify the tangential gradients on the boundary.

For simplicity I have started with a mesh with boundaries parallel to the X and Y axes, and as an example on the top edge (parallel to the x axis) the boundary condition reads

$\frac{du}{dx}=-1$

I couldn't find anything obvious in the documentation for boundary conditions like this, but I gather the way to do this is with lagrange multipliers, is there an example in the documentation of a similar problem that I can follow?

closed with the note: Answered
asked Nov 13, 2015 by varnis FEniCS Novice (390 points)
closed Aug 10, 2016 by varnis

You may want to revise the formulation of your problem.

For the scalar elliptic PDE

$$ -\Delta u = f $$

the boundary condition $\nabla u \cdot \tau = \sigma_\tau$ will not lead to a well posed boundary value problem.

Umbe

Apologies, this is true, I am in fact equipped with a mean zero condition for the field which I forgot to mention, although the actual implementation of the boundary conditions is the actual issue that I have

$$\int_{\partial\Omega}{udx}=0$$

Hi,

Even if you add the zero-mean condition your problem is still ill-posed.

In fact, the weak form of your PDE is
$$
\int_\Omega \nabla u \cdot \nabla v dx - \int_{\partial \Omega} (\nabla u) \cdot {\bf n} v ds = \int_{\Omega} fv dx.$$

Now in order to get riddle of the boundary integral
$$ \int_{\partial \Omega} (\nabla u) \cdot {\bf n} v ds $$

you have either to

  • Impose a Dirichlet boundary condition for u, i.e. u = u0 on $\partial \Omega$. Such Dirichlet condition will allow you to take p = 0 on $\partial \Omega$.

  • Impose a Neuman boundary condition $(\nabla u) \cdot {\bf n} = \sigma_n$, so that you can move
    $$ \int_{\partial \Omega} (\nabla u) \cdot {\bf n} v ds = \int_{\partial \Omega} \sigma_n v ds $$
    to the r.h.s.

  • Impose a Robin boundary condition $(\nabla u) \cdot {\bf n}+ \alpha u = \sigma_n$ ($\alpha > 0$) and write

$$
\int_\Omega \nabla u \cdot \nabla v dx + \int_{\partial \Omega} \alpha u v ds = \int_{\Omega} fv dx. + \int_{\partial \Omega} \sigma_n v ds. $$

Best,

Umbe

...