# Is the continuity equation valid for a diffusion current?

On the one hand, we have the diffusion equation: \begin{align} \frac{\partial\rho}{\partial t}&=D \nabla^2 \rho \end{align} and on the other hand, we have Fick's first law: \begin{align} \vec J = - D \nabla \rho \, . \end{align} If we apply $$\nabla$$ to Fick's law: \begin{align} \nabla \vec J = - D \nabla^2 \rho \end{align} and insert this into the diffusion equation, we find \begin{align} \frac{\partial\rho}{\partial t}&=\nabla \vec J \, . \end{align} If we now assume that the current $$\vec J$$ can be described in terms of a velocity field $$\vec u$$: $$\vec J \equiv \rho \vec u,$$ this yields exactly the continuity equation: \begin{align} \frac{\partial\rho}{\partial t}&=D \nabla (\rho \vec u) \, . \end{align} Is there any error in the steps above? I'm somewhat puzzled by the result because the continuity equation is typically associated with advection and not with diffusion.

• Shouldn't your 3rd equation be applying a divergence, not a gradient? Then the 4th equation should be a negative on the RHS making it the continuity equation (i.e., time variation of a density plus the divergence of a flux equals zero in the absence of sources or sinks). – honeste_vivere Mar 12 at 23:22

Yes, indeed, Diffusion equation is essentially a continuity equation. More general Fokker-PLanck type equation (i.e. a diffusion equation with a drift term), $$\partial_t \rho(\mathbf{r},t) = \nabla \cdot[\mathbf{f}(\mathbf{r})\rho(\mathbf{r},t)] + D\nabla^2\rho(\mathbf{r},t)$$ can be written as a continuity equation $$\partial_t \rho(\mathbf{r},t) = -\nabla\mathbf{J}(\mathbf{r},t),$$ where the current is defined as $$\mathbf{J}(\mathbf{r},t) = -\mathbf{f}(\mathbf{r})\rho(\mathbf{r},t) - D\nabla\rho(\mathbf{r},t).$$ Thus, converting a diffusion-like equation to a continuity equation is a qquestion of correctly defining the current.