# Derivation of the diffusion-transport equation

Think of a flowing stream, and imagine the motion of a certain amount of substance in a portion of the stream. You’d notice two things about it: it would diffuse—that is, the concentration of it would lessen in the area in which you originally spotted it—and it would move down the stream at the stream’s velocity, call it \(v\). The equation that describes the amount of substance in any given place \(x\) in the stream at \(t\) is called the concentration equation (or the diffusion-transport equation). Let’s derive it!

From our description above, we have the conservation equation

Writing this in mathematical notation, we have

for \(c\) the channel capacity, \(\rho\) the density of the substance, \(A\) the cross-sectional area of the segment under consideration, and \(k\) the conductivity of the medium in the channel. This is now an integral equation for the amount of substance in a certain area, but we’d prefer a differential equation for ease of solution. We can get there using the mean value theorem. Assuming continuity of a function \(f\), we have

for some \(\xi \in (a,b)\). Applying this to our integral equation and writing

by assumption of the “niceness” of \(u\) gives

Dividing through by \(\Delta x\), letting \(\Delta x \rightarrow 0\), and rearranging terms gives the diffusion-transport equation:

Pretty neat! One could easily incorporate generation of material within the stream by adding to the integral equation the accumulation term

for \(f\) some generation kernel. The differential equation would then have the term \(\frac{1}{c\rho}f(x,t)\) added at the end.