Controlling the temperature by indirect heat exchange with heat exchange elements inside the bed of solid particles