Gamma impulse solution for linearly increasing diffusivity (source code)

= Gamma impulse solution for linearly increasing diffusivity
{title2=$p(z,t)$}

On $z>0$, consider $p_t+a p_z=D(zp_z)_z$ with $a,D>0$, zero scalar flux $ap-Dzp_z$ at the endpoints for $t>0$, and unit initial impulse at the origin. Put $r=a/D$ and $\eta=z/(Dt)$. The normalized <similarity solution> is
$$
p(z,t)=\frac{\eta^r e^{-\eta}}{Dt\,\Gamma(1+r)}.
$$
The ansatz $p=(Dt)^{-1}f(\eta)$ gives $[\eta f'+(\eta-r)f]'=0$. Endpoint decay sets this integrated constant to zero and hence $f\propto\eta^re^{-\eta}$; the <gamma function> normalizes its <integral> to one. Its scale is $Dt$, so it converges weakly to a unit impulse as $t\downarrow0$. Its <gamma distribution> shape is $1+r$, its maximum occurs at $z=at$, and its <expected value> is $(a+D)t$. For width proportional to $z$, the associated <horizontally averaged plume concentration> is proportional to $z^{r-1}e^{-z/(Dt)}$: its interior maximum is $(a-D)t$ when $a>D$, its supremum occurs at the origin when $a=D$, and it is singular there when $0<a<D$. The physical finite source regularizes this ideal-origin behaviour.