Turbulent rotating convection is usually studied in a cylindrical geometry, as this is its most convenient experimental realization. In our previous work (Kunnen et al., J. Fluid Mech., vol. 688, 2011, pp. 422–442) we studied turbulent rotating convection in a cylinder with the emphasis on the boundary layers. A secondary circulation with a convoluted spatial structure has been observed in mean velocity plots. Here we present a linear boundary-layer analysis of this flow, which leads to a model of the circulation. The model consists of two independent parts: an internal recirculation within the sidewall boundary layer, and a bulk-driven domain-filling circulation. Both contributions exhibit the typical structure of the Stewartson boundary l...