Directional solidification with heat losses