The convection–diffusion equation can be derived in a straightforward way from the continuity equation, which states that the rate of change for a scalar quantity in a differential control volume is given by flow and diffusion into and out of that part of the system along with any generation or consumption inside the control volume: ∂ ∂ c ∂ ∂ t + ∇ ∇ ⋅ ⋅ j = R , where j is the total flux and R is a net volumetric source for c. There are two sources of flux in this situation. First, diffusive flux arises due to diffusion. This is typically approximated by Fick's first law : j diff = − − D ∇ ∇ c i.e., the flux of the diffusing material (relative to the bulk motion) in any part of the system is proportional to the local concentration gradient. Second, when there is overall convection or flow, there is an associated flux called advective flux : j adv = v c The total flux (in a stationary coordinate system) is given by the sum of these two: j = j diff + j adv = − − D ∇ ∇ c + v c . Plugging into the continuity equation: ∂ ∂ c ∂ ∂ t + ∇ ∇ ⋅ ⋅ ( − − D ∇ ∇ c + v c ) = R .