Onset of convection in a horizontal Darcy layer (source code)

= Onset of convection in a horizontal Darcy layer
{title2=$R_c=4\pi^2$}

A perturbation proportional to $\sin(n\pi z)e^{st+ikx}$ has <growth rate>
$$
s=\frac{Rk^2}{k^2+n^2\pi^2}-(k^2+n^2\pi^2).
$$
Minimizing the neutral curve $(k^2+n^2\pi^2)^2/k^2$ gives $n=1$, $k=\pi$ and $R_c=4\pi^2$. Thus the first convection rolls have horizontal wavelength twice the layer depth.