A discrete model of a fabric has been developed from an analogical description, using a mass-spring system of discrete elements. An element of fabric is modeled by a set of grid nodes endowed with a mass and connected with flexional and stretching springs. This model describes the mechanical behavior of a woven structure at a mesoscopic scale. As a novel contribution, the interactions and the friction between yarns are introduced in the present work. An energy analysis of the discrete system of analogical elements is performed, taking into account the compression strain energy of the yarns and the work of the reaction forces exerted between yarns. A suitable discrete variational principle, accounting for the presence of the nonholonomic forces arising from friction, serves as a basis for a numerical implementation. Simulations of uniaxial tractions are performed, that show the effect of the yarn-yarn friction and yarn compressibility on the fabric response. To cite this article: B. Ben Boubaker et al., C R. Mecanique 335 (2007). (C) 2007 Academie des sciences. Published by Elsevier Masson SAS. All rights reserved.