The inward solidification of a liquid cylinder with periodic axial perturbation of the boundary temperature or heat flux