# Implementation of gradient zero boundary conditon in advection-diffusion equation

My question is about Finite Element Method.

I want to know how to implement "gradient zero" conditions to advection-diffusion equations in conservative form like,

$\frac{\partial \rho}{\partial t} + \nabla \cdot \mathbf{\Gamma} = 0$

where, $\mathbf{\Gamma} = \mathbf{u}\rho - k\nabla \rho$

$\mathbf{u}$ and $k$ is not constant variables.

The boundary integral part of weak-form can be written as follows,

$\int_{\Gamma^N} \rho^* \mathbf{\Gamma} \cdot \mathbf{n} d\Gamma^N$

where, $\mathbf{n}$ is normal vector and $\rho^*$ is weighed function.

But it seems that this integral is specialized to "Mixed boundary condition".

So my question is how to modify this integral to that of "Gradient zero conditon".

I beg your kindness.

• The term "gradient zero condition" is not commonly used. What do you mean by it? – Wolfgang Bangerth Dec 26 '13 at 14:47
• Thank you for your speedy response. I mean, $\frac{\partial \rho}{\partial \mathbf{n}} = 0$ as "gradient zero condition". – Phoenix Kyoma Dec 26 '13 at 16:48

## 1 Answer

For the advection-diffusion equation you can't just apply a Neumann boundary condition (the 'gradient zero condition' as you called it) because there is are two components to the flux: advection and diffusion. Therefore you are correct to apply Robin boundary conditions (mixed boundary conditions as you called it).

If you want the edges of your domain to prevent mass from leaving then you simply apply the zero flux condition,

$$\int_{\Gamma^N} \rho^* \mathbf{\Gamma} \cdot \mathbf{n} d\Gamma^N = 0$$

For more information see theses question/answers:

If you were to apply the condition $\frac{\partial n}{\partial x} = 0$ at the boundary this would be equivalent to preventing diffusion through the boundary, but it would be an open boundary condition for the advection component of the flux. This may or may not be what you want.

• Thank you for your answer. I can clearly understand what you mean. – Phoenix Kyoma Jan 26 '14 at 8:07