study on the formation and densification of magnesium