Heterogeneous twinning nucleation from the wall or gas interface during directional solidification of silicon have been modelled, and further used to clarify the details of twining observed in situ in X-ray synchrotron imaging experiments [1]. It is found that the heterogeneous twinning from the wall/grains or wall/gas/grain trijunctions requires much lower undercoolings leading to much higher twinning probability. The lower attachment energy and the contact area are the key factors for the heterogeneous nucleation of twins.