A study of diffusion in solids of arbitrary shape, with application to the drying of the wheat kernel