Numerical simulation of particle motion and heat transfer in a rotary kiln