In the first part of the manuscript we develop a new method to obtain damage models for solids, by homogenisation, starting from a micro-structural analysis. The new approach is illustrated for brittle materials. The main ingredient is an energy analysis on a periodicity cell of finite length leading, through homogenisation, to a macroscopic damage evolution law. In this equation, the size of the periodicity cell is an internal material length. The model is then extended to take into account friction on micro-cracks.In the second part, we study unstable behaviours of granular media consisting elastic grains, in the framework of large strain, and inter-granular micro-cracks. We use a computational homogenization scheme with two-level finite ...