We consider Rayleigh-B\'enard convection in a layer of fluid between rough
no-slip boundaries where the top and bottom boundary heights are functions of
the horizontal coordinates with square-integrable gradients. We use the
background method to derive an upper bound on mean heat flux across the layer
for all admissible boundary geometries. This flux, normalized by the
temperature difference between the boundaries, can grow with the Rayleigh
number ($Ra$) no faster than ${\cal O}(Ra^{1/2})$ as $Ra \rightarrow \infty$.
Our analysis yields a family of similar bounds, depending on how various
estimates are tuned, but every version depends explicitly on the boundary
geometry. In one version the coefficient of the ${\cal O}(Ra^{1/2})$ leading
term is $0.242 + 2.925\Vert\nabla h\Vert^2$, where $\Vert\nabla h\Vert^2$ is
the mean squared magnitude of the boundary height gradients. Application to a
particular geometry is illustrated for sinusoidal boundaries.Comment: 15 pages; v2: result strengthened so that the gradients of the
functions defining the boundaries need only be square-integrable as opposed
to uniformly bounde