Numerical modeling and simulation of a diffusion-controlled liquid–solid phase change in polycrystalline solids