A numerical approach for the failure analysis of textile composites