In some environments magnesium part can be severely damaged unless galvanic couples are avoided by proper design or surface protection. Unalloyed magnesium is not extensively used for structural purposes. Consequently, the corrosion resistance of magnesium alloys is of primary concern. A modern and comprehensive document on the subject is the second edition of the classic CORROSION BASICS textbook.
Two major magnesium alloy systems are available to the designer.
The first includes alloys containing 2 to 10% Al, combined with minor additions of zinc and manganese. These alloys are widely available at moderate costs and their mechanical properties are good up to 95 to 120oC.
The second group consists of magnesium alloyed with various elements (rare earth, zinc, thorium, silver etc) except aluminum, all containing a small but effective zirconium content that imparts a fine grain structure and thus improved mechanical properties. These alloys generally possess much better properties at elevated temperature, but their more costly alloying additions, combined with the specialized manufacturing technology required, result in significantly higher costs.
A clean, unprotected magnesium alloy surface exposed to indoor or outdoor atmospheres free from salt spray will develop a gray film that protects the metal from corrosion while causing only negligible losses in mechanical properties. Chlorides, sulfates and foreign materials that hold moisture on the surface can promote corrosion and pitting of some alloys unless the metal is protected by properly applied coatings. The surface film that ordinarily forms on magnesium alloys exposed to the atmosphere gives limited protection from further attack.