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

Integral value on boundary

+2 votes

Hi all,

I would like to have a boundary condition on an internal surface. The tricky part is that the current flowing between the two regions is described like this:

− ∂ u / ∂ n = u - (k* ∫ ∇u · n dS)

How could I impose this type of boundary condition that needs to be integrated over the surface of the boundary?

Or maybe, if that's easier, is it possible to impose a net current of zero over an internal boundary:
∫ ∇u · n dS = 0

Thanks!

asked Apr 25, 2017 by meron FEniCS User (2,340 points)
reshown May 4, 2017 by meron

2 Answers

0 votes

Hi there, if you want to implement the Neumann boundary condition

$$\int \nabla u \cdot n d S = 0,$$

this would be reflected in the choice of the linear form $L$ on the LHS of the variational problem, see here.

The other choice is a bit tough, because it can't be absorbed in the definition of the linear form $L$. However, when the integral vanishes, I think you have a PDE that you can solve on its own, maybe analytically: $n \cdot \nabla u = -u$, e.g. in the simple case where the normal vector $n$ points in the direction of the coordinate axis, you have the problem $\sum_{i} \partial_{x_{i}} u = -u$. So I think that maybe this is not a boundary condition, but a proper PDE problem on its own.

answered May 4, 2017 by wilhelmbraun FEniCS User (2,070 points)
edited May 5, 2017 by wilhelmbraun
+1 vote

It is not a boundary condition but one condition on jump on line in interior. You have a jump( flux) in interior.
I recomend you to use one DG and put this numericaly adding new integrals. You have to consider the jump(flux) is not igual to ZERO. Regroup your variational form

answered May 5, 2017 by LeoCosta FEniCS User (1,190 points)

I've been trying to do something similar to this recently--the flux jump on an internal surface. Would you be able to give an example of how to explicitly apply an interface condition along an internal boundary surface?

...