Three-dimensional Cellular Automaton Model for the Prediction of Microsegregation in Solidification Grain Structures