Pendulum with linear damping and variable length