A viscoelastic model for the compaction of fibrous materials