Simulation of fibrous structures and yarns