Numerical solution of quenching problems using mesh-dependent variable temporal steps