Introduction

In biomedicine, magnesium (Mg) alloys are heavily researched for their use as implant materials for temporary bone support. Providing excellent biocompatibility and mechanical properties similar to bone, Mg-based alloys currently cover a broad range of potential orthopaedic therapies. Furthermore, their osteoinductive, as well as anti-inflammatory effects, favour the application of Mg alloys for bone and tissue regeneration1,2. However, a tailored degradation is required in order to ensure implant stability during the healing process and to avoid a too-fast release of degradation products. Therefore, detailed investigations of the degradation of Mg alloys in vitro are needed for their safe application in vivo.

While the overall mechanism of Mg degradation in aqueous media is regarded well understood, there are many sub-processes that remain unknown, yet are pivotal for the predictive assessment of the implant behaviour. Specifically, the hydrogen evolution reaction (HER) is known to be the primary cathodic reaction during the Mg alloy (bio)degradation process, leading to the alkalization of the immediate environment. During biodegradation of Mg alloys degradation products such as brucite (Mg(OH)2), magnesite (MgCO3), calcium hydroxide Ca(OH)2, calcite (CaCO3), and hydroxyapatite (Ca10(PO4)6(OH)2) are formed based on the available ions in the degradation medium and following the dissolution of the metal3,4. The formation of degradation products and the speed of degradation are highly dependent on environmental conditions, including the ionic composition, presence of proteins and organic components, and the pH of the immersion solution5,6,7,8,9,10,11,12,13. Assuming that HER is the main cathodic reaction:

$$2e^ - + 2{{{\mathrm{H}}}}_2{{{\mathrm{O}}}} \to {{{\mathrm{H}}}}_2 + 2{{{\mathrm{OH}}}}^ -$$
(1)

the amount of evolved hydrogen gas (H2) equates to the amount of degraded metallic Mg.

While it was dismissed for a long time due to a higher corrosion potential than the HER, the oxygen (O2) reduction reaction (ORR):

$${{{\mathrm{O}}}}_2 + 4e^ - + 2{{{\mathrm{H}}}}_2{{{\mathrm{O}}}} \to 4{{{\mathrm{OH}}}}^ -$$
(2)

has recently been shown to play a role in the early stages of Mg degradation14. It has been shown that Mg discs of different purity show different ORR rates in NaCl, with high purity Mg showing a faster initial O2 depletion, as well as a less steep incline later on15. Such O2 depletion was inversely correlated with the overall degradation rate of the discs as well as the observed H2 evolution. The authors attributed this behaviour in part to differences in the precipitation of Mg(OH)2 on the sample surface during degradation, where more Mg(OH)2 precipitated on lower purity Mg samples, thus restricting the diffusion of O2 to the metal surface.

The role of the ORR in Mg degradation is of particular importance when considering the in vivo degradation behaviour of Mg alloys, as the environment near the implant will initially be hypoxic due to ruptured blood vessels and clot formation, which will prevent O2 transport to the implantation site. This condition has a tremendous effect on the healing conditions, and the first step in tissue regeneration is the establishment of the recirculation by angiogenesis in order to ensure a supply of nutrients as well as recruiting repair cells16. It has been shown that Mg degradation products improve the proliferation of endothelial cells, especially under hypoxic conditions. If implant degradation further consumes O2, its local environment may remain at reduced O2 concentrations with further implications for cell proliferation. Only a minor effect of hypoxia on Mg degradation was reported in a study, where the degradation of small-sized Mg cylinders was observed over 8 weeks, showing a slight decrease in degradation rate under hypoxic conditions17. However, the initial mass loss under hypoxia was higher compared to normoxia. Consequently, it is imperative to understand the O2 dynamics during the degradation process in a temporally and spatially resolved manner. Previously, Silva et al. and Wang et al. studied the ORR using point measuring systems such as microsensors and microelectrodes14,15. However, such sensors perform O2 measurements at a minute localized area on the sample surface and cannot be used for simultaneous monitoring of ORR and the resultant development of O2 gradients overtime over the complete surface of the alloy/implant.

In the present study, we investigate differences in O2 consumption during the first two hours of biodegradation for three different Mg alloys; pure Mg, Mg–6 wt%Ag and Mg–5 wt%Gd. Using O2-sensitive nanoparticles in combination with a ratiometric imaging system, the O2 consumption of the alloys was imaged in situ in two different immersion media that result in different degradation behaviour. The selected immersion media were Hanks’ balanced salt solution (HBSS) and the more complex Dulbecco’s modified Eagle’s medium (DMEM). Previously, sensor nanoparticle-based O2 imaging was used in complex applications such as in mapping the spatio-temporal heterogeneous O2 distribution in 3D bioprinted constructs17 or around aquatic plant roots18. We hypothesized that these sensor particles will enable the mapping of O2 concentrations during the early degradation of Mg alloys in a similar manner. Comparative measurements of pressure increase due to H2 evolution were performed to relate the O2 consumption to the HER-based degradation rate of the different Mg alloys.

Results

Calibration of O2-sensitive nanoparticles

Prior to the degradation experiment, the O2-sensitive nanoparticles, which were fabricated as previously described17,18, were calibrated for their use with a ratiometric camera system19. To this end, the nanoparticles were mixed with HBSS and DMEM and imaged at pre-defined O2 concentration set in an incubator. The O2 sensitive nanoparticles when excited in the range of 400–475 nm, the O2 sensitive indicator in the nanoparticles emits O2-dependent luminescence in the red channel (peak emission at 650 nm) and the reference dye in the nanoparticles emits O2 independent fluorescence in the green channel (475–550 nm). A ratio of pixel intensity of red (O2 dependent) and green (O2 independent) channels are denoted as “R/G ratio” (Fig. 1). The calibration curve was attained by correlating the mean ratio (n = 3) to the measured O2 concentration in the respective solutions. Though the incubator O2 concentrations were set to defined values ranging from 21% to 1%, actual O2 concentrations measured in HBSS or DMEM by a calibrated O2 meter were consistently lower than the incubator settings. A nonlinear decrease in the ratio of acquired images of the O2-sensitive nanoparticles for increasing O2 concentrations ranging from anoxia to normoxia was obtained (Fig. 1), as expected for optical O2 sensing materials20.

Fig. 1: Calibration curves for O2-sensitive nanoparticles.
figure 1

The calibration curves are obtained from plotting the ratio of the red and green channels obtained from luminescence images of O2-sensitive nanoparticles in HBSS (a) and DMEM (b). The colour-coded images at the bottom of the graph show the ratio images (red/green channel) in respective solutions. The mean ratio and standard deviation were obtained from the entire area of the coverslip. The dotted lines represent the curve fit of a quadratic polynomial function (r2 > 0.99).

Imaging of O2 dynamics on the surface of discs

For the degradation measurement, 20 µL of O2-sensitive nanoparticles in HBSS or DMEM were placed onto the surface of discs (Ø 9 mm, height 1.5 mm) of pure Mg, Mg–6Ag and Mg–5Gd (n = 3). A uniform distribution of O2-sensitive nanoparticles on the surface was ensured by placing a glass coverslip onto the droplet with sensor particles on the disc surfaces; as seen in t = 0 min images in Fig. 2. O2 concentration images showed a very low concentration immediately after the addition of O2-sensitive nanoparticles in HBSS or DMEM onto the surface of the discs (Fig. 2). An overall increase (with intermittent reduction) in the O2 concentration for all the samples was observed until 120 min. As the oxidation reaction progressed, the development of gas bubbles was observed.

Fig. 2: Images of O2 concentration over the metal disc surface.
figure 2

ac shows the degradation of the discs in HBSS and df in DMEM. The images were acquired at time 0 min (a, d), 60 min (b, e) and 120 min (c, f) after adding the respective solution containing O2-sensitive nanoparticles. All sample types showed the development of gas bubbles (arrows) over the measured duration. The image contrast was adjusted for better visibility.

The O2 consumption in the disc centre was generally higher than towards the edges, see also Supplementary Figs. 1 and 2. However, certain events, such as O2 spikes (see e.g. Mg–5Gd in DMEM1 around 30-40 min in Supplementary Fig. 2) were observed over the whole area of the disc. A comparison between the three different experiment runs shows that similar degradation processes take place for the same alloy and degradation medium. It is however notable that the O2 spikes do not appear in all experiments performed in DMEM.

Quantitative analysis of O2 dynamics

To assess the O2 consumption quantitatively, the mean O2 content in the centre of the metal discs was evaluated using five circular (r = 20 pixels) regions-of-interest (ROIs). See Supplementary Fig. 3 for a representation of the regions. For each region i, the mean mi and standard deviation σi of the O2 content was calculated, based on which the overall mean \(m = \mathop {\sum}\nolimits_{i = 1}^5 {\frac{{m_i}}{5}}\) and standard deviation \(\sigma = \mathop {\sum}\nolimits_{i = 1}^5 {\frac{{\sigma _i}}{{5\sqrt 5 }}}\) were calculated. For better visualization of the trend and to reduce noise, a forward-backward filter (kernel size 4) was applied to the mean data. The filtered mean and standard deviation of the O2 concentration measured in the centre of the discs are shown in Fig. 3.

Fig. 3: Filtered mean (solid lines) and standard deviation of O2 concentration measured in the centre of the metal disc.
figure 3

The O2 concentration was determined for pure Mg (a, d), Mg–6Ag (b, e) and Mg–5Gd (c, f) for three samples each in HBSS (ac) and DMEM (df).

The increase in O2 concentration over time is based on the diffusion of O2 from the sample edges and the consumption of it due to the ORR. This has been verified by implementing a computational model of the liquid film on the Mg alloy surface and modelling the change in O2 concentration \(\left( {c_{O_2}} \right)\) as \(\frac{{dc_{O_2}}}{{dt}} = - kc_{O_2}\), where k is the ORR rate. This simplified equation assumes no dependence of the ORR on the degradation of the Mg alloy. If k = 0, the oxygen concentration is limited by the diffusion process only. Based on the experimental values observed initially, the initial O2 concentration in the surface film was set to 3%. Figure 4 shows the schematic of the modelled surface film and the computed mean O2 concentration in the centre of the sample for a radius of r = 1.5 mm.

Fig. 4: Schematic and results from computational model of O2 diffusion and consumption.
figure 4

a Schematic of the rotationally symmetric surface film, in which the diffusion of O2 from the sample border and its consumption at the Mg alloy surface is modelled. The respective equations and boundary conditions are indicated. The dashed line delineates the radius of the central region that was evaluated for comparison with the experiments. b Model output for different values of the ORR rate k in the central region. The simple diffusion case is shown in grey.

Based on the model output shown in Fig. 4 it is apparent that the experimental results shown in Fig. 3 indicate that the increase in O2 concentration over time due to diffusion was lowered by its consumption at the sample surface. In order to obtain a quantitative evaluation of the measured increase in O2 following the initial fast decrease, the data for the first two hours of degradation was divided into different segments. The initial O2 consumption was too fast to fully record in most cases and therefore, it was not possible to fit a decay function to these data. A linear function of the form y = a·x + b was fitted to the slowly increasing data points to quantify the concurrent influence of O2 increase due to diffusion and its decrease due to consumption at the sample surface. Corresponding graphs showing the moving average with linear slopes fitted to quantify the rate of O2 increase are shown in Supplementary Fig. 4. The mean of fitted slopes is shown in Table 1. Based on the calculated linear slopes, the O2 consumption in DMEM following the initial fast O2 consumption phase was highest for Mg–6Ag and lowest for Mg–5Gd. For HBSS, the same trend was observed. Notably, the increase rate for Mg was similar in both media, while that for Mg–6Ag was lower in HBSS than in DMEM and that for Mg–5Gd was higher in HBSS than DMEM. Mg–5Gd showed the strongest deviation, in particular in HBSS, where one sample showed a larger initial increase followed by another decline after about one hour of degradation, while the other samples showed a less steep incline and decline. Mg–6Ag in HBSS behaved particularly differently with O2 concentration staying well below 7.5% at all times.

Table 1 Mean fitted rate (±standard deviation) of O2 increase at the metal surface measured during Mg alloy degradation in two different media.

Degradation rates based on H2 evolution

To compare the observed O2 concentration changes during the degradation of Mg alloys, we performed immersion measurements and determined the amount of released H2 based on pressure changes. The degradation rate was calculated as

$$DR\left[ {\frac{{mm}}{{yr}}} \right] = \frac{{dp}}{{dt}}\frac{V}{{RT}}\frac{M}{{A\rho }}k$$
(3)

where \(\frac{{dp}}{{dt}}\) is the pressure change rate determined from the pressure measurement, V = 2.95 × 10−5 m3 is the overall volume of the glass vials, R is the gas constant, and T = 37 °C is the temperature. \(M\) is the molar mass of Mg, \(\rho\) the density, \(A\) surface area and \(k\) the coefficient for adjusting the unit of DR to mm/yr.

The average degradation rate of Mg, Mg–6Ag and Mg–5Gd samples in HBSS and DMEM+10% foetal bovine serum (FBS), respectively, is shown in Fig. 5. These are calculated based on the assumption that the HER is the main cathodic reaction. Overall, the standard deviation is small, except for the Mg–6Ag samples. In DMEM + 10%FBS, Mg and Mg–5Gd degraded at similar rates, while Mg-6Ag degradation was slower in the first 10 h. In HBSS, pure Mg degraded slowest, followed by Mg–5Gd, while Mg–6Ag showed the fastest degradation. Pure Mg degraded similarly in both DMEM + 10%FBS and HBSS, while Mg-5Gd and Mg-6Ag showed a slower degradation in DMEM + 10%FBS than HBSS.

Fig. 5: Degradation rates of alloys in immersion media as obtained from pressure measurements for H2 evolution.
figure 5

The average (line) and standard deviation (shaded area) of the degradation rate of Mg, Mg–6Ag and Mg–5Gd samples immersed in DMEM + 10% FBS (solid lines) and HBSS (dashed lines) are shown.

Discussion

The finding of an overall increase in the O2 concentration of all metal samples over time indicates that O2 diffuses from the edges of the disc into the liquid layer under the coverslip, as verified by the computational model. Comparing the model output and experimental measurements indicates that the ORR rates for Mg and Mg–6Ag in HBSS may differ by up to an order of magnitude. However, as the model did not account for the dependence of the ORR on the Mg alloy degradation and the presence of gas bubbles, it did not capture the experimental behaviour perfectly.

The observed spikes in O2 concentration correlated with the H2 evolution and intermittent disappearance of gas bubbles at the metal surface. For example, Fig. 6 shows the optical images corresponding to the time points at the onset of the spike for Mg–5Gd in DMEM, the top of it and the following increase up to the onset of the next spike. Notably, H2 bubbles are covering the Mg–5Gd disc following the initial slow increase in O2 concentration, yet at the sudden decrease in O2 concentration, all bubbles have disappeared. The number of gas bubbles appears unchanged during the initial increase in O2 concentration and has increased only a little until their disappearance. The change in O2 concentration in relation to the H2 gas bubbles suggests that the gas bubbles hinder the ORR to some extent, e.g. by blocking of the cathodic sites and therefore enabling a slow normalization of the O2 concentration, as was also suggested by other authors15. The gas bubbles may burst due to the increasing pressure and as they do, the disc surface would again become accessible for the ORR to take place, leading to a decrease in O2 concentration. However, at the same time, it is possible that the observed change in O2 concentration at the location of the bubbles is an imaging artefact in the sense that the portrayed concentration is related to the bubble surface rather than the metal.

Fig. 6: Visual correlation of optical images and measured O2 concentration dynamics.
figure 6

It is apparent that H2 gas bubble formation plays a major role in inhibiting the ORR. The image contrast in the optical images was adjusted for better visibility.

The observed behaviour for Mg to reduce O2 in a similar manner in DMEM and HBSS corresponds well to measurements by Feyerabend et al.21, however, the authors found a lower decrease in O2 concentration during initial degradation. This may be due to differences in the experimental setup, in particular, the usage of a cover slip in the current study that limited the diffusive supply of O2.

Pure Mg behaved similar both in terms of H2 evolution and O2 consumption in both solutions, while the behaviour of Mg–6Ag was inconsistent. Based on Mg–5Gd, which showed similar patterns of O2 increase and H2 evolution in DMEM (+10% FBS) compared to pure Mg, the higher amount of released H2 observed in HBSS relates to a higher O2 increase rate and therefore lower O2 consumption (except for sample 1). This is in agreement with the results for Mg–6Ag in DMEM (+10% FBS), where a lower amount of released H2 was associated with a lower O2 increase rate and therefore higher O2 consumption. These findings agree with those from Wang et al.15, and we may assume that the addition of 10% FBS to the immersion medium did not change the relative biodegradation behaviour of the Mg alloys with respect to each other. However, the behaviour of Mg–6Ag in HBSS was significantly different, possibly due to the fact that both samples showed severe galvanic corrosion during the degradation measurement, which was not observed during the O2 consumption measurements.

Thus, when excluding Mg–6Ag in HBSS, the apparent correlation of the O2 increase rates with the H2 evolution rates indicates that lower amounts of released H2 were associated with higher amounts of O2 reduction. These results are shown schematically in Fig. 7. Wang et al. showed that the relative behaviour of O2 consumption in relation to H2 evolution can be translated to that of the degradation rate, meaning that more slowly degrading alloys will result in higher amounts of O2 being consumed15. However, when assessing the material surface after our experiments (Supplementary Fig. 5), the surfaces of samples in DMEM appeared more degraded than those in HBSS, especially for the Mg–6Ag samples. This is in contrast to the H2 evolution-based degradation rates observed in Fig. 5. Degradation rates determined from H2 evolution measurements and weight loss of the samples have previously been found to vary, with the difference varying between HBSS and DMEM, as well as for pure Mg, Mg–10Gd and Mg–2Ag22. Notably, Marco et al. found that the degradation rate of fast corroding Mg-2Ag in DMEM, as determined from H2 evolution, was 3–4 times lower than that measured using weight loss. We speculate that a similar discrepancy may be present in the present study, in particular for Mg-6Ag. Thus, based on these results we may speculate further that during higher levels of Mg alloy corrosion and for certain Mg alloys (Mg–6Ag), the ORR is increasingly dominant in comparison to the HER, resulting in larger differences between H2 evolution-based degradation rates and those determined by weight loss. Consequently, concurrent in situ measurements of volume loss using e.g. in situ (nano) computed tomography23,24,25 and O2 and H2 evolution should be undertaken to determine the mechanisms of the degradation in conjunction with the gas evolution in detail. It needs to be noted, that the comparison of O2 and H2 measurements in this study may be influenced by the difference in the experimental setup, and particularly the difference in medium volume to specimen surface area (V/A) ratio may have had an influence on the diffusion of ions and therefore the degradation process26. However, due to the short time scale of the experiment, a depletion of ions for example is unlikely, therefore, the relative comparison of corrosion rates based on H2 measurements was deemed acceptable.

Fig. 7: Schematic drawing of the observed inverse relationship between ORR and HER activity.
figure 7

a When H2 evolution is high, gas bubbles on the Mg alloy surface will hinder access of O2 to the sample surface and lower the ORR. b Intermediate stage. c High rates of O2 consumption are related to lower H2 evolution. The study results indicate that higher ORR may be related to the Mg–6Ag alloy in particular and increased degradation rates for other alloys.

Overall, the imaging method relying on O2-sensitive nanoparticles used in this study provides similar results as microsensors used for localized measurements in other studies14,15. Moreover, an advantage of the nanoparticles is the ability to measure O2 concentration, both spatially and temporally resolved, which is not possible using microsensors.

When considering the evolution of O2 over time, it is apparent that in particular, Mg-6Ag might lead to persistent hypoxia well below 5% O2 in HBSS, which could have a significant impact on the healing processes during in vivo degradation27. Future research should focus on longitudinal degradation experiments over longer time scales of several weeks in complex cell culture media and with the addition of proteins, to attain more conclusive findings in relation to in vivo implant degradation.

We demonstrated the use of luminescent, O2-sensitive nanoparticles in combination with ratiometric imaging to study O2 reduction caused by Mg implants during the first two hours of degradation. The nanoparticles showed good sensitivity over the course of the experiment and enabled spatiotemporal analysis of O2 dynamics during implant degradation. The O2 concentration dynamics exhibited an initial strong decrease, which was inversely correlated to the metal degradation rate, as measured via pressure changes induced by hydrogen gas evolution. The O2 reduction was alloy and immersion medium dependent, although similar relative trends for the alloys could be observed in both media. However, in the future, the evolution of both O2 and H2 concentration needs to be measured concurrently with the volume loss, e.g. by means of in situ computed tomography, to ascertain the role each play during the degradation of different Mg alloys.

Methods

Fabrication of magnesium alloy discs

Discs (Ø 9 mm, height 1.5 mm) of pure Mg, Mg–5Gd and Mg–6Ag were extruded, as described in refs. 28,29, and cut. The extrusion parameters and chemical composition of the materials are summarized in Table 2, as well as the resulting grain size.

Table 2 Summary of material parameters for Mg, Mg–6Ag and Mg–5Gd as used in this study.

Fabrication of O2-sensitive nanoparticles

The O2-sensitive nanoparticles were fabricated as previously described17,18. Briefly, 1.5 mg of the O2-sensitive indicator Platinum(II) meso(2,3,4,5,6-pentafluoro)phenyl porphyrin (PtTFPP; Frontier Specialty Chemicals, USA), 1.5 mg of the reference dye Macrolex® Fluorescence Yellow 10GN (MY; Kremer Pigmente, Germany) and 100 mg styrene-maleic anhydride copolymer (with 8% maleic anhydride, MW: 250.000 g/mol; XIRAN®; Polyscope, Netherlands) were dissolved in 10 g tetrahydrofuran (THF; Sigma-Aldrich) and the mixture was rapidly poured into 100 mL strongly stirred distilled water. After evaporation of the THF, the particle suspension was maintained at 60 °C until a particle concentration of ~10 mg/mL was reached. Both the reference and the O2-sensitive dye can be excited in the spectral range of 400–475 nm, inducing an O2-dependent luminescence with peak emission at 650 nm, whereas the reference dye emits O2-independent fluorescence in the range of 475–550 nm.

Imaging setup and acquisition

The O2 imaging was performed by using a ratiometric camera system19 consisting of a digital single-lens reflex camera (EOS 1000D, Canon, Japan) mounted with a macro objective (Macro 100 f2.8 D, Tokina, Japan) along with a 530 nm long pass filter (Uqgoptics, UK). For the excitation of the O2-sensitive nanoparticles, a custom-made blue LED lamp (445 nm, with a bandpass filter) was used. Both the camera and LED lamp were placed inside a cell culture incubator and were controlled by an image acquisition software “look@RGB” (http://imaging.fish-n-chips.de). The software allowed the triggering of the LED lamp and image acquisition at specific time intervals and split the acquired RAW images into separate red, green and blue channel images for further image analysis.

Calibration of O2-sensitive nanoparticles in immersion media

The O2-sensitive nanoparticles were mixed with Hanks’ balanced salt solution with CaCl2, MgSO4 and NaHCO3 (HBSS, Sigma-Aldrich) or Dulbecco’s modified Eagle’s medium (DMEM with 4.5 g glucose and pyruvate; Gibco) in equal volumes resulting in a 5 mg/mL O2-sensitive nanoparticle solution. A drop (20 µL) of this solution was placed in a 24-well plate and a glass coverslip (Ø 10 mm) was placed on it. The well plate was placed under the imaging setup inside an incubator at pre-set defined O2 gas concentrations (21%, 15%, 10%, 5% and 1%). Another 24-well plate with 500 µL of DMEM or HBSS was connected to a commercial O2 measuring device (Oxygen Sensor Spot SP-PSt3-NAU with Fibox 4, Presens, Germany) placed inside the incubator and calibrated according to the manufacturer’s procedure. After setting the defined O2 concentrations of the incubator, the DMEM or HBSS was allowed to equilibrate with the incubator O2 concentration. When no changes in the O2 concentration in DMEM or HBSS was measured by the commercial O2 measuring device for at least 2 hours, imaging of the O2-sensitive nanoparticles with DMEM or HBSS was commenced. To reach O2 concentrations <1%, 10 mg sodium sulfite was added to the solutions followed by image acquisition. Red (O2 dependent) and green (O2 independent) channel images acquired for calibration were processed using the freely available software ImageJ30. The ratio of red to green channel images was obtained by using the Ratioplus plugin in ImageJ to obtain the mean ratio for a specific region of interest.

Imaging O2 consumption of Mg alloy discs

Discs of pure Mg, Mg–6Ag and Mg–5Gd were placed in individual wells of a 24-well plate and 20 µL of O2-sensitive nanoparticles in HBSS or DMEM were placed onto the surface of each disc. Immediately thereafter, a coverslip (Ø 10 mm) was placed over the drop to ensure the uniform spreading of the solution. As a control, 20 µL of the respective solution was added to a well without metal discs. The well plate with the discs and control was then placed under the imaging setup inside the incubator, and image acquisition commenced at an interval of 30 s over 2 h. The complete procedure of adding the solutions, mounting the coverslip and starting the imaging acquisition was performed in approximately 1 min. During image acquisition, the incubator O2 concentration and temperature were maintained at 21% and 37 °C, respectively. A total of three independent image acquisitions were performed using all the disc types. Ratio images of the acquired images were obtained (as described in the section “Calibration of O2-sensitive nanoparticles in immersion media”) and converted to O2 images using the calibration data (obtained in the section “Calibration of O2-sensitive nanoparticles in immersion media”) using the curve fitting function in ImageJ.

Quantitative analysis of O2 consumption

Based on the calibrated O2 images, data were extracted for each disc individually as 32-bit tiff stacks using Fiji/ImageJ31. All subsequent image processing analysis was performed in Matlab 2020a (Mathworks Inc., USA). In order to assess the mean O2 consumption as a function of the distance from the disc centre, areas-of-interest (AOI) consisting of concentric rings of ten-pixel widths were applied to the image stacks and the O2 content within each AOI was evaluated. This evaluation is shown in Supplementary Figs. 1 and 2.

k-means clustering was used to classify the data into two to three different segments: decrease, slow increase, and—where applicable—fast increase. To this end, the data was coarsened using a forward-backward filter including 20 data points, and the data gradient was calculated. k-means clustering with k = 2 or 3 was then performed on the data. In most cases, this allowed for the automated classification of the data. As the initial O2 consumption was very fast in most cases, we were only able to fit a linear function to the slow increase in O2 concentration.

Computational modelling of O2 diffusion and consumption

To evaluate the influence of both the diffusion of O2 from the edges of the specimen and its consumption on the Mg alloy surface on the measured O2 concentration, a computational model was implemented in COMSOL Multiphysics 6.0 (COMSOL AB, Stockholm, Sweden). Assuming the rotational symmetry of the discs, a 2D rectangular geometry was implemented of 0.315 mm height and 4.5 mm length (see Fig. 4), which represented the surface film of the medium on the alloy surface. The height was determined by assuming a volume of 20 µL medium was evenly spread on a perfect disc with a diameter of 9 mm. Within the surface film, the diffusion of O2 was modelled as

$$\frac{{\partial c_{O_2}}}{{\partial t}} = D\nabla ^2c_{O_2}$$
(4)

with \(c_{O_2}\)the O2 concentration and \(D = 3.24 \cdot 10^{ - 5}\)cm2/s its diffusion coefficient in water. A no-flux boundary condition was assumed at the top border of the rectangle, where the inert coverslip would interface, and radial symmetry was assumed at the central boundary. At the outer boundary, a constant concentration equalling the O2 concentration at 37 °C of 21% and therefore \(c_{O_2,atm} = 8.25 \cdot 10^{ - 3}\)mol/m3 was set. Finally, at the lower boundary representing the specimen surface, a surface reaction according to an inward flux \(N = - kc_{O_2}\) was defined based on the ORR. This definition represented a simplified case, in which the ORR rate does not depend on the degradation of the Mg alloy. For a comparison with the experimental data, the mean \(c_{O_2}\)in the part of the rectangle was evaluated that corresponded to an inner diameter of 3 mm in the centre of the disc.

Comparative H2 evolution measurements

Pure Mg, Mg–6Ag and Mg–5Gd discs were ground on SiC paper down to 4000 grit and immersed in approximately 17 mL of HBSS or DMEM+10%FBS in glass vials. Between two and four discs per material were investigated. Between two and four discs per material were investigated. The discs were placed in a sample holder that was inserted into the glass vial lid such that the immersion started once the vial was closed. A pressure sensor attached to another glass vial, which was connected to the lid via a tube, was used to measure the pressure over 16 h during the degradation experiment. Based on the pressure change, and the assumption that the increase in pressure relates directly to the degradation of Mg, the degradation rate was determined. Overall, the average degradation rate and its standard deviation for the three Mg alloys and two solutions were calculated and plotted in Jupyter Notebook (Python 3).