In the production of single-crystal turbine blades for use in aircraft engines with unidirectional solidification techniques, it is confirmed that the casting geometry had great influence on the formation of macrosegregation or spurious/stray crystals. In this study, a two-phase solidification model is used to investigate the geometrical effect on the unidirectional solidification of Al–7.0 wt.% Si alloy. The study is based on the experiment of Ghods et al. (2016a), in which the diameter of the sample is changed between ϕ9.5 and ϕ3.2 mm along the solidification direction to highlight the geometrical effect. The first part of the investigation is to verify the numerical model by ‘reproducing’ the experimentally obtained macrosegregation and phase distribution in an as-cast sample. The second part is to explore the macrosegregation mechanism. It is found that the main geometrical effect is the modification of the bulk and the interdendritic melt flow during solidification. Different flow patterns are found in different locations, e.g. below or above the cross-section contraction; however, details of the macrosegregation formation can be explained by a scalar product of two vectors, i.e. the flow velocity and the concentration gradient of the melt. Based on the positive/negative value of the scalar product, i.e. the flow direction in comparison with the direction of the concentration gradient, it is possible to determine where a negative/positive segregation will occur. The above scalar product is also found valid for analysing the possible formation of spurious/stray crystals, and it is numerically demonstrated that the cross-section expansion in casting geometry leads to high risk of spurious/stray crystals.