A new approach to the modelling of grain structure formation in solidification processes is proposed. Based upon a two-dimensional cellular automata technique, the model includes the mechanisms of heterogeneous nucleation and of grain growth. Nucleation occurring at the mould wall as well as in the liquid metal are treated by using two distributions of nucleation sites. The location and the crystallographic orientation of the grains are chosen randomly among a large number of cells and a certain number of orientation classes, respectively. The growth kinetics of the dendrite tip and the preferential 〈100〉 growth directions of cubic metals are taken into account. The model is then applied to small specimens of uniform temperature. The columnar-to-equiaxed transition, the selection and extension of columnar grains which occur in the columnar zone and the impingement of equiaxed grains are clearly shown by this technique. The calculated effect of the alloy concentration and cooling rate upon the resultant microstructure agree with experimental observations.