In the present work, it is attempted to derive a macroscopic constitutive law for the elastic deformation of granular materials, based on microscopic considerations. For the sake of simplicity, the solution is restricted to two dimensions, that is, a random assembly of infinitely extended cylinders. After examining pairwise contact interactions, the elastic energy rate of the assembly is retrieved in a discrete form. Introducing the probability density function of the contact orientations, the continuum form of the elastic energy density rate is evaluated as a function of generalized strains and curvatures, and their rates. The stresses and couple stresses result as dual variables to the generalized strain and curvature rates. Some properties of the resulting model are discussed, examples are presented and conclusions are drawn.Copyright © 2014 John Wiley & Sons, Ltd.