Equilibrium distribution of Mg in manganese electrolysis system