A time-dependent mathematical model and a numerical algorithm have been developed to simulate the combustion of piled coal particles. The model can predict the evolution profiles of unburned solid fraction along the bed height, the gas composition, heat of reaction, gas temperature and the coal (solid phase) temperature. Also, it predicts the radial temperature profile inside the particles. The model includes a system of six differential equations derived from the mass and energy balances for all phases at any point along the bed height and within each particle. For the numerical solution, implicit collocation and relaxation techniques were used with finite differences for the time advance. Additionally, the model can be used to optimise the combustion process varying the excess of air, particle size distribution, coal type, geometry of the reactor, different types of ignition mechanisms and the velocity of the grate.