Numerical modelling of scale-dependent damage and failure of composites