Optimal Cool-Down in Linear and Nonlinear Thermoviscoelasticity and the Effects of Initial Stress