  In this paper a general multi-phase-field model is presented which is an
extension and modification of the model proposed by Folch and Plapp for three
phase fields [R. Folch and M. Plapp, Phys. Rev. E 72 011602 (2005)] to the
arbitrary number of phases. In the model a physical constraint requiring that
the sum of all phase fields in the system is equal to one is resolved by the
method of Lagrange multipliers. Namely, the thermodynamic driving force is
reduced to its projection on the plane of the constraint. The general model
functions in a $N$-dimensional phase field space were derived which justify the
requirements for the stability of the total free energy functional on dual
interfaces and hence the absence of "ghost" phases. Furthermore, the case of
the different interface energies and mobility parameters on the individual
interfaces is resolved in a comprehensive manner. It is shown that the static
equilibrium for three or four phases fulfils Young's law for contact angles
with high accuracy. Also the model is verified by the quantitative simulation
of the solidification in an Al-Cu-Ni alloy in the case of the four-phase
transformation reaction. We found the way to control the character of new phase
nucleation using additional terms in free energy functional.
