Thermo-Mechanical Model of Solidification Processes