## 3 Results and Discussion
### In Vitro Immersion Test  
Figure 8a depicts the corrosion rates of all of the specimens immersed in 0.9 wt.% NaCl solution for 21 days. FRH05 had the lowest corrosion rate, followed by FRH60, FRH30, and FH had the highest corrosion rate. The results indicated that the extruded specimen subjected to rolling, followed by a short period of annealing to reduce the residual stress, had the best corrosion resistance [18]. Figure 8b shows the XRD patterns of the FH specimen before and after immersion. The diffraction peak of Mg(OH)2 was observed after immersion. Additionally, some chlorides were found on the surface of specimens..  
Figure 8c depicts the corrosion surfaces of FH after 21 days of immersion. Cavities were formed on these surfaces due to the potential difference between the Mg substrate and the second phase, which caused galvanic corrosion [19]. Homogenization heat treatment can partly dissolve the second phase into the matrix, which reduces the potential difference between the substrate and the boundary. However, fine grain and coarse grain could still be found in matrix, leading to severe localized corrosion. The FRH30 specimen exhibited a rolling texture with equiaxed grain structure, except galvanic corrosion, and the pitting effect was weaker on the FRH30 specimen (Figure 8d).  
Figure 9 is the EPMA pattern of the FH cross-section after being immersed in 0.9 wt.% NaCl solution for 21 days. The surface was covered by corrosion product. Not only Mg and Cl element were found in the surface. The corrosion product layer could be divided into two parts, the outer layer shown in yellow line and the inner layer close to matrix shown in red line. The second phase enriched position caused a corrosion pit, which may increase the corrosion rate. The outside layer formed with Ca element could prevent corrosion of Mg substrate.  
Figure 8: Immersion testing result: (**a**) Corrosion rate of ZKX500 specimens, (**b**) XRD patterns before and after immersion testing, (**c**) FH corroded surface after immersion, and (**d**) FRH30 after immersion.  
A schematic is shown in Figure 10 to illustrate the corrosion process of ZKX500 Mg alloy in 0.9 wt.% NaCl solution. When Mg was dissolved in water, it formed the passive Mg(OH)\({}_{2}\) film deposited on the metal surface, which could prevent corrosion of the Mg substrate. In the presence of Cl\({}^{\prime}\), the region adjacent to the grain boundary dissolved, and soluble MgCl\({}_{2}\) was produced, leading to the destruction of the Mg(OH)\({}_{2}\) protective film and the reduction of the corrosion resistance of the Mg alloy. Hence, in a NaCl environment, the Mg alloy has a higher corrosion rate owing to the formation of MgCl\({}_{2}\)[20]. The potential different between the Mg substrate and second phase on the grand boundary caused micro-galvanic corrosion. As the corrosion time increased, corrosion pits were formed where the Mg matrix was adjacent to the second phase particles. As the alloy was dissolved, the concentration of alloying elements (i.e., Ca) increased, and when they reached saturation in the NaCl solution, it precipitated, and, thus, a layer of Ca element was observed.