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

Solving with no boundary condition on one boundary

0 votes

One of the tutorials (I forget which one) states that von Neumann boundary conditions are used as default in Fenics unless other boundary conditions are specified. I have a problem, defined on a square grid, such that I have boundary conditions on three of these boundaries, but one of the boundary doesn't have any boundary condition. How do I tell Fenics that I don't want to use any boundary conditions (not even von Neumann) on one boundary?

asked Aug 15, 2014 by Ech FEniCS Novice (570 points)

1 Answer

0 votes

I don't think that the von Neumann boundary conditions are used as default: by default, no term is added to your variational form.

If you're solving a Poisson and don't specify any boundary terms, then indeed it is equivalent to specify ∇u⋅n= 0 on the boundary.

But if you're solving an advection equation, then not specifying any boundary terms will be equivalent to specify u = 0 on the boundary.

Thus, my understanding is that FEniCS will by default not use any boundary condition.

answered Aug 15, 2014 by V_L FEniCS User (4,440 points)

Thank you. Indeed I didn't find information about this from any other documentation except this one tutorial. My differential equation is not of any standard form (it's based on four coupled diffusion equations but with some extra non-linear terms).

I don't have a clear view about what the solutions to my equations are supposed to look like so I was worried that they might be wrong due to these extra boundary conditions. However, I do know just from physical insight that forcing Neumann condition on every boundary can't give the correct result.

EDIT: I found the tutorial I was referring to: http://fenicsproject.org/documentation/dolfin/dev/python/demo/documented/neumann-poisson/python/documentation.html
It says: "Since we have natural (Neumann) boundary conditions in this problem, we don´t have to implement boundary conditions. This is because Neumann boundary conditions are default in DOLFIN."

I'm relieved if this indeed applies only to the Poisson problem.

If there is an integration by parts and the boundary term is dropped, then that is a Neumann boundary condition (the gradient normal to the boundary is fixed to be zero). If there is no such integration of parts, then this does not hold, in my understanding.

...