Phase diagram, thermodynamics and microstructure of Al-Mg system