1 Introduction

Magnesium (Mg) and magnesium alloys are lightest metal in the alkaline earth group 2. It is a silvery-white metal; the term “magnesium” is derived from magnesia, which Sir Humphry Davy used in his experiment. Magnesia is a district of Thessaly (Greece) where Magnesium Alba was found [1]. The eighth most profuse element in the Earth's crust is magnesium and third most commonly used structural element after iron and aluminium. In fact, ocean water contains 0.13% of magnesium, which as dissolved chloride transmits its characteristic of sour taste. The lightest material of all elements (i.e. Magnesium) has the density of 1.74 g/cm3, two-third the density of aluminium and one-fifth of iron. Because of their light weight, magnesium and its alloys have good prospect in automotive, aviation, and electro-chemical applications. Magnesium alloys have a lower density, a high stiffness, and good physical characteristics. Nevertheless, their application is restricted due to their low resistance to corrosion and poor wear characteristics [2,3,4,5]. It is the easiest structural element to machine because pure Mg has low structural strength, high temperature creep and also highly flammable. Magnesium are alloyed with various percent of elements like aluminium, zinc—to improve precipitation hardening, addition of scandium & gadolinium—for the elimination of creep at high temperature, addition of calcium—reduction in flammability and manganese to improve corrosion resistance [6]. Magnesium alloying improves the hardness, tensile strength, good high temperature mechanical properties, ability to cast, weld and machine. These alloys are used in applications of automobiles, aerospace, electronics and biomedical due to its greater ability to resist impact loading, higher fatigue resistance, lower density, manufacturability (casting due to higher thermal conductivity) and machinability. In terms of research & development automobile industries have made most of the findings according to its applications. In fact Volkswagen was the first auto manufacturer to introduce magnesium in its car and Porsche was the first to work on magnesium engine [7]. The use of Mg in medicine, marine, electronics and construction fields has increased everyday due to its many attractive properties. Likewise in medical fields these alloys are used due to their similar densities with human bone (1.75 g/cm3)and also developed to be biodegradable [8]. Magnesium powders are highly flammable which is used in fireworks and can be explosive hazardous. Burning of magnesium ribbon or powder produces ultraviolet light which causes permanent damage to human naked eye.

For the function of many enzymes, its dependable on magnesium. In the human body cells about one-sixth as many as potassium equal to magnesium is required as a catalyst in carbohydrate metabolism for enzyme reactions. In planets, the green pigment called chlorophyll is found to contain magnesium along with the nitrogen ring structure which plays a vital role in photosynthesis process which enables light energy to function the conversion of carbon dioxide & water to oxygen & carbohydrates. Most commonly used magnesium cast alloy is AZ91D which has high purity, tremendous corrosion resistance & castability with good strength [9]. Its mechanical properties consist of tensile strength—230 MPa, Impact strength—3 J, hardness—63HB, elongation—3% in 50 mm [10]. Applications for this alloy are used in automobile components like drive brackets, oil pan, steering column, crankcase, transmission case, used in computer parts, also used in aerospace components like Cast Helicopter Transmission Housings and passenger’s seat frame [11]. In vitro biological degradation in PE electrodeposition revealed that the corrosive environment current of the AZ91 alloy reduced by 50% since surface treatment with the fibres chitosan. The addition of MOF particulate lowered the corrosion current by an additional 65% [12,13,14]. The corrosion performance of a 3.5% NaCl solution was evaluated using an expedited electrochemistry potentiodynamic polarity technique and salt spray exposure. An non-coated AZ91D alloy was also tested in parallel [15,16,17]. Although magnesium is the lightest materials for various applications than aluminium it has low corrosion resistance capacity in aqueous and high humidity atmosphere medium. Magnesium can easily be oxidised, with oxide film formation, which is porous and unprotective. Likewise, as the temperature increases the corrosion resistant decreases in water, as the temperature above 100 °C is severe [18,19,20,21]. The annual consumption of aluminium alloys are 50 million tonnes, whereas the consumption of magnesium alloys is less than (Al alloys) one million tonnes per year. This is due to their limitation to corrode, low creep resistance at high temperature and combust [22,23,24]. These limitations are increased by alloying with various element like iron, copper, cobalt and nickel for the corrosion resistance [25, 26]. Mg–Al alloys surface film enhanced in Al2O3 raises the solidity and the corrosive resistance of the reflexive film. Magnesium alloys' corrosive reaction in an atmospheric environment requires a distinct methodology than alloys that occur in solutions [27]. The corrosion of Mg alloys in an atmosphere is influenced by impurities found in alloys such as Ni, Cu, and Fe [28]. It has been widely reported that there is an impact on microstructure on the corrosive resistance of Mg alloys. Especially, the act of phase in corrosion is largely addressed for AZ91, its generally endorsed that the phase is a corrosion barrier and existence in an AZ alloys is beneficial for the corrosion resistance of the alloy Alloying components and impurity in Mg alloys must be managed according with endurance limit in terms of protection against corrosion [29,30,31,32]. The breaking of the film, and the formation of miniscule cracks on the surface with the exposure of bare matric to the solution to speed up the corrosive response, is a critical act in the propagation of corrosion. Corrosion types are like galvanic, localized corrosion, pitting, erosion, exfoliation, crevice, stress corrosion cracking, intergranular, among these specifically pitting corrosion is the most occurring form in Mg alloys. In neutral/alkaline NaCl solution, almost these are the theories been carried out.

2 Hydrophobic Processes

The term hydrophobic is originated from the Greek origins hydro, which implies "water," and phobia, which means "fearing/hating." Metals through their nature physically draws water due to electromagnetic attraction, also absorbs oil, soot through pores and microscopic fissures on the surface. That’s the reason metallic products may shine when its new, but it even quickly tarnishes, showing some smudges & booms and even rusts by exposure to air or hands and fingers comes in contact with it. The SHP surface should have considerable water repelling characteristic of water contact angle greater than 150° and a sliding angle (SA) lesser than 10°. The formation of SHP surface can be accomplished through a combination of microstructure or nanostructures and modification of a material surface with lower energy.

3 Experimental Procedure

Table 1 confirming the chemical compositions of AZ91 magnesium alloy which contains the principal alloying elements of aluminium (Al)—9.718%, zinc (Zn)—0.913%, manganese (Mn)—0.132%, was cut into dimensions of 20 mm × 20 mm. First the Mg alloy samples had a mechanical polish by using SiC sandpaper of a successively finer roughness (1/0, 2/0, 3/0, 4/0, 5/0 grade), and then ultrasonically bathe in acetone and absolute ethanol for10 minutes respectively. After that, samples were dried in the air at the room temperature. The specimens were cleaned ultrasonically after hydrothermal treatment for 20 min after reaching 160 °C.

Table 1 AZ91D magnesium alloy chemical compositions

3.1 Formation of SHP Layer

3.1.1 Formation of a Hydrophobic Surface

Figure 1 explains the methodology for hydrothermal treatment. The cleaned AZ91 sample was placed in a 50 mL Teflon-lined autoclave filled with de-ionized water to 70% to 80% of the autoclave capacity. The autoclave was kept in a hot oven set of 160 °C for a variety of times ranging from 2 to 5 h (generally, hydrothermal time begins 20 min after achieving the temperature of 160 °C), and then transferred to cool naturally at room temperature. The timing of the treatment is specified in the samples obtained, for example: the sample H3 was hydrothermally treated for 3 h at 160 °C. Following that, the sample was ultrasonic assisted cleaned in absolute ethanol for 10 min before being air dried. Finally, the samples were immersed in an n-hexane solution containing various concentrations of stearic acid (STA) and di cyclohexyl carbodiimide (DCC) (2 mmol/L) for surface conversion at room temperature. Just after the immersion, the modified samples were washed with n-hexane and absolute ethanol and left to dry, as shown in Fig. 2. Microscopy at 10–15 kV can be used to examine the surface and cross-section of the occupied coatings. The crystal stage of the obtained film can be characterised using an X-ray diffractometer with a scanning rate of 2 = 4°/min and a temperature range of 5°–90°. Using a smart phone, the water droplets in a coated alloy were captured and the water contact angle was measured using Image J software. Immersion tests can be carried out in NaCl solutions (3.5 wt%) and whereas corrosion resistance test can be determined by electrochemical measurements. Corrosion tests were carried out using a computer-controlled potentiostat, with electrochemical measurements acquired at room temperature using a typical three-electrode electrochemical cell. The samples served as the working electrode, while the reference and counter electrodes were an Ag/AgCl (saturated KCl) and a platinum sheet, respectively. In the immersion test, each sample was immersed in the NaCl solution for 30 min to stabilise it before recording potentiodynamic polarisation curves at room temperature with a sweep scanning rate of 2 mV/s. Using the application CorrView to establish the fitting parameters, the Icorr and Ecorr may be calculated from the experiment potentiodynamic curves. The samples are immersed in 3.5 wt% NaCl solutions at room temperature for 10 days to determine corrosion resistance durability. The water contact angle (CA) and slide angle (SA) were measured using 10 L water droplets and a measurement device (SAMSUNG smart phone). A Hitachi scanning electron microscope (SEM) was used to determine microstructural characterisation at NIT Trichy in Tamil Nadu, India. The surfaces were also examined using an X-ray diffractometer (XRD: SHIMADZU LabX XRD-6100) and a pH metre to determine the pH of the corrosion solution. Inductively Coupled Plasma Atomic Emission Spectrometry was used to determine the Mg element content in corrosive solution (ICP-AES: ARCOS, Simultaneous ICP Spectrometer). Optical microscopy was used to get the corrosive morphologies (Olympus Microscopy Europa, CX43). A smart phone was used to capture the digital photographs in the delay-icing, self-cleaning, and adhesion test studies.

Fig. 1
figure 1

Methodology for hydrothermal treatment

Fig. 2
figure 2

Schematic diagram of Formation of SHP layer

4 Results and Discussion

4.1 Hydrothermal Treatment Processes

The pre-treated AZ91 alloy were used for hydrothermal treatment to heat the sample about 160 °C for 2 h in a 50 mL Teflon lined autoclave filled with de-ionized water and then air-cooled to room temperature naturally. The heated magnesium alloy had formed a corroded layer at its surface and it wasn’t removed even by cleaning which is shown in Fig. 3a.

Fig. 3
figure 3

a After hydrothermal treatment, b after soaked in STA dissolved n-hexane solution

4.1.1 Hydrophobic Treatment

The hydrothermally treated alloy was soaked in stearic acid (STA) dissolved n-hexane solution for 2 h. Figure 3b shows the sample after 2 h of hydrophobic treatment and the oxide layer formed. After the sample were taken out of the immersion, as soon the sample gets reacted to the atmosphere air and forms a white oxide layer. Moreover, the test was conducted for SHP formation; the water formed a greater water contact angle (WCA) than a normal magnesium alloy without any hydrothermal treatment & hydrophobic treatment. Figure 4a shows the comparison between those two of water droplet test.

Fig. 4
figure 4

a Correlation between naked Mg alloy & hydrophobically treated Mg alloy, b correlation between naked Mg alloy and only hydrophobically treated alloy (without hydrothermal treatment), c correlation of the three samples

In order to avoid the corrosion of Mg alloy, another sample was taken for hydrophobic treatment without the hydrothermal treatment process. These samples showed a little increase in water contact angle as shown in Fig. 4b than the naked Mg alloy. Since the second sample didn’t show much greater Water Contact Angle (WCA) than the first sample which is hydrothermally treated and hydrophobically treated. This only hydrophobically treated is not having a formation of SHP because the WCA is lesser. Figure 4c shows the comparison of the three samples. The formation of white oxide layer should be tested by XRD and SEM to know the chemicals been reacted. Further research should be taken to improve the water contact angle and to overcome the corrosion of Mg alloy.

4.2 SHP Surface Characteristics and Features

The microstructure analysis of the magnesium alloy after SCE is represented in Fig. 5a. The phase has greater chemical activity and is favourably dissolved while the it raises on the surface. While undergoing etching process some of the phases has been broke off, due to this reason there is an appearance of cracks on surface. By using the high activity of Mg alloy, metallic zinc was formed from the reduced form of Zn2+, by magnesium and deposited on the alloy surface. After deposition obtained comparing with Fig. 5a, b represents, the surface roughness (SR) has a notable increase. Figure 6a shows the X-ray diffraction arrangements of the untreated magnesium alloy substrate. The Mg alloy consist of Mg (α-phase) and Mg12Al17 (β-phase) which can be viewed from the graphs. After Zn deposition, three new peaks can be raised at 39°, 43° and 54°, that declares the presence of metallic zinc. The SEM analysis on Fig. 5b approves there is a formation of α-phase and β-phase on the surface. Predominately the measure of β phase is adequately greater than that on modified alloy. As a result, its fact that the β phase would considerably deposit on phase. Variation in speed of Zn deposition leads to the development of SR and establishes the source for conceiving the ordered structure. After the modification, Fig. 5c confess the structure of the surface. After deposition, unusual peaks have been appeared in XRD analysis (Fig. 6).

Fig. 5
figure 5

SEM illustration of the Mg alloy after a selective etching (120 s); b Zn deposition (300 s); c modification; d CA; e SA tests

Fig. 6
figure 6

a XRD arrangement of the naked AZ91D and post deposition

4.3 Effect of Deposition Time on the Hydrophobicity

To attain a rough structure on magnesium alloy (AZ91D) the deposition is essential. The methodology shows the mechanism of deposition on AZ91D magnesium alloy. On par Comparison with the result of prime stage, the movement of chemical in phase is larger than the phase in the alkaline.

By changing the deposition time from 140 to 500 s the consequence of deposition time on the structure was analysed, and the etching time was controlled as 110 s. Figure 7a–c shows the etched substrates deposited with different timing. As the time increases from 150 to 650 s it could be effortlessly viewed that the Mg17Al12 are instantly growing on the surface. There was no notable difference in the measure of Mg17Al12 with Fig. 7b along with the time increasing to 650 s in (Fig. 7c). This was achievable due to the magnesium alloy being completely hidden by Mg17Al12 at 450 s, and thus being unable to donate electrons to decrease Zn2+. Varied amounts of zinc on the Mg alloy surface straight things in various contours and hydrophobicities following alteration. From Fig. 7d–f, it can be seen that as the Mg17Al12 concentration rises, the SR rises, changing the surface's hydrophobicity.

Fig. 7
figure 7

Microstructure illustration of etched substrate with different deposition times: a 140 s; b 500 s; c 650 s consequent modification and CA tests respectively

The SR becomes enormous post alteration as the volume of Mg17Al12 increases. According to the Cassie–Baxter equation:

$$\mathrm{cos}\alpha = {g}_{f1\left(\mathrm{cos}{\alpha }_{0}+1\right)}-1$$
(1)

where gf1 denotes the fractional solid/water interface regions on the surface and α denotes the WCA on rough and plane surfaces, respectively. The α0 of various surface alteration conditions was hardly unchangeable, thus when a smooth surface becomes rough, the gf1 drops, causing the CA to rise. If the SR keeps increasing those forces despite the drop in CA, the gfl will rise. This could explain why the CA and deposition time are related. The correlation among hydrophobicity and SCE duration was explored in this work, and we discovered that the SCE time had a significant impact on surface hydrophobicity. Surface contours with varying etching times are depicted in Fig. 7a–c. With the addition of etching time, the diameters of phase on the surface grow, resulting in higher Zn deposits on the phase (Fig. 7d–f). This is owing to the variation in high reactivity between phases. It can be seen from Fig. 7g–i that increasing the amount of Zn contribute to the formation of SR. The ultimate structure and hydrophobicity change depending on the deposition method. A microstructure that is either too small or too large is no longer conducive to super hydrophobicity. The increase in SR is due to an increase in Zn, which has been coated with zinc stearate on the surface. As a result, the CA of the material increases initially, but subsequently falls as the sequence progresses. When the etching period is 120 s, the CA achieves its highest value. It might also utilise Eq. (1) to justify the CA adjustments (Fig. 8).

Fig. 8
figure 8

Macro portrait of the specimen and SHP material post immersion in 3.5 wt% of NaCl solution for diverse times

4.4 Functions of SHP Surface

4.4.1 Anti-corrosion Effect

One of the most desirable characteristics of magnesium alloy is its resistance to corrosion. To test the anti-corrosion effect of the SHP surface on the magnesium alloy, the SHP material is submerged in a typically corrosive solution of 3.5 wt% NaCl solution that is added to the corrosion area.

Figure 9 depicts the microstructure of the surface and SHP sample after being submerged in a corrosive solution medium of 3.5 wt% NaCl at room temperature for various times. The corrosion on the substrate is visible after 3 h of immersion in the sample. As the immersion time is increased, the corrosion begins to improve. The material is severely blemished after soaking for about 24 h. Associated with the material, the SHP specimen has not changed after being submerged for 3 to 12 h. And, after 24 h, there were fewer signs of corrosion on the sample's surface. These results demonstrate that the SHP surface has a significant anti-corrosion effect on the material of investigation. To further demonstrate that the SHP surface could decrease the deterioration count. Then, in a subsequent step, the pH value and Mg element concentration in the NaCl solutions were examined. The corrosion reaction could have occurred as a result of one of the following reactions [5]:

$$2{\text{Mg}} \to 2{\text{Mg}}^{ + } + 2{\text{e}}^{ - }$$
(2)
$$2{\text{Mg}}^{ + } + 2{\text{H}}_{2} {\text{O}} \to 2{\text{Mg}}^{2 + } + 2{\text{OH}}^{ - } + {\text{H}}_{2}$$
(3)
$$2{\text{H}}_{2} {\text{O}} + 2{\text{e}}^{ - } \to {\text{H}}2 + 2{\text{OH}}^{ - }$$
(4)
$$2{\text{Mg}}^{2 + } + 4{\text{OH}}^{ - } \to 2{\text{Mg}}\left( {{\text{OH}}} \right)_{2}$$
(5)
$${\text{MgO}} + {\text{H}}_{2} {\text{O}} \leftrightarrow {\text{Mg}}\left( {{\text{OH}}} \right)_{2}$$
(6)
Fig. 9
figure 9

SEM portrait of the specimen and SHP material post immersion in 3.5 wt% of NaCl solution for diverse times

As a result, the corrosion rate could be observed for varying pH values and Mg element concentrations in the corrosive solution. The pH value and Mg element concentration in the 3.5% NaCl solution after the substrate and SHP sample were soaked in it are shown in Fig. 10. It confirms that the substrate has a significant change in pH value when compared to the SHP sample (Fig. 11).

Fig. 10
figure 10

pH vs. immersion time of bare substrate and SHP specimen kept immersed below 3.5% wt of NaCl solution

Fig. 11
figure 11

Corrosion morphologies of the bare magnesium alloy and SHP sample exposed in natural environment for a and d, 0 h; b and e, 48 h; c and f, 96 h respectively

CO2 interacted with the OH inside the solution, which resulted in a reduction in pH after 24 h. ICP-AES was used to determine the Mg element concentration in the NaCl solution. It is visible and directly proportional to the increase in Mg concentration in the substrate solution with increasing time of exposure in the substrate solution, with the concentration reaching roughly 6.5 g/mL after 24 h. The concentration of Mg element and its growing speed are substantially lower than the substrate when compared to SHP sample solution. The change in pH value and Mg element concentration show that the SHP sample has a substantially lower corrosion rate than the substrate, indicating that the SHP surface can sufficiently shield the material from corrosion.

4.5 Self-cleaning Effect

The self-cleaning effect of the SHP surface is very important. Figure 8 depicts a comparison of the hydrophilic surface and the SHP surface. The process is almost the same as our previous study, but the water droplet in this study was 10 L and the falling height is fixed to be 10 mm. The samples were coated with carbon powder with different particle sizes, and the quantities of dust was approximately 10 mg cm2. In this paper, the samples were titled not only to 45°, but also to 10° & 0° in order to explore the various application environments. The SHP covering only takes 40 droplets to eliminate the most of dust when the specimen is rotated to 45 degrees. After a rinse with 80 droplets, however, the surface is nearly identical to the un-dusted surface. When a water droplet falls on the hydrophilic substrate, as opposed to the SHP surface, the water immediately penetrates through all the carbon powder and wets the surface, with the carbon powder still covering the hydrophilic surface and 400 water droplets have indeed been is used to clean the surface. Similar patterns can be found in the other two cases. As the slanted angle decreases, the SHP surface requires more water to wash itself. Water drops on the SHP surface causing the droplets to slide down and absorb the dust to the layer. Finally, the impurities would be splashed away from the specimen surface by the moving of the droplets of water. When the specimen was shifted at 10° or 0°, it might be seen that the droplets of water remain on the layer owing to the chunk of dirt. The droplets ran down much more forcefully at 45°, which explains the reason behind SHP sample inclination at a smaller angle requires excess water for cleaning its surface than that inclined at a higher angle.

Figure 12 depicts the impedance spectrum in the context of Bode diagrams (phase angle vs. frequency), which was attained during 10 h immersions immersion at Ecorr. The low and medium frequency spectra spectral loops identify the framework scaffolding within the film and at the metal-film interface, while the high frequency spectra spectral loop recognises identifies regional imperfections. With the increase in quality of a surface film, the aperture of the phase angles elevated. Figure 12b shows that the SHP sample has a significant enhancement in surface film formation. These findings indicate that Mg17Al12 forms a passive film in the material of investigation. As the α-Mg grains erode, the precipitates will be at the upper part and begin to disintegrate, as shown in the pitting initiation. As a result, the total number of atoms on the surface increases, speeding up the building of a protective covering. The electrochemical principle and the breakdown of the passive film are highlighted in this data.

Fig. 12
figure 12

a Bode plots of bare Mg alloy and SHP sample, b EIS plots of bare Mg alloy and SHP sample exposed

5 Conclusion

In summary, it has been reported that the corrosion resistance and chemical activity inhomogeneous on AZ91D magnesium alloy surface where the later has been eliminated through this work. The corrosion resistance of SHP surface on Mg alloys was studied under 3.5% of NaCl solution. The results were confirmed the WCA was higher than 150° and SA was lesser than 10°. Hence it possess good water-repelling characteristic in AZ91D Mg alloy. The corrosion results show that the as-processed SHP coated surface has a significant anti-corrosion effect in corrosive medium. The presented method is simple, cost-effective, and ecologically friendly, and it has great promise value in major industry manufacturing.