A three-dimensional mathematical model was developed to describe the flow field of the three-phase flow (chlorine gas bubbles, magnesium droplets, and the electrolyte of molten salt) in the electrolytic cell. The Euler-Euler representation was used to model the continuous phase. The volume of fluid (VOF) model was used to describe the behavior of multi-phases. The volume of fluid model is a surface-tracking technique applied to a fixed Eulerian mesh. It is designed for two or more immiscible fluids.