The complex process of melting in the Earth's interior is studied by combining a multiphase numerical flow model with the program AlphaMELTS which provides a petrological description based on thermodynamic principles. The objective is to address the fundamental question of the effect of the mantle and melt dynamics on the composition and abundance of the melt and the residual solid. The conceptual idea is based on a 1-D description of the melting process that develops along an ideal vertical column where local chemical equilibrium is assumed to apply at some level in space and time. By coupling together the transport model and the chemical thermodynamic model, the evolution of the melting process can be described in terms of melt distributi...