Introduction

Due to magnesium's low density of 1.74 g per cubic centimeter, it has great machinability and thermal conductivity. As a result, magnesium is an essential component of human health and well-being (Witte et al. 2008; Zheng et al. 2014). By comparing magnesium alloys with other metals, it has been observed that there are many differences. The first phase is formed when magnesium is mixed with most other metals, and its stability increases with the increase in the electrical capacity of other metals (Zhao et al. 2017). Attributable to its biodegradability, non-toxicity, low density, good mechanical characteristics, and outstanding mechanical and physical features, Mg and its composites are developing appealing options for materials of the biomedical implant. Because of their exceptional mechanical properties, low density, and specific biodegradation characteristics, biodegradable magnesium alloys have gotten a lot of interest for application in orthopedic implants. Mg alloys' rapid corrosion and poor antibacterial properties, equally, limit their use in implant applications.

The rapid rate of magnesium corrosion and similar alloys in the humanoid body, equally, would bring about a loss of mechanical integrity before considerable bone rebuilding could occur. Based on the surface coating techniques, they have been a research emphasis on increasing the resistance of corrosion for Mg-based implantations since it is an effective, quick, and low-cost approach. Even though the actual bodily fluids may have values of pH that range from 6 to 8, the SBF's chemical composition indicates that it has a pH value of roughly 7. Both Zn and Mg corrode more quickly in acidic environments (Hanas et al. 2019). SBF was converted into pH 6 and 8 solutions by adding small amounts of HCl or NaOH. For these reasons, rates of corrosion were also evaluated in those solutions. The rate of Mg corrosion was shown to be strongly dependent on the content of the electrolyte in various media. Nevertheless, that investigation was primarily concerned with the electrolyte's local pH near the deteriorating Mg.

Several separate electrolytes were created to clarify the specific impact of each component on the Mg corrosion rate in this study. Hydrogen evolution and immersion experiments, monitoring of local and bulk pH values, and EIS were employed to survey the consequences of various pH levels and their combinations on Mg corrosion. Approaching the human skeleton by simulations in conditions of elastic modulus and compressive yield strength, and so on. However, because Mg has an active chemical property (the typical electrode potential is –2.36 V), the formed oxide layer on its surface in corrosive fluids is porous and cannot provide enough protection to the environment, which is exacerbated in a physical environment rich in Cl. Bone has the same density (1.75 g/cm3) as synthetic collagen (1.74 g/cm3). As a result, it is appropriate for use as biological implant material. Mg and its alloys are broadly suggested for improving biodegradability. Aluminum has already become the most important alloying component for increasing tensile strength by generating the intermetallic phase Mg17Al12. A similar effect may be achieved using the minerals zinc and manganese. Magnesium alloys established on the AZ-based Mg system are the highest popular (Hanas et al. 2019).

These alloys, AZ91, have the best mechanical properties. Automotive parts, laptop computers, smartphones, and other things contain the substance. Despite this, many Mg and its alloys are extremely receptive to general and localized (pitting) corrosion, which severely limits their broad use (Hanas et al. 2019; Li and Zheng 2013; Sanchez et al. 2015; Amal et al., 2022a, 2; Abbas et al. 2019). Corrosion research on Mg and its alloys is an intriguing field of study that might lead to the improvement in these materials' potential usage in a wide range of technological and artistic applications. Overall, magnesium's stability is significantly smaller than a water molecule. Therefore, Mg and its alloys are becoming attractive alternatives for biomedical implant materials because of their biodegradability and nontoxicity (Bakhsheshi-Rad et al. 2019; Gu et al. 2012; Jiang et al. 2018; Staiger et al. 2006).

So, excessive amounts of magnesium that people consume every day benefit from increased bone density and strength. Metallic or polymer implants cannot compare to Mg/Mg alloys for bone replacement applications. Since Mg's mechanical and physical features are like those of bone, no extra surgery is necessary after healing the bone mass. However, Mg's rapid rate of corrosion in the fluid of the human body is a disadvantage as a possible bone transplant material (El-Bindary et al. 2021; Elshafie and Ashraf 2022; El-Shamy and Abdel Bar 2021; Elsayed et al. 2022a; Elsayed et al. 2022b).

The evolution of corrosion causes a deterioration in the mechanical and physical qualities of magnesium (Xu et al. 2009; Gopi et al. 2015; Yu et al. 2016). Too rapidly degrading implants may fail in stressful situations. An assortment of procedures must be employed to verify how quickly magnesium/magnesium alloys corrode before they are implanted, including DI water, simulated body fluid, PBS, and cell culture medium. Moreover, in the case of immersion of Mg in an acidic medium, hydrogen evolution, and electrochemical tests, the corrosion behavior of the metals was assessed (Hakimi et al. 2015; Yamamoto and Hiromoto 2009).

Alloys of magnesium, which may be biodegradable, have both properties of acceptable mechanical and biocompatibility (Sun et al. 2011; El-Shamy et al. 2020a, 2020b; El-Shamy et al., 2020c; El-Sayed et al., 2014; El-Sayed et al., 2015). An abundant source of Mg2+ is observed in the body fluid of humans. It is beneficial to the bone system if Mg is present. It is established that the bone of humans has a specific density of 1.74–2 g/cm3, and based on Young's modulus of 41–45 GPa, Mg and its alloys are the closest to the specific density. Because of this, magnesium alloys outperform any other metallic or polymer implant in the mechanical and physical characteristics, as the variance in Young's modulus between an implant and natural human bone can source impacts of stress shielding, resulting in stress concentration at the argument where the bone meets the implant, lowering new bone growth rate (Sun et al. 2011; Megahed et al. 2020, 2021). Recently, a huge number of studies have been performed on the behavior of Mg alloy corrosion in artificial physiological fluids. They were considering an Al–Mg alloy, though (Heublein et al. 2003; Reda et al. 2018, 2020a, 2020b, 2021, 2022a, 2022b; Shehata et al. 2020).

In the human body, most of the alloying components dissolve during the degradation of magnesium alloys. Due to excessively high corrosion rates, magnesium alloys did not function well (Zartner et al. 2005; Samar et al. 2022). Based on the excessive impurities in these magnesium alloys, the screws and plates corroded too fast, resulting in subcutaneous gas cavities in treated individuals. Magnesium alloys require slower corrosion rates to be viable as a possible biomaterial (Witte et al. 2005). It was decided to employ Mn and Zn because of their excellent biocompatibility to produce a magnesium alloy including Mg, Zn, and Mn for biomedical purposes (Frank et al. 2006).

Magnesium may not be the ideal biomaterial, but a balance has been struck between its strengths and shortcomings that have made it possible for it to be used in a variety of medicinal applications. In the present day, applications involving the musculoskeletal system and orthopedics make extensive use of magnesium and its alloys. In addition to this, it is researched intensively for applications related to the cardiovascular system, and it is also used in general and oral applications. Applications related to the musculoskeletal system and orthopedics will be the primary emphasis of this section. In addition, we will spend some time discussing the current condition of magnesium and the alloys of magnesium used in cardiovascular applications (Chakraborty et al. 2019).

The standard by which modern bone restoration materials are measured is autografting. Because it includes the required nutrients, it may encourage the development of new bone. Despite this, there is a limited supply of the necessary resources, and more operations are necessary to remove the implant when the affected bodily functions have been repaired. In addition to the problem of stress shielding, one of the challenges that bio-inert metallic implants must contend with is the need for further surgical procedures (Riaz et al. 2019). As a result of this, the medical community has been aggressively searching for potential implant solutions that are biocompatible, biodegradable, and display features that are comparable to those of human bone. Because novel biomaterials, such as biodegradable polymers, possess features comparable to those of materials present in the human body, researchers have studied whether or not these materials are suitable for use. However, biodegradable polymers do not have the same level of brittleness and mechanical strength as magnesium and its alloys, which leads to a failure of surgery when the biodegradable polymers are used in load-bearing applications (Agarwal et al. 2016). Additionally, it has been discovered that the use of biodegradable polymers causes long-term inflammatory reactions in the peri-implant tissue and discourages osseous development. Because of this, magnesium continues to be a more promising biomaterial than biodegradable polymers for the replacement of bone tissue and the scaffolding of bone tissue (Liu et al. 2018). The magnesium's quick corrosive nature is the only drawback. Orthopedic implants made of magnesium have been shown to stimulate the growth of new blood vessels and bone tissue, which is an important finding. Others were unable to accomplish this goal, which suggests that magnesium-based orthopedic implants may have an advantage over the competition, particularly when it comes to dealing with tough bone diseases (Wang et al. 2020).

In addition, alloying magnesium may change or improve the qualities it already has, so making it suitable for an even wider range of applications. Magnesium is a remarkable material for use in engineering due to its lightweight nature, particularly its high strength-to-weight ratio, exceptional machinability, and cast ability (Schilling et al. 2017; Sangeetha et al. 2018). Magnesium also has a low coefficient of thermal expansion. Because of these features, magnesium was able to establish itself as a viable option in the aerospace and automotive industries, both of which are actively searching for alternatives that are more lightweight to take advantage of extra environmental and economic advantages. In addition to its features as an engineering material, magnesium is renowned for the biomaterial applications in which it is used due to its biocompatibility, biodegradability, and bio-absorbability (Fu et al. 2020; Zhang et al. 2021). In addition to that, it takes into account both its elastic modulus and its natural defenses against microbes. As a result, the most common uses for magnesium are those that involve the musculoskeletal and orthopedic systems, but its potential utility in cardiovascular medicine is now the subject of substantial research (Scafa et al. 2021).

Materials and methods

Materials

Die-cast Mg–Al alloy (AZ91D) with the chemical composition and balance given in the following weight percentages Al, 9.0, Zn 0.67, Mn 0.33, Cu 0.03, Si 0.01, Fe 0.005, Ni 0.002, Be 0.0008 and Mg represent the balance of the total content. This alloy was used in the current experiment. Cylindrical rods made by Johnson and Malthey (England) have an alloy surface area of roughly 0.2 cm2. When polishing the electrode surface to a mirror-like sheen, technicians used finer and finer emery paper grades (600–1200 grade). Following the toxicology of the calomel electrode, the Ag/AgCl reference and the rectangular platinum sheet were used in the standard three-electrode cell in this work.

As illustrated in Table 1, SBF is an aqueous solution aerated and sealed to mimic human physiological fluid. The solutions used to examine the effect of fluoride ions and albumin on the alloy under study as a biomaterial and the electrochemical activity were applied. The electrodes were carefully prepared and washed in triple-distilled water before carrying out the experimental work. This was followed by acetone degreasing, alcohol washing, and drying in the air. AZ91D alloy polarization curves were scanned at 1 mVs−1. We utilized a 10-mV sinusoidal potential applied 30 kHz to 100 million times per second to get OCP and impedance graphs. Zahner-elektrik GmbH, Im6e electrochemical workstation is used for carrying out the electrochemical studies. The coupon was connected to an electrical wire in a glass tube filled with Araldite epoxy glue and stored at 37 °C and pH 7.4, and the area of the electrode is 2 cm2 AZ91D alloy (El-Meligi et al. 2009).

Table 1 Composition of simulated body fluid at pH 7.4 (El-Meligi et al. 2009)

The SEM micrographs were taken using a JEOL JXA-840A electron probe analyzer. Unless otherwise stated, electrochemical experiments were conducted at 37 °C in an air thermostat. Immersion experiments, potentiodynamic measurements, and pH monitoring were used to investigate Mg alloy corrosion. SEM was utilized to investigate both uncorroded and corroded metal surfaces. This work investigated Mg corrosion in an aerated (SBF) (Li et al. 2008). SBF is chemically neutral, while biological fluids' pH might be slightly higher or lower than 7 as shown in Table 2.

Table 2 Composition of simulated body fluid at pH 7 (Li et al. 2008)

For the accelerating test, we must obtain an acidic electrolyte so pH 6 was adjusted before carrying out the experimental work (Chen et al. 2012). Acidity has long been known to accelerate Zn and Mg corrosion. SBF was also tested at pH 6 and 8 using HCl and NaOH. Henceforth, SBF pH 6 and SBF pH 8 shall be referred to as such. And for comparison, the SBF according to Cigada was used, see Table 3.

Table 3 Composition of simulated body fluid according to Cigada (Chen et al. 2012)

Methods

Electrochemical techniques

Using an electrochemical workstation manufactured by IM6e Zahner-Electrik GmbH, (Mebtechnik, Kronach, Germany), a method known as open-circuit potential (OCP) fluctuation with time, potentiodynamic polarization (PDP), and electrochemical impedance spectroscopy (EIS) were used to evaluate the corrosion behavior of the specimens. For the purpose of conducting electrochemical measurements, a three-electrode cell was used. This cell consisted of a counterelectrode made of platinum foil, a reference electrode made of saturated Ag/AgCl, and the specimens which themselves served as the working electrodes. After being immersed in epoxy resin and having just one side of the rectangular specimens visible, the specimens were ground up to P4000 SiC sheets, washed with distilled water, and then dried using a hairdryer. At room temperature, the measurements were carried out in a solution containing SBF.

To get at a steady state before beginning each electrochemical test, the OCP fluctuation with time was monitored for at least 45 min. The potentiodynamic polarization (PDP) experiments were carried out at a scan rate of 2 mV/s at a potential range that was 30 mV away from OCP. EIS analysis was done in a frequency range of 0.01 Hz to 100 kHz using the amplitude of the sinusoidal potential signal of 10 mV for immersion time intervals ranging from 1 h to 4 weeks. The frequency range included a total of 100 kHz. A minimum of three separate measurements were carried out for each of the conditions. Following that, the NOVA1.11 program was used to analyze the outcomes of the measurements.

To test the open-circuit potential, Eoc, a freshly polished sample was submerged in naturally ventilated aqueous solutions for 24 h. After an hour in SBF, SBF-KF, SBF + Albumin, and Cu–Al–Ni alloys were potentiodynamic polarized. The polarization approach was used at a 2 mVs−1 scan rate to measure (EIS) at the open-circuit potential. The impedance spectra were acquired with a perturbation of 10 mV. EIS plots were created after immersing the specimens in the test solution for up to 24 h. Otherwise, all experiments were done at 37 °C. We used a Gamry PCI300/4 potentiometer, galvanometer, and Zra analyzer to conduct PD and RA (EIS). A 5-mV peak-to-peak AC signal was superimposed on the impedance measurements at the (OCP). This approach directly measures EIS, Z, and phase shift. With a scan rate of 1 mV/s−1, potentiodynamic trials were performed, and the cell was submerged in a water thermostat with a temperature range of 298–338 K. SEM was used to examine the surface. Unless otherwise specified, all tests were performed at 298 K. The details of the experiment are elsewhere (Shadanbaz and Dias 2012).

Surface characterizations

The pictures taken using the scanning electron microscope (SEM) were performed on two different materials. Using an SEM Model Philips XL 30 that is coupled to an EDX Unit, with an accelerating voltage of 30 K.V., magnification ranging from 10 × to 400,000×, and resolution for Width of about (3.5 nm). Gold is applied as a coating to the samples, see Fig. 1.

Fig. 1
figure 1

Representative (a) K550X sputter coater (b and c) steps of gold coating for the samples under study, (d) SEM & EDS were used for surface characterization

Results and discussion

Open-circuit potential and potentiodynamic polarization measurements

Corrosion measurements of open circuit potential reveal electrochemical processes at the metal surface solution contact (Ecorr). An electrode solution interface may be examined by varying the open-circuit voltage as the Mg alloy corrosions over time. Figure 2a shows a typical Ecorr-t curve for the AZ91 Mg alloy. After roughly 50 ks, the potential stabilizes, with no large fluctuations observable during the immersion. At roughly 16.6 ks, the open-circuit voltage rapidly decreases, indicating pitting corrosion. A further drop at 19 km indicates the expansion of the second pit. An increase in open-circuit potential after a decrease in potential indicates self-limiting localized corrosion.

Fig. 2
figure 2

Monitoring of the corrosion behavior of AZ91 in SBF at different pH and at 25 °C (A) potential time curves and (B) potentiodynamic polarization curves

This phenomenon is connected to the cathodic reaction. The presence of OH indicates a cathodic process, which increases the development and stability of the oxide layer and reduces localized corrosion. As previously stated, when an Mg alloy is exposed to corrosive fluids, chemical dissolution coupled with electrolyte penetration induces spontaneous corrosion throughout the whole surface, resulting in Mg(OH)2 and Mg3(PO4)2. Due to OH diffusion, corrosion products concentrate around the micro anode. Therefore, the active zone diminishes, and the corrosion products create a protective layer.

The inhomogeneous crystal phenomena cause localized corrosion in Mg-alloys. With a greater standard voltage 7 than the surrounding matrix, Mg17Al12 forms an electrolysis junction. The selective attack usually generates pits with Mg12Al17 networks. After prolonged immersion, the corrosion process moves from broad to localized corrosion pitting start. The critical concentration of Cl anions required to initiate localized corrosion on Mg is roughly 30 mmol/L, compared to 142 mmol/L in SBF. Therefore, pitting propagation is common in Mg alloys treated to SBF.

The potentiodynamic polarization curves of the corrosion behavior of AZ91 in SBF at various pH levels are shown in Fig. 2b. During this experiment, the anodic current densities are used to estimate the anodic dissolution rate of AZ91 at a certain potential. On the other hand, the cathodic current densities are determined by the rate of the oxygen reduction reaction. When compared to the polarization curve of AZ91 at pH 6 and 7, the polarization curve of AZ91 at pH 8 displays a much greater amount of positive magnitude, which suggests that AZ91 at pH 8 significantly reduces the amount of dissolution it causes. In an SBF environment, the corrosion potential, also known as Ecorr (i.e., the intercept of the anodic and cathodic areas of the plot), of AZ91 at pH 8 has a larger positive value than the corrosion potential, Ecorr, of AZ91 at pH 6 and/or 7.

This demonstrates that at a pH of 8, AZ91 functions as a passivation layer that is very effective against ion transport and corrosion. On the other hand, the fact that the current density, measured as Icorr, decreased for AZ91 at pH 8 demonstrated that AZ91 at pH 8 works as a barrier to the underlying AZ91 surface and, as a result, prevents AZ91 attrition. Table 4 provides a summary of the Ecorr and Icorr values that may be retrieved from the Tafel plot. The following equation was used to arrive at an estimate for the corrosion rate (CR) of AZ91 for pH variations 6, 7, and 8.

Table 4 Polarization parameters extracted from Fig. 3a–c

The logarithm of absolute current is shown along the horizontal axis, while the potential is displayed along the vertical axis. Straight lines represent the theoretical currents for the anodic and cathodic processes, respectively. The total current, which is shown by the curved line, is the addition of the anodic current and the cathodic current. When you sweep the potential of the metal with your potentiostat, this is the current that you measure. The point on the curve where there is a sudden shift in the direction of the current because the reaction has switched from anodic to cathodic or vice versa is known as the sharp point. The use of a logarithmic axis is the reason for the distinct point.

Because there is such a large variety of current values that need to be presented during a corrosion experiment, the use of a logarithmic axis is obligatory. In the course of a corrosion experiment, it is not unusual for the current to shift by six orders of magnitude because of the phenomena of passivity. The anodic and cathodic processes are controlled in a state of equilibrium by using the potential of the metal as the controlling variable please look at Fig. 2b. Take note of the fact that the electrochemical potential of the metal determines the current that results from each half-reaction. Let's say the anodic reaction causes an excessive amount of electrons to be released into the metal. The presence of extra electrons causes the potential of the metal to shift in a more negative direction, which speeds up the cathodic process while slowing down the anodic one. This corrects the original disturbance that was introduced into the system. The equilibrium potential that is adopted by the metal when there are no electrical connections to the metal is referred to as the open-circuit potential, abbreviated as Eoc for short. The first thing that is done in the majority of electrochemical corrosion experiments is the measurement of Eoc.

In most cases, the words open-circuit potential (Eoc) and corrosion potential (Ecorr) may be interchanged with one another; nevertheless, the term Eoc is more often used. Before commencing the electrochemical experiment, the corrosion scientist must measure the Eoc and wait enough time for the Eoc to stabilize. This is an extremely crucial step. A stable Eoc is regarded to be an indication that the system being investigated has achieved a "steady state," which means that different corrosion processes have adopted a consistent pace. This is because a steady Eoc indicates that the system has entered a "steady state." When it comes to corrosion processes, some may achieve a steady state in a matter of minutes, while others can take several hours. The Eoc may be monitored by a computer-controlled system that can start the experiment as soon as it has stabilized, regardless of the amount of time that is necessary.

Icorr stands for "corrosion current" and refers to the value of either the anodic or cathodic current when measured at Eoc. If we could measure Icorr, we could utilize that information to determine the rate at which the metal is corroding. Unfortunately, it is not possible to directly measure Icorr. On the other hand, it is possible to make an approximation utilizing electrochemical methods. Icorr and corrosion rate are functions of numerous system factors in any real-world system. These variables include the kind of metal, the composition of the solution, the temperature, the mobility of the solution, the history of the metal, and many more. The explanation of the corrosion process that was just given provides no information regarding the condition of the metal's surface.

In actual use, the corrosion process of many metals results in the formation of an oxide layer on the surface of the metal. It is claimed that the metal has passivated when the oxide layer stops further corrosion from occurring. In some situations, localized portions of the passive film deteriorate, which enables considerable metal corrosion to take place in a very limited region. This phenomenon is referred to as pitting corrosion or just pitting for short. The study of corrosion processes is best accomplished via the use of electrochemical methods. This is because corrosion is caused by electrochemical reactions. In the field of electrochemistry, the process of modeling a metal in a corroding environment often involves using a metal sample with a surface area of a few square centimeters. The sample of metal is submerged in a solution that is representative of the environment in which the metal is found in the system under investigation. A device known as a potentiostat is linked to each of the electrodes, and then, more electrodes are submerged in the solution. Using a potentiostat, you can make precise adjustments to the potential of the metal sample while simultaneously measuring the amount of current that flows as a direct result of that potential. The controlled polarization of current (galvanostatic) and controlled polarization of potential (potentiostatic) both have their uses.

It is current that is measured when the polarization is done potentiostatically, and it is potential that is recorded when the polarization is done galvanostatically. In this article, we are going to focus on controlled potential techniques, which are far more frequent than galvanostatic methods. Potentiostatic mode is used to disturb the equilibrium corrosion process almost exclusively, with a few notable exceptions being Open Circuit Potential vs. Time, Electrochemical Noise, Galvanic Corrosion, and a few others. It is said that a sample has been polarized when an effort is made to move the potential of a metal sample that is dissolved away from Eoc. While the metal sample is polarized, the response (current) of the sample is monitored. The response is analyzed to construct a model of the corrosion behavior shown by the sample. Consider the scenario in which we utilize the potentiostat to move the potential to an anodic location (toward positive potentials from Eoc).

In Fig. 2b, we are climbing higher and higher up the graph as we go. Because of this, the pace of the anodic reaction, often known as corrosion, will quicken while the rate of the cathodic reaction will slow down. A net current will flow from the electronic circuit into the metal sample because the anodic and cathodic processes are no longer balanced. This will cause the metal sample to become positively charged. By common practice, the sign of this current is considered to be positive. See the very end of this article for a discussion of the electrochemical sign conventions that are currently in use. If we move the potential enough away from Eoc, the current flowing as a result of the cathodic reaction will become insignificant, and we will be able to use the current as a measurement of the anodic reaction by itself. It is important to take note of the fact that the curves representing the cell current and the anodic current lay on top of each other at high positive potentials when looking at Fig. 2b. On the other hand, when cell potentials are very negative, cathodic current predominates over anodic current. When we change the potential in certain circumstances, the metal will first get passivated, and then, we will induce pitting corrosion to take place.

An experiment in which the current is measured versus potential or time may be able to help us determine Icorr at Ecorr, the tendency for passivation to occur, or the potential range over which pitting will occur if we make smart use of a potentiostat. This can be accomplished by measuring the current versus potential or time. Because electrochemistry allows for the study of a wide variety of corrosion phenomena because it can measure very low corrosion rates, and because it can conduct these measurements quickly, an electrochemical corrosion measurement system has become a standard item in the modern corrosion laboratory.

The corrosion potential (Ecorr), corrosion current (jcorr), polarization resistance (RP), and rate of corrosion of Mg were all tested (Kcorr). Electron expenditure on Mg occurs through hydrogen ion unloading in SBF (acidic corrosion) (Wang et al. 2008).

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

However, Eq. 2 shows that dissociated water is the source of H+ ions (specifically, the hydronium ion H3O as seen in Eq. 3). Equation 4 depicts Mg's condition since it meets the test electrolyte and experiences an anodic process that dissolves it, forming MgO as part of the anodic process (Tang et al. 2013; Zheng et al. 2014). Finally, the Mg ion from Eq. 5 reacts with the OH from Eq. 2 to form Mg(OH)2, as shown in Eq. 6.

Cathodic (c) and anodic (a) Tafel slope values, corrosion potentials (Ecorr), corrosion currents (jcorr), pitting potentials (Epit), polarization resistance (RP), and corrosion rate (Kcorr) are shown in Table 4. As shown in Fig. 2b, the vigorous SBF solution caused the alloy to aggressively disintegrate. HAp is shown to exist and increase in concentration with Mg in Fig. 2b. Low Mg dissolution. cathodic, jcorr, and anodic currents, including Kcorr, decreased, whereas Ecorr increased, and RP decreased. This effect was amplified when Epit decreased to negative levels. Ecorr and jcorr values were obtained via extrapolating anodic and cathodic lopes from Tafel lines next to linearized current areas. However, polarization data were used to calculate RP and Kcorr. It improves Mg's resistance to homogenous corrosion while increasing the risk of localized corrosion caused by HAp particles having greater noble potential than Mg-particles as mentioned in Fig. 3.

Fig. 3
figure 3figure 3

Effect of temperature variations on the potentiodynamic polarization curves for the corrosion behavior of AZ91 in SBF at (A) pH 6, (B) pH 7, and (C) pH 8

EIS measurements

The kinetic parameters were verified by studying electron transport at electrode/electrolyte interfaces. This method has been used to characterize metal and alloy corrosion and passivation. Mg/0.0 wt. % HAp, Mg/1.0 wt. % HAp, Mg/2.0 wt. % HAp, Mg/4.0 wt. % HAp, Mg/5.0% HAp after 15 min of engagement in the SBF solution. The equivalent circuit model for the case of two time constants was fitted to the Nyquist plots to assess their EIS. Table 5 shows the characteristics of a similar circuit. These parameters are defined as follows: Cdl1 and RP1 relate to solution resistance, Q and RP2 to constant phase elements (CPEs), and RP3 to extra polarization resistance. In this circuit, a double-layer capacitance (Cdl2) is linked to RP3's variation. The resulting Nyquist curves showed two semicircles of discouraged capacitive. The experimental findings linked Mg+, an intermediate species, to Mg corrosion at coat defects or on a free coat surface. Electrochemical oxidation of Mg yields Mg+, which reacts with H2O to form hydrogen and Mg2+. Low-frequency RC circuit parallelism is visible. In Eq. 6, RP3 reflects the variance of the reaction's transfer resistance.

$$ {\text{Mg}}^{ + } \to {\text{ Mg}}^{{{2} + }} + {\text{ e}}^{ - } $$
(7)
Table 5 EIS parameters extracted from Figs. 4, 5, and 6

As shown in Fig. 4 and Table 4, adding HAp to the medium increases the resistances RS, RP1, RP2, and Rp3. Resistivity rises when HAp is incorporated into a surface layer, especially at low ionic resistance defects. Because HAp particles reduced Cdl1 and CPE values, they enhanced Mg-corrosion resistance in SBF solution. It is possible to measure the interface impedance (|Z|) of (1) Mg/0.0 wt. % HAp, (2) Mg/1.0 wt. % HAp, (3) Mg/2.0 wt. % HAp, (4) Mg/3.0 wt. % HAp, and (5) Mg/4.0 wt. % HAp after 15 min in SBF solution (Chen et al. 2014; Diang et al. 2014; Zeng et al. 2014a, 2014b; Wang et al. 2015; Xu et al. 2015; Li et al. 2016). The corrosion resistance of the Mg surface rises with |Z|, especially in the low-frequency zone. The EIS measurements and polarization findings match with the previous research, as shown in Figs. 4, 5, 6.

Fig. 4
figure 4

Nyquist curves results from EIS plots for the corrosion behavior of AZ91 in SBF at different pH at 25 °C

Fig. 5
figure 5

Bode and phase angle curves result from the EIS plots for the corrosion of AZ91 in SBF in several pHs at 25 °C

Fig. 6
figure 6figure 6

Effect of time intervals on the repeated Nyquist curves for the corrosion behavior of AZ91 in SBF in (A) pH 6 (B) pH 7 (C) pH 8 at 25 °C and (D) Equivalent circuit

When the impedance data acquired for varied pH and immersion durations are compared, the EIS demonstrates a distinct and well-regulated development in both the high-frequency and low-frequency areas with time. This can be seen when the data are plotted. The high-frequency behavior of the EIS is linked to electrolyte penetration, which also includes the absorption of water and the introduction of electrolytes. At high frequencies, one can ascertain the characteristics of the corroded product as well as the transformation. In most cases, the low-frequency region is responsible for conveying significant information on the electrode management mechanism as well as the contribution from localized faults to the overall impedance. In this case, the fluctuations at low frequencies might be ascribed to changes in the corrosion product layer, and the evolution at low frequencies most likely originates from changes in the corrosion mode. Both of these phenomena can be seen. After being submerged in SBF for some time, a corroded layer immediately develops, and the Nyquist plot reveals two capacitive loops at high frequency and low frequency at the very beginning of the immersion process. Charge transfer, the effects of the layer formed by corrosion products, and mass transfer are often the causes of these phenomena. When the immersion duration is stretched out, the high- and low-frequency loops become more pronounced.

This change in impedance is linked to the thickening of the corroded layer, which in turn is related to an improvement in the protection provided by this layer. At the time interval of 150 min, there is just one capacitive loop with a rising impedance. This rise in impedance is more evidence that pitting corrosion has a self-limiting influence on its progression. An inductive loop will start to form at low frequencies as soon as the immersion process begins; however, as time passes, the inductive loop will become less noticeable before pitting corrosion takes place. As was just explained, the matrix and the phase may form galvanic couples, which results in strong corrosion along the edge of the contact point between the matrix and the phase. Strong micro-galvanic corrosion between the matrix and phase likely is to blame for the occurrence of the inductive loop. This galvanic couple effect is diminished as a result of the buildup of the products of corrosion, and the inductive loop also becomes less evident as a consequence of this. The findings of the open-circuit potential evolution test and those of the EIS accord with one another quite well.

Morphology

Figure 7 shows SEM images of milled powder and as shown, every Mg particle, big or little, is covered with HAp particles. The results showed that the HAp includes Ca, P, and O. High magnification revealed an Mg-rich secondary phase. No HAp phase structure was found in our investigation, but we think its existence improves the mechanical and physical properties of Mg-HAp complexes over pure Mg. Mg and/or Mg-alloys are possible biodegradable biomaterials due to their comparable density and Young's modulus to human bone, non-toxicity, and strong biocompatibility. Because of their low bioactivity and low mechanical strength, Mg and/or Mg alloys are not presently employed in clinics. An Mg/HAp nanocomposite with different concentrations of HAp (0–5 wt. %) was swiftly solidified with HFIHS to create a biodegradable hard tissue component (Hou et al. 2016).

Fig. 7
figure 7

Effect of pH on the surface characterization using SEM micrograph (A) pH = 6, (B) pH = 7 and (C) at pH = 8 for the Mg/5wt. % HAp composites

Figure 8 exhibits Mg-X wt. % HAp compact density and micro-hardness. First, adding HAp raised relative densities. Despite the short dwell period, the sintered samples' comparative density reached 99.7%. As shown in Fig. 8, Mg and Mg/HAp nanocomposites had micro-hardness testing. Micro-hardness values increased as the wt. % of nano-sized HAp reinforcement in the Mg matrix increased of about 1–3% HAp-reinforced Mg. Among the nanocomposite formulations, nano-powder increased relative density and hardness the most. HV 99.7% comparative density and 1–3 wt. % durometer HAp 70 HV reinforced Mg. It was 1–3 wt. % hard. In terms of density, HAp 70 HV varied from 1 to 3 wt. % HAp 70. The presence of Hap-fragmented nanoparticles at grain boundaries presumably pre-empted the increase in comparative density. These nano-sized inclusions may improve Mg's mechanical properties (Li et al. 2016).

Fig. 8
figure 8

Effect of pH variations on (A) the relative density and (B) the micro-hardness of nanocomposites of Mg alloy

Surprisingly, relative density and micro-hardness reduced when HAp concentration increased by over 3%. For two reasons, increasing HAp content reduces the relative density and micro-hardness of nanocomposites. First, HAp nanoparticles cluster to some degree. However, when the HAp concentration grows, 550 °F is no longer sufficient. The low melting temperature of the matrix surrounding Mg prevents raising the sintering temperature. In all Mg/HAp nanocomposite samples, there is a narrow distribution of hardness values (Zhang et al. 2017).

Composite bone formation test

After testing the compressive properties and density of AZ91 magnesium alloy as well as AZ91 nanocomposites, in addition to their stress curves, it was observed that the strength of compressive properties of AZ91 nanocomposites increased by increasing the added nanoparticles, reaching the maximum values by adding nearly 20% of nanoparticles. It assumed the homogeneity of nanoparticles on the surface of AZ91 magnesium during the mixing process, and this led to a significant improvement in the compressive properties of AZ91 magnesium alloy, which in turn led to an enhancement of the modulus of elasticity, making the distribution highly uniform, as well as increasing the cohesion of nanoparticles in the matrix of AZ91 magnesium alloy (Chen et al. 2017).

This increase in the elastic modulus of the matrix is due to the uniform distribution of reinforcement and inter-integration and a significant increase in the internal tension between the reinforcement and the matrix (Li et al. 2017). It was also observed that the matrix ductility of AZ91 magnesium alloys decreased with a higher concentration of nanoparticles in the reinforcements in all AZ91 nanocomposites see Fig. 9a. Despite the use of higher concentrations of the reinforced particles, it was observed that the agglomeration of the reinforced particles reduces the ductility and also creates small gaps between them, which led to an increase in the weight percentage of the nanoparticles used as a hardness enhancer due to the presence of calcium atoms inside the matrix particles, which made them relatively more rigid which improved the mechanical evaluation of AZ91 magnesium alloy, significantly increasing the overall bulk density as shown in Fig. 9b (Xiao et al. 2018).

Fig. 9
figure 9

Surface morphology of (A) nanocomposite AZ91 before bone formation and (B) nanocomposite AZ91 after bone formation using SEM photomicrographs

For more explanation, the reinforcements worked to fill the interfacial gaps in the matrix, as the samples with porosity, which did not affect mechanical properties or erosion rates, might have better fillers in terms of tissue healing and bone production, as this was proved using the given results from EDS; as it is observed from Fig. 10a there is no trace or evidence of the presence of calcium in the magnesium alloy before it was introduced into the body fluid as shown in Table 6 (Zohdy et al. 2021a, b). In addition, it was observed in the case of immersion of the magnesium alloy nanocomposite in the body fluid, there is a presence of a large amount of calcium as shown in Fig. 10b. These results prove that this alloy in this composition gave great compatibility with body fluids, meaning that the body can accept them, and this became more evident through the spread of calcium around the compound, which makes this alloy and the support with nanoparticles suitable to serve as good support for treating bone fractures as shown of high calcium content as shown in Table 7 (Zohdy et al. 2021b; Zohdt et al., 2019; Farag et al. 2016; Ashraf et al., 2018; Ateya et al. 2009; Alkharafi et al. 2009; Mohamed et al., 2022).

Fig. 10
figure 10

Detection of calcium in (A) nanocomposite AZ91 before bone formation and (B) nanocomposite AZ91 after bone formation using SEM–EDS graphs

Table 6 EDS elemental results of nanocomposite AZ91 before bone formation
Table 7 EDS elemental results of nanocomposite AZ91 after bone formation

Corrosion mechanism

Composite materials are made up of two or more phases that are linked together in such a way that stress transmission occurs across the boundaries between the phases. Even though they have two distinct phases, solid and void, porous materials are not often regarded to be composites. This is because stress is not transmitted to the voids within the material. Composite materials are often intended to give a mix of qualities that cannot be accomplished with a single-phase material. This is because composite materials are made up of many phases. It is abundantly evident that there is a significant disparity between the unique qualities of human tissue and those of different metals, polymers, and ceramics when one does a comparison between the two. Because of this, a lot of focus has been put on the creation of composites, which are an attempt to combine the beneficial qualities of many kinds of materials while avoiding some of the problems of each substance.

As an illustration of this, consider the practice of covering a bioinert material like alumina with a bioactive substance like hydroxyapatite (HAP) or bioglass to encourage direct bone attachment, as is done, for instance, in the case of hip replacements. Each kind of biomaterial has unique qualities as well as potential uses. However, in addition to their benefits, they also come with a few downsides. Ceramics can't be used in bulk loading zones since they don't have very good mechanical qualities. It has been discovered that polymers, which are often organic in their fundamental makeup, are susceptible to assault by a wide variety of physiological elements. When seen through this lens, metallic materials have garnered a significant amount of attention. Because of their superior mechanical qualities, strong resistance to corrosion in bodily fluids, and biocompatibility, metals are a good choice for implantation because of their applications.

$$ {\text{Mg }} + {\text{ 2H}}_{{2}} {\text{O }} \to {\text{ MgOH}}_{{2}} + {\text{ H}}_{{2}} \uparrow $$
(8)

The previous reaction (8) takes place in an aqueous solution, which is a corrosion medium. The amount of hydrogen that was produced is proportional to the amount of magnesium that was dissolved. The link between the production of hydrogen and the dissolution of magnesium is unaffected by the products of the corrosion. Because of this, the hydrogen evolution approach is accurate, straightforward, and free from the common sources of error that are found in weight loss measures. In addition, this method has the benefit that variations in the degradation rates can be monitored by the hydrogen evolution rates. This opens the door for research into the relationship between the variation in the degradation rate and the length of time that the sample was exposed to the environment.

It is well known that the rate of hydrogen gas evolution during the corrosion process is much too high for the host tissues to be able to keep up with it. As a result, it would be very beneficial to research how the rate of hydrogen evolution varies with increasing exposure duration. Because of the high degree of variability in the rates of hydrogen development during the early stage, the monitoring intervals are kept very short. Since it is a relationship between the hydrogen evolution rates and corresponding degradation rates as a function of immersion time in SBF, a larger interval is used even though the volume of hydrogen present in the final stage is relatively low. This is because the rate at which hydrogen is degraded is proportional to the immersion time.

The rate of hydrogen evolution is quite high during the first two hours, but it reduces dramatically over the succeeding four hours. After six hours of immersion, its rate of decline becomes more gradual, and after twenty-four hours, it reaches a steady state. The two findings are quite comparable to one another. The aggressive assault by chloride, sulfate, phosphate, and carbonate ions is what causes the rapid breakdown rate of magnesium alloy in SBF. Of these ions, chloride ions offer the greatest danger to the magnesium alloy. The surface magnesium hydroxide, Mg(OH)2, is capable of being converted into the more soluble magnesium chloride, MgCl2. Because the chloride ions are involved in the intermediate step of magnesium dissolution, which speeds up the electrochemical reaction rate from magnesium to magnesium univalent ions, the dissolution of Mg(OH)2 makes the surface more active or reduces the protected area, which promotes the further dissolution of magnesium. The following is a good way to describe the reactions:

$$ {\text{Mg }} + {\text{ H}}_{{2}} {\text{O }} \to {\text{ MgOH}}_{{2}} + {\text{ H}}_{{2}} $$
(9)
$$ {\text{Mg }} + {\text{ Cl}} - \, \to {\text{ MgCl}}_{{2}} $$
(10)
$$ {\text{MgOH}}_{{2}} \to {\text{ MgCl}}_{{2}} + {\text{ Cl}}_{{2}} $$
(11)
$$ {\text{Mg}}\left( {{\text{H}}_{{2}} {\text{PO}}_{{4}} } \right)_{{2}} + {\text{ 4H}}_{{2}} {\text{O }} \to {\text{ Mg}}_{{3}} \left( {{\text{PO}}_{{4}} } \right)_{{2}} .{\text{4H}}_{{2}} {\text{O }} + {\text{ 4H}}_{{3}} {\text{PO}}_{{4}} $$
(12)

As was stated in reaction (12), the precipitation of Mg3(PO4)2 causes the consumption of OH, increases the solubility of magnesium, and enhances the forward process. The effects of carbonates are often more convoluted than those of other substances. Depending on the amount of HCO3 present, they can either hasten or delay the pace at which magnesium corrodes. An increase in the rate of corrosion occurs when the concentration of HCO3 surpasses around 40 mg/L. This is because the HCO3 causes an accelerated dissolving of the Mg(OH)2 (MgO) protective layer. Magnesium corrosion may be slowed down if the concentration is brought down to a level that is lower than the critical concentration.

The HCO3 concentration in the SBF is around 256 mg/L, which is a significant increase from the previous value of 40 mg/L. As a result, carbonates cause an increase in the rate of corrosion in SBF. Magnesium is likewise susceptible to the destructive effects of sulfates, but not to the same degree as chloride ions. Intense corrosion takes happens during early exposure due to the huge area of the fresh surface that is present, as well as the inadequate protection supplied by the corrosion products. This contributes to the high rate of corrosion. The rate of corrosion is slowed down as a result of subsequent passivation of the active surface and the buildup of corrosion products. After being submerged for a long enough period, an equilibrium between the creation and dissolution of the corrosion products is achieved, which results in consistent rates of deterioration.

Conclusion

The influence of changes in pH on the rate of biodegradation of a nanocomposite magnesium alloy in simulated bodily fluids represents the core message of this work. Notably, the biodegradability of magnesium and its nanocomposite alloys and all the tested tools proved the presence of variation in corrosivity in SBF because of the variation in pH.

Sintering at higher frequencies and temperatures quickly densified 0.5–5% of the Mg/HAp nanocomposite in an incredibly short amount of time. The corrosion potential (Ecorr), corrosion current (jcorr), and polarization resistance (RP) of Mg in the test solutions were all measured during a corrosion test on the nanocomposite (Kcorr). In the anodic side of the system, the high anodic potential was exacerbated by the SBF solution's abrasiveness. Even while a localized assault is less likely when HAp is present or concentrated, it is still a possibility. The most corrosion-resistant Mg/5.0 wt. % HAp solution is used in SBF applications. Because of this, Mg in the SBF medium was used in the EIS investigation to investigate kinetic limits on electron allocation. HAp was found in 1% to 5% of patients, which was attributed to rising levels of resistance and a rise in the amount of HAp present. The more HAp there is in the solution, the more resistant Mg is to corrosion. As HAp concentration grew, Mg's interface impedance (|Z|) also increased. We can confirm the results of earlier investigations using electrochemical instruments such as PD and EIS measurements. All the composites examined in this study have exceptional mechanical and corrosion resistance.

It was noted that there is no trace or evidence of the presence of calcium in the magnesium alloy before it is introduced into the body fluid. In addition, it was observed in the case of immersion of the nanocomposite of the magnesium alloy in the body fluid, the presence of a large amount of calcium, so it can be said that these results proved that this alloy. In this composition gave high compatibility with body fluids, which means that the body can accept it, and this became more evident by the diffusion of calcium around the compound, which makes this alloy suitable to serve as good support for the treatment of bone fractures as shown in the high calcium content.