Introduction

Surface modification treatments of magnesium and its alloys have been developed for improving the corrosion resistance, wear resistance, and other properties of magnesium and its alloys to enhance their applications.1,2,3 Among these treatments, anodization is a cost-efficient, eco-friendly, and user-friendly method capable of achieving ceramic coatings with enhanced properties such as a high hardness, high adherence to the substrate, and importantly, significant corrosion and wear resistance.4,5 The thickness of an anodized coating can range from 5 to 200 µm.6

Generally, this coating is composed of three layers: a thin inner barrier layer of approximately 100 nm, followed by a dense intermediate ceramic oxide layer, and finally a very porous outer oxide layer.7 Such porous layers are incapable of offering protection against corrosion for a sufficiently long period, which gives the possibility for corrosive species to penetrate through the pores and reach the metal interface. Thus, the natural porous structure of the anodic layer is the major restriction for the use of anodized coatings in a wide range of applications.8,9,10 In this regard, three main feasible approaches have been developed to obtain satisfactory coating properties: (1) modification of the electrical parameters, (2) optimization of the electrolyte composition, and (3) application of surface post-treatments. Concerning the first approach, various studies have been conducted to overcome the porosity in the coatings by modifying the electrical parameters, including the applied current density, current mode, voltage, duty cycle, and frequency. However, the coating properties are limited owing to the restricted electrical effect on coating composition. Regarding the second approach, the addition of various particles into the electrolyte shows a beneficial effect on the coating microstructure and properties. However, the resulting coating still offers short-term corrosion protection due to the large number of pores in the coating surface.7,11,12,13 Therefore, post-treatment for sealing the porous layer is a more promising way to modify the natural high porosity of the anodic thin film and obtain a dense and sealed layer that provides protection against corrosion in an aggressive medium for a sufficiently long term.14,15,16 Consequently, various post-anodization methods have been developed to increase the corrosion resistance of the anodized thin films. Often, a simple post-treatment by immersion of the anodized sample in boiling water is used. In this procedure, the improvement in corrosion resistance of the anodized coatings is explained by the formation of hydroxides and oxides in the pores and partial blocking of the porosity in the coatings.17,18 Other alternatives have been suggested for more aggressive environments. Thus, based on the same sealing principle, various types of post-treatments have been further investigated using different solutions. Among them, the layered double hydroxide (LDH), sol–gel, hydrothermal, and cerium-based methods are promising post-treatments that offer superior corrosion resistance as they create pore-free coatings with uniform coverage on various anodized thin films.19,20,21 The post-anodized layers significantly extend the service life of the coated magnesium alloys, hence resulting in alloys able to be widely used in the automobile, transport, electronics, biomedicine, aerospace, and other industries owing to their low density, adequate mechanical features, and excellent corrosion properties.18,22,23,24 This article reviews the most important research advances with regard to the influence of the different post-sealing methods on the corrosion resistance, morphology, and composition of the anodized thin films formed on magnesium alloys.

Post-treatment methods for anodized thin films

Post-treatment is an essential step for improving the corrosion resistance of all anodized layers. In post-anodization treatment, obtaining uniform and compact coatings to ensure the sealing of pores in anodized coatings is challenging. The adhesion between the sealing agent and the anodized coating should be good, and the pores should be filled by the sealing agent. Sealing agents should be applied on the anodized sample immediately after anodization. Post-anodized layers are usually formed through in situ growth, anion exchange, hydrothermal treatment, heat treatment, and electrodeposition conversion processes on the surface of anodized magnesium alloys. In some cases, presealing processes have been utilized to improve the growth of a post-layer on anodized specimens. Post-treatment can improve not only the corrosion properties but also the wear resistance and hardness of the coatings. In this review, only the corrosion properties and morphology of post-anodized coatings are discussed. Table 1 lists the main features of the various post-anodization methods that have been applied to anodized thin films formed on magnesium alloys to enhance their corrosion properties. As can be inferred from the table, a wide range of post-anodization treatments and possible applications exist.

Table 1 Summary of post-anodization coating procedures and corrosion performance of the resulting coatings

Layered double hydroxide (LDH) method

Today, layered double hydroxides (LDHs) constitute a promising coating with economic and ecological benefits and a unique corrosion protection performance; in addition, they have been actively explored as nanocarriers owing to their excellent ion exchange capability.25,26,27 LDHs are a two-dimensional laminar nanomaterial with the structure of a brucite-like layer; they are commonly composed of mixed metal cations MII–MIII, interlayer anions (Ay−), and water molecules with the typical formula \(\left[ {{\text{M}}_{1 - x}^{{\rm II}} {\text{M}}_{x}^{{\rm III}} ({\text{OH}})_{2} } \right]^{x + } ({\text{A}}^{y - } )_{x/y} \cdot z{\text{H}}_{2} {\text{O}}\).28,29,30 The combination of LDH coatings with anodized thin films on light alloys has been a growing research field in recent years. The pores in anodic thin films can be sealed by the production of LDHs, and the corrosion resistance of the coating is effectively improved after the growth of the LDHs.31,32,33,34 Besides, LDHs exhibit an inhibitory effect against corrosion owing to their self-healing ability, as shown in Fig. 1. The corrosive medium effectively restores minor damages or failures in the LDH coating by itself via the entrapment of aggressive species, such as Cl, and the release of anionic corrosion inhibitors.35,36,37,38,39 This effect can be described as the diffusion of corrosion inhibitors on the uncovered substrate and their formation on the damage via interactions with the metallic substrate. Consequently, the damage in the smart coating is healed. It was confirmed by Zhang and coworkers39 that the LDHs formed on anodized magnesium alloy AZ31 sufficiently enhanced the corrosion properties of the anodic layer and exhibited self-healing ability. The scanning vibrating electrode technique (SVET) map results revealed that some corrosion products in LDHs deposited on microarc oxidized and cerium-modified (MAO-Ce) sample were noticeably reduced after a 24-h corrosion test. On the contrary, the MAO coating exhibited passive corrosion protection and the MAO cerium coating provided a limited self-healing effect.

Fig. 1
figure 1

Schematic illustration of the entrapment of the aggressive chloride ions and triggered release of anionic corrosion inhibitors from LDHs 39

Sol–gel method

The sol–gel process is a favorable approach for producing an environmentally acceptable anticorrosion coating with the main advantages of strong adhesion between substrate and coating, stability in the chemical and thermal medium, thick coating, controlled composition, low processing temperatures, low cost, easy preparation, and simple procedures.40,41,42 Their preparation is based on the hydrolysis and condensation reactions of metal oxides, especially oxides of silicon and titanium. The organic–inorganic hybrid sol–gel coatings were developed in the last two decades to overcome the disadvantages of inorganic sol–gel coatings. The organic component of sol–gel coatings offers conformity with polymer coating, and the inorganic component offers good adhesion with the metal substrate. Thus, the coating is more flexible and presents less damages.43,44,45 The sol–gel effectively plugs the pores in the anodic coating. Therefore, it is considered one of the most beneficial post-anodization sealing methods for magnesium alloys. A completely covered and dense layer can be formed by the sol–gel process on the porous anodic coating.46,47 In the past several years, hybrid sol–gel composite coating techniques have been developed for the anodized thin films formed on magnesium alloys to enhance the protective properties of the anodic layer.48,49,50,51,52 Niu et al.51 have applied a hydroxyapatite (HA) coating by the sol–gel technique to protect an anodized AZ31 magnesium alloy. Good bonding strength, of 40 MPa, and decreased hydrogen evolution rate of the anodized layer were found.

Hydrothermal method

The hydrothermal treatment is well known for obtaining a biocompatible coating on metals and alloys to improve their corrosion resistance with a simple and low-cost process.52,53,54 Moreover, the combination of anodic and hydrothermally grown bilayer coatings has been widely developed in the last several years because the bioactive top layer improves the properties of the anodized bottom layer. The improvement in corrosion resistance and biocompatibility of the coating are based on a hydrothermally grown layer, which may seal the pores and cracks on the surface of the anodized thin film.55,56,57 The hydrothermally grown HA coating is considered as an important material for bones and tooth implants owing to its excellent biocompatibility. It has been thoroughly investigated that the chemical composition of HA is similar to that of bones, and it chemically bonds to bones.58 Therefore, the hydrothermal treatment is an inspiring post-anodization method for light alloys, and numerous studies have been successfully performed on titanium and magnesium alloys.59,60,61 Yao et al.61 obtained a compound coating with enhanced protection against corrosion, compared to that offered by a single MAO coating, using a two-step process involving the MAO and hydrothermal treatment of magnesium alloy AZ31B. Owing to the hydrothermal treatment, the apatite-induced ability of the coating was improved. Yu and coworkers59 applied an HA coating on anodized AZ31B magnesium alloy via a simple hydrothermal method to improve its corrosion properties. Improved corrosion resistance, lower degradation rate, and good adherence properties of the anodized layer were found. Thus, the application of the hydrothermal treatment seems to be a satisfactory and practical method to protect the anodized layer.

Cerium-based method

During the last few decades, rare earth metals have been widely explored as green alternatives to the coating of metals and alloys with chromates, which are toxic.62,63 Among such green alternatives, cerium salts have been successfully used as corrosion inhibitors on magnesium and its alloys owing to their effectiveness. Cerium ions are widely known to offer good resistance against attacks from chloride ions, and cerium-based treatments lead to the formation of a protective cerium oxide thin film on magnesium alloys.64,65,66 Therefore, researchers have employed cerium-based treatment as a post-anodization method on magnesium alloys. This can be considered a feasible approach as it is a cost-effective and environmentally compatible process. Lim et al.67 obtained a slight improvement in the corrosion resistance of magnesium alloy AZ31 after CeCl3 solution sealing. Laleh et al.33 used cerium-based sealing on anodized AZ91D to seal pores in the anodic layer, and enhanced corrosion resistance and reduced porosity of the resulting coating were observed. Several studies have revealed that protective cerium oxide thin films formed on anodized magnesium alloys may provide active corrosion protection by healing the damages in the coating through interactions with the metal interface.33,67,68,69,70 Reporting on this corrosion protection effect, the authors of a previous study70 noted that the corrosion protection behavior of a cerium-converted thin film, formed on anodized magnesium alloy AM50, was active. Nevertheless, Zhang et al.39 reported that the self-healing ability of the cerium conversion coating on a MAO-coated AZ31 magnesium alloy was limited because the corrosion product underwent reduction, but a few strong corrosion products remained without healing.

Post-treatment effect on composition and microstructure of anodized magnesium alloy thin film

In general, the composition, microstructure, and morphology of coatings depend on the process parameters and composition of electrolytes. According to the various post-treatments, different morphologies and microstructures of post-anodized coatings have been obtained. Detailed information regarding various post-treatments and the resulting coating characteristics are presented in Table 1, and the following sections discuss their specific aspects.

LDH post-treatment

Various solutions have been used for the LDH sealing of the anodized thin films formed on magnesium alloys. A simple LDH sealing solution is deionized water. Zhang and coworkers18 prepared a flake-like fine and compact LDH nanosheet on anodized Mg alloy AZ31 using deionized water. Presealing in boiling water led to the formation of Mg(OH)2, which sufficiently affects the growth of LDHs. Figure 2 shows SEM micrographs and the results of EDS analyses of various specimens. The surface morphology of the anodic thin film, mainly comprised of Mg, Al, and O according to the EDS analysis, indicates numerous pores with a diameter of approximately 4 µm. Thus, boiling water sealing did not provide a visible improvement in the morphology of the anodic layer. Nevertheless, a tiny flake-like sheet covered the pores, as observed via high-resolution images. After LDH treatment with presealing, the porosity of the thin film substantially decreased. However, there were still pores in the LDH layer without presealing, even though the pores were covered with a considerable amount of LDHs, as observed in the high-resolution images. Cross-sectional SEM micrographs revealed that after the formation of the LDH layer, the quality of the thin film was clearly improved and the average thickness increased from 1.0 to 1.9 µm. Moreover, a flake-like LDH structure39 was fabricated on Ce-converted MAO-coated magnesium alloy AZ31 via hydrothermal treatment with the assistance of sodium nitrate. In this case, Mg–Al LDHs were primarily used. After growth of the LDHs in the MAO-Ce sample, the density and thickness of the coating were obviously enhanced and became compact. It was reported26 that the different metal cations applied to obtain the films strongly influenced the morphologies of the LDHs. The Mg–Al LDHs were flat, whereas the Mg–Cr LDHs and Mg–Fe LDHs were curly petal-shaped and compact. After the deposition of LDHs on anodized magnesium alloy AZ31, the thickness of the coating increased slightly, and the LDH layer thoroughly sealed the porous layers. According to Zhang et al.,36 when the hydrothermal reaction time for forming an LDH film on anodized AZ31 was increased to 12 h, the nanosheet thickness increased to 3.9 µm, and a smooth and very uniform surface morphology was obtained, as shown in Fig. 3. The LDH layer was mostly composed of Mg–Al LDHs and Mg(OH)2 in the XRD spectrum. It appears that the morphologies of the LDH coatings formed on anodized magnesium alloys are remarkably uniform and smooth.

Fig. 2
figure 2

SEM surface micrographs and EDS analysis of samples. Anodized sample (a) and (b). Anodized sample with boiling water sealing (c) and (d). LDH without presealing (e) and (f). LDH with presealing (g) and (h)19

Fig. 3
figure 3

Cross-sectional SEM micrographs of as-anodized substrate (a) and hydrothermally treated anodized substrate samples for 30 min (b); 1 h (c); 3 h (d); 6 h (e); and 12 h (f)36

Sol–gel post-treatment

Shang and coworkers49 obtained a 5-µm-thick composite coating on anodized magnesium alloy AZ91D via the sol–gel technique. It was noted that the sol–gel layer covered the surface of the anodized thin film entirely, but a few microcracks appeared on the surface of the layer. They assumed that these cracks in the sol–gel layer were related to the large amount of silicon and zirconium and the small amount of carbon and chlorine detected in this layer. It was also reported50 that a titanium oxide sol–gel effectively filled pores on the surface of an anodized Mg-Zn-Ca alloy and produced a tight and compact layer. Chu et al.14 treated the porous structure of an anodized thin film formed on magnesium alloy AZ31B using a zirconium sol–gel sealing layer. After treatment, the sol–gel coating contained several pores, and the size of these pores was larger than that of the pores in anodized thin films. Niu and coworkers51 prepared a 4-μm-thick HA sol–gel coating on anodized magnesium alloy AZ.31 The HA sol–gel coating evenly covered the anodic porous layer. However, small cracks were observed in the surface morphology of the coating, and the authors concluded that the cracks may be related to the thermal stresses between the magnesium alloy and coating. According to the result obtained using the Pro-plus 6.0 software, the proportion of the area of tiny cracks was 7.76% in the HA sol–gel layer formed on the anodized alloy. It was confirmed,48 regarding the HA sol–gel coating on anodized AZ31B, that the coating effectively filled the pores in anodic thin films, as shown in Fig. 4. However, there were cracks on the coating surface. Subsequently, the sol–gel coating thickness of the layer was increased from 3 to 8 µm, and the coating compactness improved. The adhesion between the sol–gel layer and the anodic layer was sufficiently good; however, tiny cracks were observed in the surface morphology.

Fig. 4
figure 4

SEM micrographs of the coating samples. Anodic coating surface (a1). Sol–gel coating surface (b1). Cross section of anodic coating (a2). Cross section of after sol–gel coating (b2)48

Hydrothermal post-treatment

It was reported19 that dense and platy DCPD crystals formed in hydrothermally treated anodized AZ31 alloy owing to the presence of Ca and P and that the sealing treatment reduced the porosity of the anodized thin film. After hydrothermal treatment, the coating was composed of Mg, MgO, MgAl2O4, CaHPO4·2H2O, and β-Ca3(PO4)2 in the XRD spectrum shown in Fig. 5. Yu and coworkers59 fabricated a Ca-P layer and FHAp layer separately on anodized AZ31B by hydrothermal treatment. The Ca-P layer consisted of numerous fibers with various lengths, and a large number of pores appeared between the fibers. The morphology of the coating became more even and dense with the addition of F. The FHAp coating contained closely connected arranged nanorods with diameters of approximately 150 nm. Obviously, the porosity on the anodized thin film is decreased by this compact structure. The Ca-P coating mainly comprised Mg, Ca3(PO4)2 and Ca8H2(PO4)6·5H2O, whereas the FHap coating mostly consisted of Mg and HAp. Moreover, Guo et al.60 prepared a 60-µm-thick bioactive coating on anodized AZ31B using the hydrothermal method. The coating was composed of CaHPO4, Ca3(PO4)2, and HA. Figure 6 shows the surface morphologies of the converted coatings with different time periods. A uniform layer was prepared after 1 h of hydrothermal treatment. Nevertheless, when the processing time was extended to more than 10 h, the integrity of the coating decreased. The porosity of the anodized magnesium alloy was reduced after the hydrothermal sealing, but the bonding of layers seems to be unfavorable.

Fig. 5
figure 5

XRD patterns of anodic coating and after hydrothermal treatment 20

Fig. 6
figure 6

Surface morphologies of hydrothermally treated layer formed on anodized AZ31B alloy at different times. 1 h (a); 3h (b); 5 h (c); 10 h (d)61

Cerium post-treatment

Mohedano and coworkers70 prepared different colored layers on anodized magnesium alloy AM50 via cerium-based sealing treatment. The colors of the layers depended on the presence of Ce-containing products. After post-treatment, the amount of open pores decreased owing to the storage of Ce-containing products in the pores of the anodic layer. Nevertheless, after the treatment, some cracks were detected on the Ce-rich layer, which could be attributed to the dryness of the surface. The XRD spectrum revealed the formation of Mg2SiO4, MgO, CeO2, and Ce2O3, which were observed in the sealed coating. Cerium- and phosphate-based sealings were reported68 on anodized AZ31 alloy. In the cerium-based sealing solution, the pore and crack sizes decreased with expanding sealing time and changed the sample to a yellow color, whereas the phosphate-based sealing solution led to more microcracks with expanding sealing time and did not change the sample colors. In the case of double sealing, first the cerium solution followed by the phosphate solution, the pores and cracks in the anodic thin film were more effectively plugged by the Ce-rich products. Mg, O, and Ce were observed by EDS mapping in the sealed coatings. In addition, a cerium conversion coating67 was layered on anodized AZ31 alloy. After sealing treatment at pH = 3, most of the pores disappeared in the coating. However, several microcracks were observed in the surface. The formation of these cracks was attributed to the released hydrogen and/or the dehydration of the surface layer after treatment. The EDS analysis detected Mg, O, Si, and Ce in the sealed surface. In this case of sealing treatment, the coating thickness was increased to 20 μm and the pores were partially filled with bright colored particles, which are Ce-rich products. Ce-rich products were homogeneously deposited throughout the anodic layer. After treatment, the surface became smoother than the anodized thin film. Nevertheless, some deep pores still appeared on the surface.

Post-treatment effect on corrosion resistance of the anodized magnesium alloy thin film

The recent technological development requires materials with good corrosion resistance for a wide range of applications, from transport to bioengineering. However, the anodized magnesium alloys are still unable to provide satisfactory results because of the high porosity of the anodic layers. Therefore, improved surface treatments are demanded to increase the length of service and decrease the expenses. Post-anodization treatments can be used for improving the corrosion properties and the surface behavior of anodized magnesium alloy coatings. This review article is focused on the improvement in corrosion protection of post-anodization coatings.

Layered double hydroxides

Enhanced corrosion properties of magnesium alloys were mostly achieved by the previously stated four post-anodization methods. For example, the corrosion resistance of anodized thin films substantially increased owing to the LDH sealing treatment.19,26,27,28,29,30,31,32 After the formation of LDHs,18 the corrosion current density (icorr) of anodized magnesium alloy AZ31 decreased from 12.3 to 0.35 µA/cm2, with a sufficient increase in the corrosion potential (Ecorr), up to − 0.29 VSCE. Moreover, the corrosion rate (Pi) of the coating was reduced from 0.28 to 0.01 mm/y. As a result of boiling water presealing, the growth of the LDH layer increased, which provided the best corrosion resistance, according to the results of potentiodynamic electrochemical tests. After 366 h of immersion in a 3.5 wt% NaCl solution, there were minor changes on the surface of the LDH layer owing to the strong sealing effect of the dense LDHs. A cerium-deposited LDH layer modified by phytic acid (PA)39 on anodized AZ31 alloy exhibited strong self-healing performance and a superior corrosion resistance of 4.22 × 107 Ω cm2. The corrosion resistance of the coating was increased with respect to the anodic coating by two orders of magnitude. The corrosion current density was greatly reduced, from 2.31 to 0.05 µA/cm2; it was substantially lower than that of the anodic layer. The corrosion potential considerably shifted from − 0.46 to − 0.13 VSCE after the formation of the LDH layer. Besides, the self-healing effect was reported in this case. The evaluation of the self-healing ability, shown in Fig. 7, revealed that the scratches on the LDH layer were considerably healed after 24 h of immersion in 3.5 wt% NaCl, with the previously mentioned inhibition action. After further immersion for 21 days (Fig. 8), the corrosion resistance of the LDH coating increased, which indicates an outstanding self-healing ability with regard to the damages created by the corrosion activity. In contrast, the MAO coating showed a strong corrosion activity. It was noted36 that increasing the immersion time for the formation of an LDH layer on anodized AZ31 alloy up to 12 h effectively increased the corrosion resistance. The corrosion rate was reduced from 0.19 to 0.02 mm/y. It was remarkable that the 1 h treated sample showed the higher impedance value, and the 12 h treated sample exhibited the best corrosion resistance property. The above-stated studies proved that LDH layers can substantially increase the corrosion resistance of anodized thin films and provide an optimal self-healing performance.

Fig. 7
figure 7

Microphotographs after 24 h immersion in 3.5% NaCl solution for MAO (a, A); MAO-Ce (b, B); MAO-Ce-LDH (c, C); MAO-Ce-LDH-P (d, D)39

Fig. 8
figure 8

XRD patterns and photographs of the various samples after 21-day immersion in 3.5% NaCl solution 39

Sol–gel method

It was determined49 that after the post-treatment of anodized magnesium alloy AZ91D, the corrosion potential significantly increased (from − 1.326 to − 0.406 V) with the assistance of the SiO2 and ZrO2 composite sol–gel. Besides, the corrosion current density of the coating was reduced by two orders of magnitude, whereas the corrosion resistance increased from 7.717 × 103 Ω to 4.232 × 106 Ω. Nevertheless, after a 120-h immersion test in a 3.5 wt% NaCl solution, some corrosion products appeared on the surface of the composite coating. Zhang and coworkers50 investigated the influence of a TiO2 coating on the corrosion resistance of anodized Mg-Zn-Ca alloys. After the TiO2 coating was applied, the corrosion current density obtained from Tafel curves decreased from 1.12 to 0.548 µA/cm2. In another study,14 a ZrO2 sol–gel coating was used as a post-treatment on anodized magnesium alloy AZ31B. The corrosion potential of the coating increased from − 1.39 to − 1.19 V, whereas the corrosion current density was reduced from 33 to 2.4 µA/cm2. However, after immersion in simulated intestinal fluid (SIF) for 28 days, substantial corrosion damage occurred in the sol–gel coating. The authors of a previous study48 reported the results of a PDP test on a sol–gel coating formed on anodized AZ31B alloy, as shown in Fig. 9. The corrosion current density of the sol–gel-coated sample was 1.25 × 10−3 µA/cm2 after 1 h of immersion in simulated body fluid (SBF). However, it was increased when the immersion time period increased. In addition, the sol–gel-coated sample revealed the best corrosion resistance performance owing to the composite coating, with strong adhesion strength and smooth surface. According to these results, the sol–gel post-treatment on anodized magnesium alloys may improve the short-term corrosion resistance of the anodic coatings.

Fig. 9
figure 9

Potentiodynamic polarization curves of the samples in SBF 48

Hydrothermal treatment

A slight corrosion resistance improvement was observed in anodized AZ31 after hydrothermal treatment in Hank’s solution.20 The corrosion current density decreased slightly, from 1.43 to 1.19 µA/cm2, whereas the corrosion potential positively shifted. Nevertheless, the hydrothermal treatment had a significant effect on the pitting corrosion resistance of the anodized thin film on a magnesium alloy. Yu and coworkers59 prepared an FHAp layer on anodized AZ31B via hydrothermal treatment. The corrosion resistance of this layer was enhanced with a decreasing corrosion current density, from 10.6 to 0.387 µA/cm2, and an increasing corrosion potential, from − 1.73 to − 1.51 V/SCE. After immersion for 22 days in SBF, the original integrity of the FHAp composite coating still remained, without any corrosion activity, whereas the uncoated substrate corroded after immersion for 3 days, as shown in Fig. 10. Yao et al.61 obtained a bioactive composite coating with enhanced corrosion performance using hydrothermal sealing on anodized magnesium alloy AZ31B. The corrosion current density was reduced by one order of magnitude, from 11.59 to 4.780 µA/cm2, and the corrosion potential was significantly increased from − 1.23 to − 0.92 V in the resulting coating. It is believed that the simple hydrothermal treatment slightly improves the corrosion resistance of the anodized magnesium alloy, and the hydrothermally grown composite layer remarkably enhances the corrosion resistance of this alloy.

Fig. 10
figure 10

pH variation of AZ31B bare alloy and FHAp3/MAO-coated sample immersed in SBF solution for different periods 59

Cerium-based sealing treatment

According to Mohedano et al.,70 the corrosion properties of anodized magnesium alloy AM50 were enhanced with cerium-based sealing treatment. The values of total corrosion resistance increased approximately from 100 to 1300 kΩ cm2 owing to post-sealing treatment. The authors believed that the enhancement in corrosion resistance might be related to the active action of Ce species in the coatings, except the sealing of the porous layer on the surface. Cerium and phosphate-based post-treatments were reported68 in anodized AZ31 magnesium alloy. The corrosion current density was reduced with various sealing process times in the cerium and phosphate solutions. However, the corrosion potential shifted negatively. Figure 11 shows the appearance of the specimens after the corrosion test. The ideal combination of cerium and phosphate-based sealing times could sufficiently increase the corrosion resistance of anodized AZ31 alloy without any visible corrosion activity after a long period of immersion in a 0.5 M sodium chloride solution. The optimized sealing times of the cerium and phosphate solutions were 20 and 20 min, respectively. A cerium conversion composite coating67 was fabricated on anodized AZ31. After the deposition of cerium, the corrosion current density decreased from 0.15 to 0.02 μA/cm2, whereas the corrosion potential gradually increased from − 1.50 to − 1.43 V, according to the potentiodynamic test and EIS analysis. From the above-mentioned studies, the cerium-based sealing method may not be able to provide a noticeable improvement in the corrosion potential of anodized thin films.

Fig. 11
figure 11

Microphotographs after potentiodynamic polarization tests of MAO coating on AZ31 with double sealing treatments, first for different times in the cerium solution followed by 20 min in the phosphate solution 68

The average corrosion resistance, corrosion current density, and corrosion potential of various post-anodization coatings are shown in Fig. 12. Among the compared methods, the LDH method showed the best corrosion properties, such as high corrosion resistance, low corrosion current density, and the highest positive corrosion potential. A negative corrosion potential was revealed by the cerium-based treatment. However, a low corrosion current density was indicated in the coating. In other words, the corrosion resistance of the compared post-anodization coatings is in the order of LDHs > sol–gel >  cerium >  hydrothermal.

Fig. 12
figure 12

Comparison of corrosion properties of post-anodization methods. Average corrosion current density (icorr) (A), average corrosion potential (Ecorr) (B), average corrosion resistance (Rp) (C)

Conclusions

In summary, post-anodization methods are an effective approach to reduce porosity in the anodic layers because they seal the pores completely. Hence, the resulting compact and dense layers substantially improved the corrosion resistance of the anodized magnesium alloys. It was found that the morphology of the coatings varied with different post-anodization methods. The most uniform and compact layers were obtained by the LDH method when compared with the sol–gel, hydrothermal, and cerium-based methods. In addition, among the compared post-anodization methods, LDHs exhibited a substantial self-healing effect, whereas slight self-healing activity was observed regarding the cerium-based sealing method. It is worth mentioning that the self-healing ability during the corrosion process plays an important role in the healing of the corrosion damages in the coatings. Thus, anodized magnesium alloys sealed using the LDH method can offer the most prolonged protection against corrosion. Based on potentiodynamic tests and EIS comparative analyses of post-anodization methods, the current research results revealed that the lowest average corrosion current densities were observed in LDH and cerium-based coatings, and the highest positive corrosion potentials were reported in the LDH and sol–gel post-anodization coatings.