Numerical investigation of heat and mass transfer during the crystallization of metal in a mould