# How to avoid negative concentration from numerical solution using FDM scheme?

$$\frac{\partial C}{\partial t} + u \frac{\partial C}{\partial x} + w \frac{\partial C}{\partial x} = D \left(\frac{\partial^2C}{\partial x^2}+\frac{\partial^2C}{\partial y^2}\right)-C \cdot \left(\frac{\partial u}{\partial x}+\frac{\partial w}{\partial z}\right)$$

How to avoid the negative concentration using FDM scheme?

## 1 Answer

There seem to be some mistakes in your equation. You use y in some place and z in others. I suppose you are dealing with 2d flow.

You need a maximum principle. At the PDE level, the maximum principle holds if the velocity is divergence-free.

Assuming a divergence free velocity field, write an upwind scheme for convection terms and central scheme for diffusion. This is explicit in time scheme. Under a restriction in time step, you can show maximum principle. This will be only first order accurate though.

You can also use a central scheme for convection, in which case you will need a mesh Peclet number to be small enough to get maximum principle.