Introduction

Corrosion has become a significant concern in modern society due to the harsh service conditions that metallic alloys are subjected to. The presence of complex environmental factors, such as destructive ions, external forces, cycling alternate wetting and drying conditions, microorganisms, etc., can accelerate corrosion reactions1,2,3,4,5.

Surface coating and alloying are the primary methods for enhancing the corrosion resistance of magnesium6,7. Zhang et al. significantly improve the corrosion resistance of AZ91D through conversion coating, incorporating pre-precipitation sites to enhance its effectiveness. The accelerated formation process of this conversion coating contributes to the exceptional corrosion resistance exhibited by this film8. However, due to the complexity involved in applying these coatings, practical implementation becomes challenging. Conversely, micro-alloying has been identified as an efficient alternative with a simpler process for improving the corrosion resistance of Mg alloys9. Wang et al. propose the ‘Mg-LA-MA’ alloying strategy to achieve high corrosion resistance in magnesium alloys. It has been observed that magnesium alloys with high corrosion resistance consist of a matrix element (Mg), a low-alloying element (LA), and a micro-alloying element (MA). The LA and MA elements accelerate the formation process of the corrosion film and densify the corrosion barrier10.

Despite micro-alloying exhibit great potential in enhancing corrosion resistance of magnesium alloys, the corrosion resistance remains unsatisfactory, particularly in more aggressive environments such as those with elevated concentrations of harmful ions11,12,13. Offensive ions, particularly chlorine ions (Cl), have been proven to play a crucial role in corrosive environments and are among the most detrimental factors leading to severe corrosion with localized attacks14,15. The deleterious effect of chlorine ions on alloys has been extensively investigated, and it has been demonstrated that the presence of chlorine ions can significantly increase the corrosion rate by orders of magnitude16,17. Magnesium alloys exhibit highly susceptible to chloride-induced corrosion like stainless steel18,19,20.

Plenty of research has been conducted to demonstrate the role of chlorine ions in the corrosion process. The well-known point-defect models, void models, and adsorption mechanisms all emphasize the importance of preventing invading by chlorine ions21,22,23,24. According to Hoar et al. view, Cl is expected to penetrate the corrosion film and reach the interface between the film and matrix. The introduction of Cl results in external forces that cause the breakdown of corrosion film25. Burstein and Mattin suggest that a high concentration of Cl at the interface may result in the formation of metal chloride, leading to swelling of the corrosion film and pitting corrosion due to volume mismatch between compounds and metals26. The prevention of Cl accumulation at the interface between corrosion film and matrix is of central importance against Cl attack.

Corrosion film can avoid the connection between corrosive solution and matrix to reduce the accumulation of chlorine ions. The hindrance of chlorine ions diffusion within the corrosion film must be considered when describing its chlorine ions-resistance ability. Incorporating rare earth elements through alloying is considered an effective method for affect the diffusion process of ions within films27,28. Nevertheless, the clarifying diffusion process in the corrosion film remains a tough challenge, owing to the low concentration, complicated composition of chemical state and high demand of spatial resolution. Fortunately, these problems may be solved by the co-work of developed analyzing techniques. Time-of-flight secondary ion mass spectroscopy (ToF-SIMS) offers exceptional resolution, facilitating the demonstration of ion diffusion in low concentrations29. X-ray photoelectron spectroscopy (XPS) can confirm chemical states and reveal the relationship between diffusion barriers and chemical environments30. Auger electron spectroscopy (AES) excels depth profile investigations due to its high spatial resolution and efficient sputtering rate, enabling precise localization of the film/metal interface31.

In this study, we fabricated a Mg-Nd-Zr alloy, which exhibits a stable corrosion resistance in varying concentration of chlorine ions solution comparing to pure magnesium (Mg). The diffusion process and the underling mechanism are investigated by several spectrum analysis techniques. The detailed atomic-scale difference in diffusion barrier is investigated by Density functional theory (DFT) calculations. The hindering effect of corrosion film in Cl diffusion is discussed, which may aid in the design of high-corrosion-resistant magnesium by impeding the diffusion of harmful ions.

Results and Discussion

Corrosion performance in 3.5/10 wt.% NaCl solution

Conventional corrosion tests, namely hydrogen evolution and weight loss measurements, were employed to investigate the disparity in corrosion resistance among various magnesium alloys. The corrosion resistance of Mg-Nd-Zr in 3.5/10 wt.% NaCl solution is comparable, as illustrated in Fig. 1, with only slight corrosion pits observed on the surface. In contrast, Mg exhibits more pronounced signs of corrosion in higher Cl concentrations.

Fig. 1: Hydrogen evolution and weight loss tests of Mg and Mg-Nd-Zr in 3.5/10 wt.% NaCl solution.
figure 1

a Surface appearance of Mg after corrosion in 3.5 wt.% NaCl. b Surface appearance of Mg after corrosion in 10 wt.% NaCl. c Surface appearance of Mg-Nd-Zr after corrosion in 3.5wt.% NaCl. d Surface appearance of Mg-Nd-Zr after corrosion in 10 wt.% NaCl. Error bars representing the standard deviation of corrosion rate.

The morphology of Mg and Mg-Nd-Zr alloys in 3.5/10 wt.% NaCl solutions is depicted in Fig. 2 using Laser scanning confocal microscopy (LSCM), respectively. As illustrated in Fig. 2a, the surface of Mg exhibits pronounced pitting corrosion when exposed to a 3.5 wt.% NaCl solution. With the increase of Cl concentration, massive and larger corrosion pits are observed. The higher concentration of chlorine ions, the enhanced susceptibility to pitting corrosion. As chlorine ions will lead to an invalidation of corrosion film due to the accumulation of stress force32,33, broader and deeper corrosion pits occur. In contrast to Mg, the surface of the Mg-Nd-Zr alloy remains predominantly intact. Only minor pitting or crevices are discovered in either 3.5 wt.% or 10 wt.% NaCl solutions, indicating its superior resistance against chlorine ions attack.

Fig. 2: Morphology of Mg and Mg-Nd-Zr in 3.5 wt.%/10 wt.% NaCl solutions by LSCM.
figure 2

a Mg in 3.5 wt.% NaCl solution. b Mg in 10 wt.% NaCl solution. c Mg-Nd-Zr in 3.5 wt.% NaCl solution. d Mg-Nd-Zr in 10 wt.% NaCl solution.

The electrochemical tests of Mg and Mg-Nd-Zr are displayed in Fig. 3. The Open circuit potential (OCP) reflects the surface changes during the corrosion process, relating to the formation of corrosion film34. As depicted in Fig. 3a, both Mg and Mg-Nd-Zr exhibit more pronounced fluctuations during the immersion test in 10 wt.% NaCl solution, which can be attributed to the intensified corrosion process caused by higher chlorine ions concentration attack. As the fluctuations in OCP representing of the formation and degradation of pitting35, Mg-Nd-Zr alloy performs relative smoothly fluctuations in OCP curves.

Fig. 3: Comparison of electrochemical properties for Mg and Mg-Nd-Zr in different concentrations NaCl.
figure 3

a OCP diagrams. b PDP diagrams. c Nyquist diagrams; (c1, c2) equivalent circuit diagram of EIS fitting. d Bode diagrams.

As illustrated in Fig. 3b, the Potentiodynamic polarization curves (PDP) demonstrate that both Mg and Mg-Nd-Zr exhibit a similar tendency. The essential parameters of PDP are presented in Table 1. For Mg, the corrosion current density is approximately 2.3 × 10−5 A/cm2 in a 3.5 wt.% NaCl solution, and there is a significant acceleration of the corrosion rate to 7.2 × 10−5 A/cm2 in 10 wt% NaCl solution. Conversely, only a slight increase in current density from 1.2 × 10−5 A/cm2 to 1.8 × 10−5 A/cm2 is observed in Mg-Nd-Zr alloy. Moreover, higher chlorine ion concentrations tend to accelerate Hydrogen evolution reaction (HER)36,37, thus the cathodic branches of Mg and Mg-Nd-Zr both shift towards to a more noble direction in 3.5 wt.% and 10 wt.% NaCl solutions. However, comparing to the significant shift of Mg, Mg-Nd-Zr performs a slight variation at cathodic branch. Moreover, in both 3.5 wt.% and 10 wt.% NaCl solutions, the Mg-Nd-Zr alloy exhibits quasi-passivation behavior on the anodic branch, indicating a higher resistance to chlorine ions attack. The similar value of breakdown potential (Eb) implies that a protective corrosion film formed on the surface.

Table 1 Electrochemical parameter of PDP.

Furthermore, as shown in Fig. 3c, d, electrochemical impedance spectroscopy (EIS) was applied to investigate the corrosion behavior of Mg and Mg-Nd-Zr in different concentration of chlorine ions solution. It is found that in both 3.5 wt.% and 10 wt.% NaCl solutions, Mg-Nd-Zr exhibits a relatively stable anti-corrosion ability. The dual-capacitance phenomenon is observed in both spectra, which is considered to be indicative of significant corrosion resistance38,39. For Mg, a similar capacitance phenomenon can be observed in 3.5 wt.% NaCl solution with smaller impedance modulus. However, when exposed to 10 wt.% NaCl solution, the capacitance zone transforms into an inductance zone due to its limited resistance against chlorine ions attack, representing a significant deterioration of corrosion resistance40,41. The corrosion behavior of Mg exhibits a transition from capacitive to inductive loop. The inductive loop at low frequency is related to the relaxation of ions or hydrogen bubbles at the interface42. On the other hand, Mg-Nd-Zr exhibits greater stability in response to changes in corrosion environment, as evidenced by the absence of inductive loop in Nyquist diagram. Only a slight reduction of impedance modules is found. It implies that Mg-Nd-Zr exhibit an insensitivity to Cl corrosion.

The fitting parameters of EIS are presented in Table 2. It is evident that the charge transfer resistance (Rct) of Mg exhibits a significant decrease, dropping from 834.9 Ω∙cm2 to 101.8 Ω∙cm2, representing an approximate reduction of 87.5% with the increasing of Cl concentration. In the case of Mg-Nd-Zr alloy, only a slight decline in Rct (decreasing from 2011 Ω∙cm2 to 1425 Ω∙cm2) is observed, indicating the sustained resistance to Cl attack. Additionally, Mg-Nd-Zr alloy demonstrates the presence of capacitive behavior with respective variation values of 2347 Ω∙cm2 and 2236 Ω∙cm2 when immersed in 3.5 and 10 wt.% NaCl solution respectively. Thus, it is obvious that the Mg-Nd-Zr alloy exhibits superior corrosion resistance compared to Mg when exposed to severer attack of chlorine ions.

Table 2 Electrochemical parameter of EIS.

The investigation of the corrosion film

Time-of-flight secondary ion mass spectrometry (ToF-SIMS) depth profile analyses with positive ion charge were conducted to identify the diffusion ability of chlorine ions within corrosion film on different Mg alloys. The observation areas are determined by Optical microscope (OM), Scanning electron microscope (SEM) and the 3D view of ToF-SIMS. No significant devoid of signal are observed, implying no defects or cracks are present in the testing zone. Thereby, the signal of chlorine ions mainly origin from the diffusion process within corrosion film.

The depth profile of chlorine ions for various alloys, as revealed by ToF-SIMS, is presented in Fig. 4b. It demonstrates the diffusion behavior of Cl on the upper region in corrosion film. Apparently, the concentration of chlorine ions on Mg-Nd-Zr decreases sharply to below 1 × 104 immediately. Conversely, the concentration of chlorine ions on Mg exhibits a relatively gradual decrease. Furthermore, the variation of Cl intensity with sputtering time is represented by differential form of \(\frac{{d\; intensity\; of\; chlorine\; ions}}{{d\; sputtering\; time}}\) in Fig. 4c. It indicates the variation rate of Cl signal with the increasing of depth. The derivative value of Mg-Nd-Zr alloy is significantly greater than that of Mg (in absolute terms), indicating a more pronounced hindering effect on the diffusion of chlorine ions within the corrosion film, as evidenced by a faster reduction in the number of chlorine ions present. This suggests that diffusion in the Mg-Nd-Zr corrosion film is more difficult for chlorine ions.

Fig. 4: ToF-SIMS analysis Cl- of Mg and Mg-Nd-Zr.
figure 4

a Appearance of test region with exhibits optical images and perform a SEM views. b ToF-SIMS depth profile of Cl in corrosion film. c The variation of Cl intensity by differential form (d) the deep profile imaging (cross section) by ToF-SIMS.

To further clarify the diffusion process of chlorine ions, the deep profile imaging (cross section) was applied, and the results were displayed in Fig. 4d. The regions enriched with chlorine ions exhibit a significantly larger area in the Mg corrosion film as compared to that of the Mg-Nd-Zr alloy. Furthermore, the depth profile imaging of chlorine ions penetration is considerably greater within Mg corrosion film. Notably, an accumulation of chlorine ions is present at or near the surface which is believed to be responsible for initiating pitting corrosion43,44. And its concentration gradually decreases with increasing depth, indicating poor hindrance to chlorine ions diffusion. In contrast, the diffusion of chlorine ions is rapidly impeded and the diffusion depth nearly halves within Mg-Nd-Zr corrosion film, demonstrating a superior anti-chlorine ions ability.

The 3D images presented in Fig. 5 further confirmed the variation in chlorine ions prevention. At equivalent depths, Mg corrosion film exhibits higher concentrations of chlorine ions compared to Mg-Nd-Zr alloy, resulting a significant accumulation of chlorine ions. The higher concentration of chlorine ions, the weaker hindering effect of corrosion film. The uniform distribution of Cl concentration within the corrosion film on Mg-Nd-Zr alloy suggests a reduced propensity for pitting. The results are consistent with the LSCM imaging in Fig. 2, where Mg-Nd-Zr exhibits predominantly uniform corrosion characteristic rather than pitting corrosion.

Fig. 5: 3D view depth analysis of ToF-SIMS.
figure 5

a Mg corrosion film. b Mg-Nd-Zr corrosion film.

The X-ray photoelectron spectroscopy (XPS) survey scan of the corrosion film on Mg-Nd-Zr alloy was presented in Fig. 6a. The corrosion film primarily consists of Mg and O elements, as revealed by survey scan analysis. The presence of Na and Cl signals can be attributed to residual NaCl within the corrosion film. Additionally, the detection of Nd and Zr signals suggests the existence of these alloying elements. Notably, considering the co-localization of O KLL and Nd 3d signals, we further analyzed the Nd 4d signal to determine its chemical state45,46,47. As evidenced by the detailed spectra of Mg and O shown in Fig. 6b, c, it can be confirmed that the composition of the corrosion film primarily consists of Mg (OH)2 and MgO. Additionally, high-resolution XPS of Zr 3d and Nd 4d are presented in Fig. 6e, f. The Zr 3d XPS spectra display a typical Zr 3d\(\frac{5}{2}\) at 182.2 eV with the Zr 3d\(\frac{3}{2}\) at 184.6 eV, which can be attributed to Zr4+. Similarly, the presence of Nd3+ 4d in 121.1 eV the corrosion film is confirmed by analysis of the Nd element. These results confirm the presence of Zr and Nd elements in the corrosion film, which is believed to play a key role in hindering chlorine diffusion. Additionally, the presence of chlorine (Cl) ions is detected through XPS.

Fig. 6: Chemistry states variation of Mg-Nd-Zr corrosion film.
figure 6

a XPS survey spectra. b Fine XPS spectra of Mg 2p. c Fine XPS spectra of O 1 s. d Fine XPS spectra of Cl 2p. e Fine XPS spectra of Zr 3d. f Fine XPS spectra of Nd 4d.

Auger electron spectroscopy (AES) was incorporated for thorough investigation of the diffusion process of chlorine element from the surface of the corrosion film to the interface.

AES spectrum is depicted in Fig. 7 before and after sputtering. Distinct signals of O, Mg and C are detected. Immersing in a higher concentration of chlorine ions solution results in a more pronounced Cl signal. The absent signal of Nd and Zr in AES surface spectrum might be blaming to its low content on surface of corrosion film. Nevertheless, for the AES spectrum after sputtering, O signal tend to be absent with the appearance of Nd peaks48,49. It implies after test, the matrix of alloys is exposed.

Fig. 7: The AES spectrum of corrosion film on Mg and Mg-Nd-Zr before and after sputtering respectively in 3.5/10 wt.% NaCl.
figure 7

a Corrosion film on Mg before/after sputtering in 3.5 wt.% NaCl. b Corrosion film on Mg before/after sputtering in 10 wt.% NaCl. c Corrosion film on Mg-Nd-Zr before/after sputtering in 3.5 wt.% NaCl. d Corrosion film on Mg-Nd-Zr before/after sputtering in 10 wt.% NaCl.

The depth profile by AES from the surface to matrix record the variation of Mg, O, Cl, Nd and Zr in various concentration of chlorine ions solution in Fig. 8. It is seen that at the beginning, the fluctuation of Mg and O fraction is small in both Mg and Mg-Nd-Zr. With the increasing of depth, Mg is significantly shifted accompanying by the reduction of O signal. The location of the interface is determined by the characteristic phenomenon of weak signal of O and strong signal of Mg in Mg and Mg-Nd-Zr alloy, respectively in different corrosion solution50,51,52. Under the attack of different concentration of chlorine ions, the thickness of corrosion film is different. In a 3.5 wt.% NaCl solution, the corrosion film thickness on Mg and Mg-Nd-Zr alloys is 530 nm (Fig. 8a) and 400 nm (Fig. 8c), respectively. However, in a 10 wt.% NaCl solution, there is a noticeable increase of the corrosion film thickness on Mg to 700 nm (Fig. 8b), whereas only a slight variation is observed for Mg-Nd-Zr alloy.

Fig. 8: Depth analysis elements within corrosion film on Mg-Nd-Zr alloys.
figure 8

a AES depth analysis of total elements in Mg in 3.5 wt.% NaCl solution. b AES depth analysis of total elements in Mg in 10 wt.% NaCl solution. c AES depth analysis of total elements in Mg in 3.5 wt.% NaCl solution. d AES depth analysis of total elements in Mg in 10 wt.% NaCl solution. e AES spectra of Cl in Mg-Nd-Zr serving in different concentrations NaCl.

The variations of normalized intensity of Cl signal in Mg and Mg-Nd-Zr are displayed in Fig. 8e. Apparently, the variation of Cl signal within the corrosion film is totally different in Mg and Mg-Nd-Zr alloy. As for Mg corrosion film, the variation of Cl signal is smooth. The fluctuation of Cl content versus the corrosion depth is small, indicating the poor preventing ability of the corrosion film. Conversely, with regards to Mg-Nd-Zr, a significant reduction of Cl signal is observed in either 3.5 or 10 wt.% NaCl solution. The normalized intensity of the Cl signal even decreased to more than one fifth in 3.5 wt.% NaCl solution, demonstrating the superior ability to prevent the invading of Cl. Although the amplitude of decreasing become smaller with the increase of NaCl content, the Mg-Nd-Zr alloy shows much stronger enhancement of resistance to Cl compared with pure Mg. With such a minor Nd and Zr doping, the impedance of corrosion film is significantly improved.

Mechanism of insensitivity to chlorine ions attack

The up-mentioned study indicates that via alloying Nd and Zr, the anti-ability of chlorine ions attack of Mg alloys is significantly improved. The ability to resist chlorine ions attack of Mg-Nd-Zr alloys may be attributed to changes in chemical states within the corrosion film after introducing other elements. The refined spectra of O and Mg confirm the variation in chemical conditions after adding Nd and Zr elements into the corrosion film.

Based on the high-resolution XPS spectra of Mg 2p (Fig. 9a), it can be observed that the Mg 2p peak for Mg corrosion film is located at 49.42 eV with the blue line. In contrast, for Mg-Nd-Zr, the Mg 2p peak shifts to a higher binding energy ranks 49.74 eV due to variations in chemical states for Mg2+. Analogously, the binding energies of oxygen are situated at 531.15 eV in the case of Mg corrosion film, while a peak shift signal at 531.43 eV is detected for Mg-Nd-Zr corrosion film (Fig. 9b). The shift towards higher binding energy in the O 1 s peak suggests that oxygen vacancies may be passivated following this introduction53. Meanwhile, the Mg 2p binding energies shifted to higher values, indicating strong chemical interactions between the introduced elements and Mg. Furthermore, these differential binding interactions resulted in a charge transfer effect around the Mg2+ species, which might affect the diffusion process of chlorine ions54. In short, the upward shift in binding energy of O 1 s and Mg 2p peaks indicate the changes in chemical environment. It could affect the diffusion process, thereby contributing to its barrier properties against chlorine ions diffusion55,56.

Fig. 9: Chemistry states variation of Mg and Mg-Nd-Zr corrosion film.
figure 9

a Chemical shift of O spectra in Mg and Mg-Nd-Zr. b Chemical shift of Mg spectra in Mg and Mg-Nd-Zr.

The inherent relationship between doping elements to diffusion process of chlorine element is demonstrated by DFT. Figure 10a shows the top view of the computational model of Nd and Zr doped Mg (OH)2, with an Mg vacancy and two hydroxyl group vacancies neighboring to the Mg vacancy. The diffusion behavior of chlorine element between the two neighboring hydroxyl vacancies has been studied in pure Mg (OH)2 and Nd and Zr doped Mg (OH)2. The structure is subsequently relaxed, and the model with lower energy is chosen as the initial state. The transition state is then optimized using the climbing image nudged-elastic-band (CI-NEB) method57,58,59,60,61, the computational details can refer to experiment section mentioned above. With the help of Lobster software package62,63,64, we calculated -pCOHP between Mg and chlorine element after introducing Nd and Zr elements. Integrated COHP (ICOHP) represents the integral of -pCOHP below the Fermi level, and the more negative value corresponds to the stronger binding between atoms. Figure 10d show that the average ICOHP between magnesium and chlorine elements in Mg-Nd-Zr corrosion film is more negative than in Mg corrosion film, indicating a stronger binding of chlorine element and Mg in the corrosion film of Mg-Nd-Zr alloy. As illustrated in Fig. 10e, the chlorine diffusion barrier is 0.508 eV in Mg corrosion film and 0.640 eV in Mg-Nd-Zr corrosion film, respectively. The diffusion barrier of Mg-Nd-Zr is much higher than that of Mg, thus the Cl is more difficult to diffuse with Nd and Zr addition. Generally, the diffusion rate of chlorine ions at each individual hop can be described in Arrhenius forms by transition state theory according to

$$\varGamma ={v}^{* }{e}^{\left(\frac{-{\varDelta E}_{B}}{{kT}}\right)}$$
(1)

where \({v}^{* }\) is an effective vibrational frequency and \({\Delta E}_{B}\) represent the diffusion barrier defined as the energy difference between the activated state and the initial equilibrium state of the hop65,66. Diffusion barrier is closely related to the structure and chemical composition of the diffusion condition. The presence of alloying elements in magnesium alloys can alter the structure and chemical composition of the corrosion layer, so as to affect the diffusion process of the chlorine.

Fig. 10: DFT modelling of Nd and Zr doped Mg (OH)2 corrosion film and the diffusion process of Cl.
figure 10

a The atomic structures of corrosion film top view; (b) top view; (c) side view. d The calculated -pCOHP of Mg and Mg-Nd-Zr. e The comparison of diffusion energy barrier of Mg and Mg-Nd-Zr corrosion film. The blue, purple, orange, pink, red and green spheres denote Nd, Zr, Mg, O, H, and Cl, respectively.

The diffusion behavior of Cl is closely related to the structure and chemical state of corrosion film. The increase of diffusion barrier is mainly attributed to two factors in Mg-Nd-Zr alloy. On the one hand, the presence of alloying elements in magnesium alloys can passivate the vacancies, decreasing the pathway of chlorine ions diffusion67. On the other hand, the adding of alloying elements could enhance the diffusion barrier of Cl68. These two factors work together to efficiently impede the diffusion of Cl by enhancing the diffusion barrier of Cl, as evidenced by up-mentioned results.

The majority of magnesium alloys demonstrate a pronounced sensitivity to Cl due to its significant contribution to pitting corrosion69,70. The possibility of enhancing the resistance of Mg alloys to Cl by incorporating additional elements into the corrosion film through alloying has been experimentally demonstrated in this work. Therefore, it may be feasible to regulate the chemical states of the corrosion film in order to obtain a more protective barrier against harmful ions.

In general, the corrosion behavior, especially the Cl diffusion behavior of Mg-Nd-Zr in solutions with varying chlorine ions concentration is investigated. Through spectral analysis and DFT calculations, the “hindering effect” of the corrosion film in Mg-Nd-Zr alloy is demonstrated and explained.

As for Mg, the Cl content at the surface and the interface is almost the same, which means the little protection of the corrosion film. In contrast, a sharp decrease of Cl content with the depth of corrosion film is observed in Mg-Nd-Zr alloy, implying the strong resistance to chlorine. The difference in Cl diffusion behavior may generally be due to two factors, The introducing with Nd and Zr elements can effectively passivate vacancies and alter diffusion energy of chlorine.

Methods

Material preparation and compositional analysis

The Mg-Nd-Zr alloy is fabricated via traditional casting method and make the commercial pure Mg as a reference. The chemical compositions of alloys were determined using an Inductive coupled plasma emission spectrometer (ICP-OES, Thermo Fisher Scientific iCAP 7500, USA) for precise analysis in Table 3.

Table 3 Chemical composition of alloys.

Electrochemical test

The corrosion resistance of Mg-Nd-Zr and Mg alloys was assessed using conventional electrochemical techniques, including Potentialdynamic polarization (PDP), Electrochemical impedance spectroscopy (EIS), and Open circuit potential (OCP). All experiments were conducted at room temperature in a in 3.5/10 wt.% NaCl solution utilizing a three-electrode system with an Ag/AgCl reference electrode and platinum electrode on an Autolab 302 N electrochemical workstation, with each test repeated at least thrice.

The specimen was cut to a diameter of 15 mm and a thickness of 5 mm. To eliminate the deleterious effects of contamination, each surface was lightly ground with 2000 grit SiC emery paper followed by ethanol degreasing. Prior to conducting the PDP test, a 3600-second OCP test was performed to evaluate the potential variation during immersion in NaCl solution. The PDP test commenced after a stabilization period at a scan rate of 0.1 mV/s, ranging from −5 mV vs open circuit potential to 1.6 V vs reference electrode for the anodic branch and from 5 mV vs open circuit potential to −300 mV vs open circuit potential for the cathodic branch, respectively. Additionally, following a 1-h stabilization period, electrochemical impedance spectroscopy (EIS) was conducted using a frequency range of 100 kHz to 0.01 Hz and an amplitude of 10 mV in close proximity to the open circuit potential (OCP).

Corrosion test

Prior to the experiments, all specimens were polished using SiC paper with grit sizes of 800, 1200, 2400 and 4000, using ethanol as a lubricant, the alloys were rinsed with ethanol and dried using compressed air. Specimens with dimensions of 15 * 15 * 3 mm were prepared via wire-electrode cutting from the ingot. All samples were polished by different polish paste to obtain clean surface. Hydrogen collection and weight loss test were conducted in 3.5/10 NaCl wt.% solution for 7 days at room temperature. After being immersed in 3.5/10% NaCl for 24 h, the corrosion products were removed using a dilute solution of chromium trioxide, silver nitrate, and barium nitrate followed by cleaning with ethanol. The surface morphology of these alloys was then investigated using a Laser scanning confocal microscope (LSCM, KEYENCE VK-X3000, Japan).

Spectrum analysis

To control the thickness of corrosion film, all samples were prepared for spectrum analysis in the size of 4 × 4 × 3 mm after immersion in 3.5%/10% NaCl for 1 h, respectively.

Time-of-flight secondary ion mass spectroscopy (ToF-SIMS) was performed using a ToF-SIMS instrument (ION TOF ToF SIMS 5-100, Germany) equipped with Bi Source analysis gun (LMIG, Liquid metal ion gun) and Argon atomic cluster ion Gun (GCIB). The sputtering source is equipped with O source and Cs source. The Bi-LMIG was set in the positive ions mode using Bi+ ions with 30 keV, 45 deg and scanning 100 × 100 \(\mu {m}^{2}\) testing area to investigate chlorine ions (Cl). Depth profiling and imaging was performed in the non-interlaced mode with 10 frame of analysis, 1 s of sputtering and 0.5 s pausing per cycle while using and Cs ions at 1 keV and 0.3 nA were used. Both image and depth profile analyses were performed using the ION-ToF Surface Lab software (Version 6.3, ION-ToF, GmbH, Münster, Germany). The total primary ion flux was kept below 1012 ions/cm2 to ensure static states for the surface imaging experiments.

X-ray photoelectron spectroscopy (XPS, Nexsa Thermo Fisher Scientific) was performed to clarify the composition of the corrosion film with an Al Kα X-ray source. The pass energy for recording the survey spectra and region spectra was set at 160 eV and 20 eV, respectively. The sample area under investigation was selected as 700 × 300 μm. CASA-XPS software (version 2.3.18) was utilized to validate and evaluate the XPS data, with the C1s signal serving as a calibration reference adjusted to 284.5 eV. Background subtraction (Shirley) was performed to calculate the region spectra.

Auger electron spectroscopy (AES) depth profiling was conducted using the PHI-700 ULVAC-PHI instrument from Japan to investigate the distribution of ions within the corrosion film at greater depths. The experimental procedure involved scanning with an Ar+ gun, where the high voltage of the electron gun was set at 5 kV. The energy resolution was maintained at 1‰, while the incidence angle was fixed at 30° with the vacuum degree in the analysis chamber exceeded 3.9 × 10 − 9 Torr. The sputtering rate is modified by SiO2 ranking 20 nm/min.

Density functional theory (DFT)

In order to build the corrosion film model of Mg (OH)2 doped with alloying elements, the Mg(OH)2 unit cell is expanded into a 3 × 3 × 3 supercell. A magnesium atom and its adjacent two hydroxyl groups are removed to simulate defects and diffusion channels in the corrosion film. Mg atoms around the defect are replaced by alloying elements. To construct the initial and final structures, chloride ions are placed in place of the original hydroxyl groups, respectively. After optimization, three images are interpolated in the form of linear interpolation to be used as a search for the reaction path.

All Density functional theory (DFT) calculations were performed by using VASP code71. The inner cores of the atom were replaced by the frozen-core approximations and the projector-augmented wave (PAW) method72 was applied to describe the electron−core interaction. The Perdew-Burke-Ernzerhof (PBE) functional within the generalized gradient approximation (GGA)73 was used to model the exchange correlation energy. Spin-polarization effect was employed in all calculations. Geometry optimizations were performed by using the conjugate gradient algorithm until all forces are smaller than 0.02 eV/Å. The self-consistent field (SCF) tolerance was set to 1 × 10−5 eV on total energy for the convergence criteria. The k-point sampling of the Brillouin zone was obtained using a 3 × 3 × 2 grid for the repetitive unit by Gamma centered scheme. A Gaussian smearing with σ = 0.05 eV to the orbital occupation is employed during structure relaxation and energy calculations. The transition state search is performed by the climbing image-nudged elastic band61,74 (CI-NEB) method.

All pre- and post-processing were done by VASPKIT75.