A mathematical model to calculate the size and distribution of microporosities was studied and coupled with a stochastic microstructure evolution model. The model incorporates various solidification phenomena such as grain structure evolution, solidification shrinkage, interdendritic fluid flow and formation and growth of pores during solidification processes. The nucleation and growth of grains were modeled with a cellular automaton method that utilizes the results from a macro scale modeling of the solidification process. Experiments were made to validate the proposed models. The calculated results of aluminum alloy castings agreed with the experimental measurements.