Studying the onset of galvanic steel corrosion in situ using thin films: film preparation, characterization and application to pitting

This work reports about a novel approach for investigating surface processes during the early stages of galvanic corrosion of stainless steel in situ by employing ultra-thin films and synchrotron x-radiation. Characterized by x-ray techniques and voltammetry, such films, sputter deposited from austenitic steel, were found representing useful replicas of the target material. Typical for stainless steel, the surface consists of a passivation layer of Fe- and Cr-oxides, a couple of nm thick, that is depleted of Ni. Films of ≈4 nm thickness were studied in situ in an electrochemical cell under potential control (−0.6 to +0.8 V vs Ag/AgCl) during exposure to 0.1 M KCl. Material transport was recorded with better than 1/10 monolayer sensitivity by x-ray spectroscopy. Leaching of Fe was observed in the cathodic range and the therefor necessary reduction of Fe-oxide appears to be accelerated by atomic hydrogen. Except for minor leaching, reduction of Ni, while expected from Pourbaix diagram, was not observed until at a potential of about +0.8 V Cr-oxide was removed from the steel film. After couple of minutes exposure at +0.8 V, the current in the electrochemical cell revealed a rapid pitting event that was simultaneously monitored by x-ray spectroscopy. Continuous loss of Cr and Ni was observed during the induction time leading to the pitting, suggesting a causal connection with the event. Finally, a spectroscopic image of a pit was recorded ex situ with 50 nm lateral and 1 nm depth resolution by soft x-ray scanning absorption microscopy at the Fe L2,3-edges by using a 80 nm film on a SiN membrane, which is further demonstrating the usefulness of thin films for corrosion studies.


Introduction
The present work represents to the best of our knowledge the first in situ study of galvanic corrosion using few nm thick steel film as replica of the bulk steel surface. Employing synchrotron x-radiation, this approach allows tracing material loss due to corrosion with extraordinary sensitivity making it possible to even trace and analyze an individual pitting event.
Galvanic corrosion occurs when different metals are coming into electrical contact with one another in wet, corrosive environment such as sea water, with destructive consequences for ships, bridges and other maritime constructions. It is caused by the difference in electrochemical potential between metals having different nobility. The more noble metal acts as cathode where some species will be reduced. The less noble metal, acting as anode, will be oxidized leading to corrosion, i.e. dissolution of material and/or chemical transformation of the alloy [1]. Metallic alloys such as steel are macroscopically homogeneous mixtures of elements with different nobility, but on a microscopic scale chemical/structural inhomogeneities, when exposed to corrosive environment, lead to local galvanic corrosion such as pitting. Pitting, the local loss and destruction of material, commences on a microscopic scale, but upon expansion eventually compromises the integrity of metallic engineering constructions [2]. The economic loss due to galvanic corrosion is substantial [3].
In the case of stainless steel (SS), corrosion protection is achieved by an ultrathin metal-oxide film of ≈2 nm thickness. Hindering electrical transport and material diffusion, the film acts as barrier, in this way preventing the galvanic corrosion process [4][5][6]. But the protection is not perfect. The cause, mechanism and progression of the breakdown of this ultra-thin film and the microscopic processes involved at the onset of corrosion are subject of intense research activities [7]. A thorough understanding of the cause, onset and atomistic mechanism of the destruction of the oxide film requires monitoring the process in situ, i.e. studying the breakdown of the passive layer in contact with the electrolyte as a function of electrode potential on the atomic scale.
Obtaining in situ information about structural, chemical, and compositional changes at the very onset of corrosion in the passive surface region constitutes a challenging task. Relevant processes happen on the sub nm-scale while the surface is buried under electrolyte. Techniques are required that (a) allow penetrating a comparatively thick (several μm) electrolyte layer and (b) analyzing sensitively a comparatively thin (<3 nm) surface region of the steel with atomic resolution. Some of the most powerful surface-sensitive, element specific techniques such as photoelectron spectroscopy (PES) cannot be applied in situ under realistic conditions, i.e. under the presence several μm thick electrolyte [8]. A review of some surface characterization techniques applied to steel corrosion has been published recently [9].
X-rays provide the necessary penetration power to reach the steel surface through realistic electrolyte layer thickness [10]. A useful review of x-ray techniques for ex situ and in situ studies has been published already more than 25 years ago [11] and recently grazing incidence diffraction [12] and small angle scattering [13] were used to provide structural information about corrosive processes in the near-surface region. However, the high penetration power becomes a disadvantage when trying to selectively probe within the first few nanometer of the steel surface with high structural and chemical sensitivity since the overwhelming signal from the bulk masks the weak signal from the surface.
To circumvent this problem, Cr-Ni-Fe alloy thin films with a composition close to stainless steel AISI 304 are used here as substitutes for the surface region of bulk steel. This permits investigating the onset of the corrosion process in situ using x-ray emission spectroscopic techniques. X-rays are conveniently used to probe the steel thin film below an electrolyte layer of 10-20 μm thickness. Because Cr, Fe and Ni Kfluorescence originates exclusively from the alloy film and the otherwise overwhelming metal signal from the bulk is absent, the accuracy of the x-rays techniques allows tracing minute structural and compositional changes in the thin film under potential control in the presence of the electrolyte. This paper first reports preparation and characterization of composition, structure and chemistry of ultra-thin (4 to 80 nm) films. Composition, thickness and structure of the films were analyzed by x-ray reflectivity (XRR), x-ray fluorescence (XRF) spectroscopy and x-ray powder diffraction (XRPD). Xray standing waves (XSW) [14] revealed, characteristic for steel [7,[15][16][17], a segregated surface region. X-ray absorption near edge structure (XANES) measurements were used to the probe the local coordination chemistry and oxidation states of Cr, Fe and Ni in the surface and sub-surface region. The electrochemical behavior of two slightly different alloys was characterized by linear sweep voltammetry in 0.1 M H 2 SO 4 and characteristic differences displayed by the bulk steel material were reflected in the behavior of the thin films.
A thoroughly characterized 4 nm thin film was then used as a realistic 'model-steel surface'. It was exposed to 0.1 M KCl, since the increased sensitivity of steel to pitting in the presence of Cl-ions is known since long time [20][21][22], and studied in situ by x-ray spectroscopy. The potential was adjusted from −0.6 to 0.8 V vs Ag/AgCl, reaching from hydrogen evolution into the trans-passive region of steel [18,19]. Stripping/dealloying [23] of metals was sensitively resolved and the effectiveness of the Cr-oxide layer as diffusion barrier was demonstrated.
Localized corrosion, in particular pitting is still vividly and controversially discussed [24] and processes occurring during the induction time [25], i.e. the time leading to the event, remain unclear. The sensitivity of the present approach allowed analyzing an individual pitting event in situ and resolving processes during the induction time.

Thin film preparation
Thin films were deposited on Si wafers, covered with natural oxide layer, on Ru/B 4 C multilayer (ML), and on SiN membrane by DC magnetron sputtering (DCMS), using low carbon austenitic AISI 300 series stainless steel (SS) as target material. AISI 304 [26], on which this report is concentrating, and AISI 316 are among the most widely used stainless steels. Both are very similar, except that AISI 316 exhibits higher pitting corrosion resistance due to the addition of 2 to 3% of Mo. The L variant of AISI 304 indicates a slightly lower carbon content (0.03% instead of 0.08% for AISI 304) [26]. The AISI 300 series of steel possesses the face centered cubic (fcc) austenite γ-phase as their predominant polycrystalline structure. Since iron crystallizes at room temperature in the α-ferrite body centered cubic (bcc) structure, the stabilization of the austenite fcc phase in steel requires a sufficient content of Ni (8% to 12% for AISI 304/316). However, austenitic steels such as AISI 304/316 can also contain a certain amount of body centered cubic (bcc) ferrite α/δ-phase depending on production and processing [27,28]. Corrosion resistance is achieved by a sufficiently high Cr content of 16% to 18%.
Multilayers, grown on silicon substrates in the laboratory of the European Synchrotron ESRF in France [29], were used as substrate for determining the metal composition of ultra-thin films depth selectively by the XSW technique [14]. The ML used here is composed of 63 Ru/B 4 C bilayers with a period of 3.91 nm, terminated by a B 4 C layer. It provides an x-ray peak reflectivity of 85% at 8 keV [30].
Films were grown at University Grants Commission, Department of Atomic Energy Consortium for Scientific Research (UGC-DAE CSR) Indore, India, aiming at producing thin films with metal composition and (austenite) phase close to the AISI 304L and AISI 316 target materials. Targets were sputtered for 5 min with closed shutter before starting deposition, which was carried out in a high-vacuum system (base pressure below 2 × 10 −6 mbar) in 10 −2 Pa argon atmosphere under constant Ar flow. Deposition with the substrate held at RT and magnetron power of 200 W produced satisfactory austenitic steel films (see section 3.3.1). Film thicknesses were determined by XRR measurements and subsequently fitting the data based on Parrat's formalism [31] using Parrat32 software [32]. This established the deposition rate to 4.8 nm min −1 ± 5%. The films with a nominal thickness of 3 nm used below were deposited on the multilayer and Si wafers simultaneously. XRPD and Θ-2Θ scans with the momentum transfer normal to the surface were carried out employing a Bruker D8 diffractometer with Cu K α source, recording the scattered beam with a 2D pixel detector. All films produced by DCMS will be denoted in the following as SS 304 or SS 316 to distinguish them from AISI 304 and AISI 316 bulk material.

Synchrotron x-ray measurements
Synchrotron x-ray investigations of structure and composition of the films were carried out at beamlines I08 [33], B16 [34] and B18 [35] at Diamond Light Source, P64 at PETRA III/DESY [36] and ID03 [37] at the ESRF. The metal concentration in the films was determined by XRF spectroscopy at B18. In situ XRF measurements in electrolyte, under potential control were carried out on B16 and ID03. Experiments exploiting XANES and XSW were performed on P64. In all cases, XRF was recorded using sideways mounted energy dispersive solid state detectors (SSDs). K-edge XANES reference spectra for the three alloy metals (Fe, Cr and Ni) and their oxides, obtained in transmission mode using thin foils, had been reported recently [30]. Images of pitting events, utilizing absorption contrast around the Fe L 3,2 -edges, were recorded at the scanning x-ray microscopy (SXM) beamline I08 [33] 2.3. Experimental set-up for in situ x-ray analysis during electrolyte exposure Different versions of electrochemical cells intended for studying solid/electrolyte interfaces by x-rays in situ have been published [38][39][40][41][42][43][44][45][46][47][48][49]. Designs differ quite strongly dependent on the specific purpose and x-ray technique to be used i.e. whether they are intended for x-ray diffraction, x-ray absorption or x-ray emission spectroscopy, also under XSW excitation. The principle design of the cell used in the present work (cf Figure 1) that can be used for XRD and XRF had been published in 1996 [41]. Variants of the design had been used for different applications [43,45,50].
The mounting of the sample in the cell is shown in figure 1(a). Electrical contact to the sample is made by the visible 75 μm gold wire attached to the steel film by silver paint. Both, the gold wire and the silver paint are protected from coming into contact with the electrolyte by Lacomit varnish. The cell is sealed by a 6 μm thick Mylar film stretched over a Kel-F or Viton O-ring. Controlled by a Hamilton syringe pump system the Mylar window is inflated to allow mass transport to/from the sample or deflated leaving a 10-20 μm thick sheet of electrolyte above the sample surface to assure precise potential control during x-ray measurements.
Electrochemical experiments are carried out under the control of a potentiostat/galvanostat (Ivium, CompactStat) with  thin Platinum foil (20 × 2 mm 2 ) as counter electrode and a saturated Ag/AgCl reference electrode. The solutions were prepared from pro analysis grade chemicals and distilled water. Electrolytes used for the studies were not deaerated and exposure to ambient air was not prevented.
For the in situ x-ray investigations described further below, the cell had been mounted with the surface normal either in the horizontal or vertical plane, as shown in figures 1(b) and (c), respectively. The latter orientation (cf figure 1(c)) was chosen at the bending magnet beamlines to optimize the XRF signal, but turned out to be of disadvantage for in situ measurements since at grazing exit the x-ray fluorescence penetrates a relatively thick electrolyte layer and changes in its thickness significantly change the detected XRF intensity (see further below).

Thin film characterization
3.1.1. X-ray powder diffraction. An XRPD pattern from the AISI 304L target is shown in figure 2. The two peaks at 43.5 • and 44.4 • correspond to the (111) and (110) diffraction peaks of the fcc austenite (γ) and the bcc ferrite (α/δ) phase, respectively [51]. The ratio of the γ(111) to α/δ(110) peak area is 3.8 with a width of ≈0.7 • for both peaks. The XRPD result for an 80 nm film deposited with 200 W magnetron power setting on silicon wafer is shown in figure 3. Two peaks at 2θ = 44 • and 44.7 • can clearly be distinguished with a width of ≈0.4 • and ≈0.7 • , respectively and a ratio of the peak areas of 2.0. Compared to the target, the bcc phase is more prominent in the film. However, depth selective XRPD investigation of the structure of polished AISI 304 bulk sample, which we carried out by varying the angle of incidence for the x-rays from the range of total reflection to a few degrees, revealed fcc to bcc ratios varying with depth. Furthermore, it is known that the austenite to ferrite ratio depends sensitively on treatment [27] and composition of steel, in particular the Ni content.
There is also a noticeable shift to higher 2θ angle for the two peaks of the deposited film, i.e., a slight contraction of the alloy lattice parameter of about 1.2% for the fcc γ phase and 0.85% for the bcc α phase in the thin films in comparison to the target. It could be attributed, e.g., to composition, grain size or strain in the film. Notably, there is also some reflected intensity at the low angle side of the peak at 44 • . While there are differences in details, the 80 nm SS 304 film appears to represent a reasonable replica of bulk AISI 304.
The main part of this paper is concentrating on nominally 3 nm thick SS 304 films, from which an XRPD pattern could not be observed. Particle size broadening by three degrees is expected for a 3 nm film which will be massively further increased due to oxidation and metal segregation in the film  Figure 4 shows the XRR data for a SS 304 film grown with 200 W magnetron power used to determine the deposition rate of 4.8 nm min −1 (±5%) by fitting the thickness using the Parratt formalism [31,32]. A lower density surface layer of ≈2 nm that can be attributed to the oxidized film surface [30] had to be included in the fit. Well pronounced thickness oscillations evidence the quality of the film.

X-ray fluorescence analysis.
The composition of the as grown films was investigated in air using XRF at the B18 beamline. Figure 5 shows an XRF spectrum obtained from an 80.0 nm thick SS 304 film. The metal lines were fitted using Gaussians. For a sufficiently thin film, the x-ray fluorescence intensity I E originating from any element E, here Cr, Fe and Ni, can be expressed by I E = I 0 Aρ E σ E α E . Here, I 0 is the incident x-ray intensity and A takes into account all geometrical factors like footprint on the sample, detector solid angle, etc, which were kept the same for all films. The quantities ρ E , σ E and α E are atomic density (in the film), cross section and K α fluorescence probability [52,53], respectively of the specific element (Cr, Fe and Ni). Atomic density ratios of the metal components are thus given by ρ E1 /ρ E2 = (I E1 σ E2 α E2 )/(I E2 σ E1 α E1 ) and are listed for two films of nominally 3 nm and 80 nm thickness in table 1. For comparison, the compositional ranges for AISI 304 were calculated by ρ E1, min /ρ E2, max toρ E1, max /ρ E2, min , where ρ E, min and ρ E, max are the minimum and maximum atomic concentrations of the particular metal for AISI 304 [26]. The obtained values for the thin films are in close agreement with the corresponding metal composition of AISI 304, though the concentrations of Cr and in particular Ni are close to the lower boundaries.
3.1.4. X-ray absorption near edge structure. More information about the chemical composition, in particular regarding oxide formation, was obtained using XANES. For the XANES measurements the beam was impinging on the surface 5 off normal incidence (grazing angle of 85 • ). The ML sample with the SS 304 film was rotated slightly toward the Ge detector such that x-ray Fluorescence was detected with ≈5 • grazing exit from the surface in order to suppress the fluorescence signal from the ML substrate.
Spectra recorded at Cr, Fe and Ni K-edges from the nominally 3 nm SS 304 film on the Ru/B4C multilayer are shown in figure 6. The spectra were fitted using the ATHENA program [54] by a linear combination of reference spectra that had been collected from foils in transmission geometry. Fit results revealed (with an error ±5%) that 84%, 67% and 20% of chromium, iron and nickel, respectively are oxidized. XANES measurements recorded under the influence of XSW [30] had shown that the metals are oxidized mostly in the upper part of the film and metallic below. Using the metal concentrations from table 1, it can be calculated that 66% of the alloy film is oxidized.

Cyclic voltammetry.
Cyclic voltammetry was carried out in 0.1 M H 2 SO 4 in order to investigate the electrochemical characteristics of the thin films in comparison with corresponding bulk steel. Figure 7 shows the first cycles of cyclic voltammograms (CVs) for 80 nm SS 304L and SS 316 thin films in 0.1M H 2 SO 4 and bulk AISI 304L/316 samples under ambient atmosphere. Strong increase in cathodic current below −0.5 V and strong increase of anodic current above 0.9 V is observed for both, thin films and bulk material. In the cathodic range, the increasing cathodic current is mainly caused by three processes, namely (i) reduction of metal oxide, (ii) reduction of oxygen solved in non-deaerated electrolyte [55] and (iii) H + reduction and hydrogen evolution [56]. The anodic current is caused by metal oxidation also leading to dissolution, i.e. dealloying of certain metals in the alloy [23].
Both, the CV of the SS 304L thin film and the CV of the AISI 304L bulk sample show specific feature in the anodic current, characteristic of reduction i.e. metal-oxide reduction and/or metal dissolution. They are labelled by dealloying, since leaching of metal species was observed in this potential range for an AISI 304 bulk sample by atomic emission spectroelectrochemistry [57]. For the SS 304L film, the peak is relatively broad, ranging from ca −0.25 to +0.25 V, in good agreement with an earlier report on bulk AISI 304 [58]. The results for the AISI 304L bulk sample shown in figure 7 are somewhat different. The 'dealloying' peak is narrower, shifted to lower potential and there is an additional, smaller peak present at around 0.7 V, which was absent in subsequent cycles. We do   not have an explanation for the different behavior of the bulk sample, but note that the behavior for the thin film agrees better with published data for AISI 304 [58]. For the SS 304L film, the current becomes cathodic at a potential of ≈−0.4 V. This is about 100 mV more positive than for the AISI 304L bulk sample in figure 7. However, −0.4 V for the SS 304 film agrees very well with the potential reported in [57] (figure 3), below which hydrogen evolution was observed.
For SS 316 and AISI 316 the current voltage plots are featureless in the medium potential range. The only noticeable difference between bulk and thin film is that the current is turning cathodic at ≈100 mV more negative potential for the latter.
It should be noted that there are also quite significant differences in published CVs for AISI 316 bulk samples in sulfuric acid [58,59]. Differences in electrochemical behavior at the very onset of corrosion are not unexpected, we believe, and can generally be ascribed to different history and treatments of samples. This emphasizes the value of thorough surface characterization prior to interpreting electrochemical studies aiming at investigating the early onset of corrosion, which is the motivation of the present work.
Overall, the voltammograms of the SS 316 and SS 304L films show the same characteristic differences as AISI 316 and AISI 304L bulk steel. This proves that specific electrochemical features caused by even minor compositional variation in bulk  steel, here the addition of just 2% to 3% of Mo in AISI 316, are well reproduced in the thin films.
3.1.6. X-ray standing wave measurements. The characterization of the nominally 3 nm SS 304 film by XSW has been published recently [30]. The results are recapitulated briefly in the following because the detailed depth dependent metal composition of the film is important for the interpretation of the in situ investigations further below.
The XSW method utilizes the fact that during Bragg reflection an x-ray standing wave is produced [14,[60][61][62]. The XSW has exactly the same periodicity as the diffraction planes, here the d ML = 3.9 nm bilayer period of the ML. When traversing the Bragg reflection by changing the x-ray energy, the XSW moves inward, normal to the multilayer planes, by d ML /2 = 1.95 nm [14,[61][62][63] (cf figure 8(a)). As result, the K-fluorescence intensities of Cr, Fe and Ni are modulated (cf figure 8(b)).
The XSW results in terms of the normalized net Cr, Fe and Ni K α fluorescence intensity are shown in figure 8(b). The shape of the K α yield curves of Cr, Fe and Ni are quite dissimilar meaning that the distribution of the three metals is not the same within the film. Quantitative analysis [30] provides parameters F c and P c . The parameter P c describes the mean position P of a metal in fractions of the spacing of the XSW (see figure 8(a)) and the parameter F c describes the distribution around this mean position [14]. F c and P c are quite different for the three metals (cf figure 8(b)), because of segregation of Cr and Ni in the film. Both parameters together allow creating a model of the metal distribution in the film as shown in figure 8(c) [30].
About 1 nm and ≈2 nm of the surface region are depleted of Cr and Ni, respectively. This is rather similar to the reported metal distribution in the surface of bulk SS 304 [16,64,65] and in agreement with reports [6,16,64], pointing out that the ≈2 nm passive film on bulk steel is nickel free [7]. According to the XSW derived model, the total thickness of the film is ≈4.3 nm. The increase in thickness of the nominally 3 nm film is understood considering (i) that 66% of the metals in the film are oxidized, as XANES revealed, and (ii) that the density of the oxides is about 50% lower than the metals. The XSW x-ray fluorescence data cannot distinguish between atomic and oxidized metals, but the upper panel of figure 8(c) shows that the metal density in the top 2 nm is reduced. Overall, the determined composition of the film is very similar to the surface composition that had been reported for bulk SS 304 [6,16,64,65].

Thin film corrosion studies using synchrotron x-rays
3.2.1. Ex situ XSW analysis following hydrogen exposure of SS 304 film at −0.6 V. The 4.3 nm SS 304 film on the ML was exposed to 0.1 M KCl at −0.6 V Ag/AgCl under ambient atmosphere for 8 min and characterized (ex situ) again by XSW. No material had been lost during electrolyte exposure, but significant structural changes had occurred in the film. The analysis showed that the film had expanded by (11 ± 3)% due to hydrogen absorption [30].

Cathodic and mild anodic potential range
Exposure in the cathodic potential range was studied at the B16 bending magnet beamline at Diamond Light Source using 9 keV unfocused radiation from the bending magnet. The cell was mounted as shown in figure 1(c) with the vertically well collimated beam incident on the sample at shallow grazing angle of 0.3 • . Diamond Light Source is operated in the 'top-up-mode' and the beam intensity is kept constant to ±1%. The x-ray flux incident on the sample was monitored by an ionization chamber, the signal of which was used to normalize the recorded x-ray fluorescence yield that is strictly proportional to metal coverage.
The steel film was exposed to increasing potentials from −0.5 V to 0.5 V in steps of 50 mV. X-ray fluorescence from the sample was recorded in situ with the sample exposed to electrolyte. With the Mylar window inflated such that the sample was covered by several mm of electrolyte, the sample was exposed to each potential for 4 s and the current in the cell was recorded. After each exposure, the potentiostat was disconnected from the cell, the Mylar foil was deflated with the help of the syringe pump system, and x-ray fluorescence from the sample was measured for 900 s. The results of the measurements, normalized by monitor counts, are shown in figure 9(a). Here and in the following, some yields are multiplied, indicated by 'x', by some factor for allowing meaningful comparison of the metal fluorescence data in one plot.
There is some scattering of the data points with potential because the electrolyte layer thickness, when deflating the Mylar window after each potential step, is not exactly the same. This influences the intensity of the outgoing fluorescence quite strongly because of the grazing emission angle (average angle of about 5 • ). When the electrolyte layer thickness varies between 10 and 20 μm, the fluorescence intensity varies by ±15%, which corresponds to the scattering of the data.
Plotting ratios Fe/Ni and Fe/Cr and Cr/Ni of the fluorescence yields, as shown in figure 9(b), the influence of the changing electrolyte thickness largely cancels and the error is reduced to less ≈±5% for Fe/Cr and Fe/Ni and ≈10% for Cr/Ni. A decrease in the Fe yield, already visible in figure 9(a), becomes much more obvious. There is no discernible change in the Cr/Ni, ratio except possibly a slight increase at 0.2 V, indicative of a decrease in the Ni signal. Figure 9 reveals clearly that iron is lost from the film in the potential range −0.4 to 0.0 V. The decrease in the Fe/Ni and Fe/Cr ratios corresponds to a Fe loss of about 25% and 30%, respectively, i.e. about 1 nm. This amount of Fe lost from the surface renders the film Cr-oxide terminated (cf figure 8(c)). Some Fe may even have leached from the Fe-Cr alloy region below (above the Ni rich layer). Whether there is any loss of Ni and Cr cannot reliably be deduced from these data because of the scattering. A minor increase in the Cr/Ni ratio seems to be indicated above +0.2 V, possibly pointing toward some minor loss of Ni. Figure 10 shows the fluorescence intensity ratios at 0.5 V as a function of exposure time. There is no significant change except after 200 s, where in particular the upturn of the Fe/Ni ratio (and a slight increase in the Cr/Ni ratio) indicates some loss of Ni. The increase of the Fe/Cr ratio also indicates a loss of Cr, though less pronounced.
When comparing the results with the Pourbaix diagrams of Cr, Fe and Ni [66], they are fully understood with respect to Cr. At pH 6.5, chromium oxide Cr 2 O 3 is stable in the whole investigated potential range from −0.5 to 0.5 V and beyond up to 0.8 V.
Iron is stable in its metallic form at −0.6 V (see section 3.2.1). However, Fe is expected to go into solution in the potential range above −0.6 up to 0 V, being stable as hydroxide ('rust') above 0 V. Hence, there seems to be some disagreement with the data that seem to suggest that Fe is stable above −0.6 V, up to −0.4 V, i.e. about 200 mV more positive than suggested by the Pourbaix diagram.
The behavior of Ni seems to be in stark disagreement with the Ni Pourbaix diagram, according to which Ni should be unstable above −0.4 V. In contrast, there is no clear indication that Ni is lost from the film, except possibly after the potential is held for 250 s at +0.5 V.
The seemingly controversial results for Fe and Ni can be understood by considering the structure of the steel film as shown in figure 8(c) and the kinetics of the corrosion process. Iron in the outermost layer of the SS 304 film is oxidized and dissolution as Fe 2+ metal ion must be preceded by the reduction to metallic Fe. XANES data that provided evidence of the cathodic reduction of Fe-oxide at cathodic potential (−0.6 V) have been published very recently [30]. Because Fe-oxide has to be reduced in a first step, the Fe dissolution/dealloying is delayed. It commences significantly only after some time, i.e. after ≈16 s at cathodic potential. The seemingly higher potential necessary for Fe dissolution can be explained by the kinetics of the involved processes with at least two steps.
The nickel in the film is buried at a depth of about 2 nm below Fe/Fe-oxide, Cr/Cr-oxide layer. It is present by 80% in its metallic form and oxide reduction is not really an issue. Dealloying and dissolution is simply hampered by the compositional structure of the film (cf figure 8(c)) that requires Ni to diffuse through the covering Fe-and Cr-oxide layer. Following the dissolution of ≈30% of Fe, the Fe-oxide on the surface is mostly removed when reaching the potential of 0 V, but the Ni is still covered by ≈1 nm Cr-oxide that obviously represents a very effectively barrier against its dissolution. The data suggest minor decrease in Ni coverage at >0.2 V, i.e. some Ni may diffuse through the Cr-oxide film to the surface and subsequently dissolve.
Enrichment of the surface region of bulk steel by Cr and Ni at comparable potential has already been reported [67]. This 'enrichment', as the present results very clearly show, is in reality caused by Fe-oxide reduction, subsequent Fe dissolution and thus depletion of iron.
Exposure of a ≈4 nm SS 304 film was studied in the cathodic range again at the ID03 undulator beamline with the electrochemical cell and the sample oriented as shown in figure 1(b). The beam was focused vertically and horizontally to a size of 40 × 200 μm 2 , respectively by mirror optics, and was incident on the sample at a grazing angle of 2 • .
For this experiment, the potential was changed in the cathodic direction from 0.0 V to −0.6 V in steps of 0.2 V, resting 20 s at each potential with inflated Mylar foil and then recording x-ray fluorescence at open circuit potential for 9 s with deflated Mylar foil. The results are shown in figure 11. Compared with figure 9(a) the geometry chosen for this measurement has practically eliminated the scattering of the data caused by unavoidable variations in the electrolyte layer thickness. A change of the electrolyte layer thickness in the range 10 to 20 μm changes the fluorescence signal intensity by less than ±1%, which is much smaller than the symbol size in figure 11. In addition, the potassium and chlorine K α fluorescence from the 0.1 M KCl electrolyte could be recorded. It is proportional to the electrolyte layer thickness, which helped controlling the thickness to better than ±30%.
The data shown in figure 11 reveal a decrease in the Fe signal by ≈10%, less than 4% loss in the Cr signal and about 5% decrease of the Ni signal. This is qualitatively in agreement with the previous findings, since such minor losses of Ni and Cr in the cathodic potential range were impossible to resolve in the previous experiment because of the scattering of the data. However, it is evident that less Fe has been lost to the electrolyte compared to the previous experiment.
In order to understand this difference, it is important to recall (i) that the film surface is oxidized and (ii) that the electrode potential was scanned in opposite directions for the two experiments. In the first case (cf figure 9), the scan started at −0.5 V in the potential range for the evolution of atomic hydrogen. In near neutral pH solution, as in the present case, hydrogen evolution occurs predominantly via reduction of water molecules [69] and the evolutions increases progressively with increasingly cathodic electrode potential. This produces in a first step surface adsorbed hydrogen atoms that that are in part diffusing into the surface (see section 3.2.1) and aiding the oxide reduction process [30]. Thus, our data suggest that dissolution of iron is promoted by hydrogen induced reduction of Fe-oxide [30] that happens probably in two steps [68]: Once the oxide is reduced, Fe is dissolved more quickly in the potential range above −0.4 V.

3.2.2.2.
Higher anodic potential range Subsequently to the above described cathodic scan, the sample was exposed to anodic potentials from 0.2 V to 0.8 V in steps of 100 mV for 20 s at each potential. The result of the measurements in terms of the recorded Cr, Fe and Ni K α fluorescence yield is shown in figure 12.
The Fe signal is stable with an uncertainty of ±0.4% over the whole 0.2 to 0.8 V range, whereas the Cr signal decreases  slightly by (4 ± 2)% which is hardly noticeable in the plot, but revealed in the data. In contrast, the Ni signal clearly decreases slowly but steadily by (12 ± 2)% over the range from 0.2 to 0.8 V. It should be kept in mind that some decrease of the Ni signal was already indicated in figure 9(b) at 0.2 V, but largely obscured because of scattering of the data. Still, the Ni dissolution is relatively slow, which can be understood by the film structure/composition, as Ni needs to diffuse through the covering Cr-and Fe-oxides. The results show that the experimental set-up allows to determine changes in metal coverage of ±8 pm, which corresponds to about 3% of a monolayer.
With the potential kept at +0.8 V, the time dependence of the fluorescence signal of the three metals is shown in figure 12(b). During nine seconds for each XRF measurements, the window was deflated. The Fe signal shows a small drop after 80 s with the signal remaining (3 ± 1)% lower from 200 s onward for the rest of the time. The Ni and Cr signals decrease continuously, almost at the same rate. However, plotting the ratio of the Ni yield over the Cr yield as shown in figure 13 reveals that during the first 400 s the Ni/Cr ratio is increasing meaning that the amount of Cr in the film decreases faster than Ni, with this trend reversing afterwards. Cr 2 O 3 is at the boundary to (weakly soluble) CrO 4 2− at 0.8 V [66], which accounts for the loss in Cr. At 400 s the amount of Cr has reduced by 30% and inspection of figure 8(c) reveals that roughly 30% of Cr, with at least 84% in form of Cr-oxide, had been located above the Ni rich region. Ni is unstable from −0.4 to beyond 1 V [66], but leaching is obviously largely prevented by the covering Cr 2 O 3 . The dissolution accelerates, once the Cr-oxide on top of the Ni has been removed which is proof of the effectiveness of Cr 2 O 3 as diffusion barrier.
According to the Pourbaix diagram [66], at 0.8 V Fe is passive in the form of FeO(OH) and figure 12(b) shows that the amount of Fe in the film, despite the fact that it is alloyed with Cr and Ni, the amount of which continuously decreases, remains indeed (almost) constant. The small, 3% step-wise decrease of the Fe K-fluorescence signal noticeable at 200 s, marked by an arrow in figure 12(b), will be discussed below.  The data reveal a pitting event after 155 s which is shown enlarged in the inset. As shown in more detail in the inset of figure 14, it lasts about 1 s, with a slower increase and more rapid decline in current. This is typical for metastable pitting, i.e. pit formation and rapid repassivation [21,70]. The total charge release in the pitting event is about 0.5 μAs, i.e. about 3 × 10 12 e 0 , which is rather typical for such an event [71]. This charge would correspond to 1.5 × 10 12 Me 2+ ions going into solution. The result of the subsequent XRF measurement after 200 s (cf figure 12(b)) shows a decrease in the Fe signal by 3%. Given the 4 nm film thickness with an atomic density of 86 nm −3 , containing about 70% Fe, and the x-ray illuminated area of ≈0.2 mm 2 , this corresponds to a loss of 3% of a total of 4.8 × 10 13 Fe atoms contained in the probed volume meaning that 1.4 × 10 12 Fe atoms have been stripped. This number agrees well with the invested charge, i.e. 1.5 × 10 12 stripped Me 2+ ions. Whether and how much Cr and/or Ni were lost in this pitting event can unfortunately not be deduced from the data because any specific loss during the pitting event it is masked by the general decline of the Cr and Ni signals in the course of the exposure.
It is widely believed that pitting may be caused or that it is at least influenced by multiple critical factors [21]. Defects such as microcrystalline grain boundaries, dislocations, ferrite/austenite domains, impurities etc are discussed as impacting pit formation. Separating the various influences is a tremendous task. Thus, it is important to note that in the present case the corrosion/pitting of a rather smooth, nano-crystalline steel-alloy surface is studied. This means that several of the above listed extrinsic factors that are discussed as influencing or causing pitting are absent in the present study and can be excluded as possible cause.
A particular and remarkable feature of pitting is the seemingly stochastic nature of the events [25]. Rapid events of pit formation are preceded by comparably long time intervals, i.e. induction times, as it is also observed here. Phenomenological and stochastic models have been put forward for describing pitting behavior, but there is until now little concrete knowledge about processes, if any, occurring during this induction time. Here we show (cf figure 12) that the pitting event is preceded by a characteristic loss of about 20% and 15% corresponding to a loss of about 0.1 nm and 0.04 nm, respectively of Cr and Ni, i.e. Cr being lost at a higher rate. This behavior is reminiscent of the percolation model of pit initiation in stainless steel [72], in particular discussed by Williams et al [73] for a binary FeCr alloy. They state in their 1991 paper [73] that if 'there is a small but finite dissolution rate for chromium atoms, one obtains a mechanism for the triggering of pitting corrosion of stainless steel that is consistent with experimental studies'.
Demonstrating the usefulness of the thin film approach, pitting was also investigated by SXM at the I08 beamline at Diamond Light Source using a thin film on a SiN membrane and employing absorption contrast imaging around the Fe L 2,3edges. A 80 nm thick SS 304 film was chosen as it provided good absorption contrast. It was exposed for 300 s to 0.1 M KCl at a potential of 0.7 V, i.e. 100 mV lower than for the previously described pitting experiment. The sample was prepared ex situ and subsequently mounted on a standard holder provided by the beamline [33] for SXM measurement. The film was scanned with a resolution of 50 nm and at each pixel an absorption spectrum across the Fe L 2,3 -edges was recorded, as shown in figure 15. An absorption contrast image taken at the L 3 -edge energy of (white line at 710 eV) a characteristic pit is shown in the inset.
The pit is characterized by a rather circular shape with a diameter of 3 μm. The difference in the normalized optical density (absorption contrast) outside (background region) and inside the pit (on pit) reveals that 10% Fe has been removed in the pit, i.e. the depth of the pit is about 8 nm. The walls of the pit appear to be sharp, giving the pit a cylindrical shape. With the above given volume density of 86 nm −3 the material loss can thus be calculated to be around 5 × 10 9 Fe atoms.

Conclusion and outlook
Because of their high penetration power, x-rays are ideally suited for obtaining in situ information about structural, chemical and compositional changes of materials in various environments that are in-transparent by other probes. However, when trying to follow the corrosion processes in the surface of bulk stainless steel in aqueous electrolytes on the sub-nmscale, x-rays have a downside. Deeply penetrating x-rays give rise to an overwhelming x-ray fluorescence signal from the bulk of the steel. We reported here an approach to circumvent this problem, using a steel thin film that resembles the surface region of bulk steel. In this case, there is no overwhelming signal coming from the bulk and the analytical power of x-ray techniques can fully be exploited. This approach will work only if the thin film genuinely resembles the surface of steel.
The presented results show that steel films can be grown by DCMS with structure and composition quite similar to the steel used as target material. The ultra-thin (≈4 nm) CrFeNialloy films are shown to be segregated with ≈1 nm Fe-oxide film on top of Cr-oxide rich region with mostly metallic, Ni rich alloy ≈2 nm further below. This structure closely resembles the shallow surface region of stainless steel [4][5][6] that is responsible for its corrosion resistance. Such ultra-thin films, once thoroughly characterized, allow highly sensitive in situ x-ray analysis during the onset of corrosion, yielding precise quantitative information about compositional changes. This is demonstrated here by potential controlled exposure of an ultra-thin (≈4 nm) film to 0.1 M KCl from −0.6 V Ag/AgCl to 0.8 V Ag/AgCl . The presented results show that (a) Stripping of iron in the cathodic region is retarded. This can be understood, considering that Fe-oxide must be reduced first. (b) Fe-oxide reduction is probably aided by atomic hydrogen. (c) Leaching of Ni seems hindered by the covering oxides and accelerates upon removal of Cr-oxide, which is known as very effective diffusion barrier. (d) The sensitivity of the x-ray analysis when using a thin film is high enough to follow an individual pitting event. (e) The induction time, leading to a pitting event with a loss of 1.4 · 10 12 Fe atoms, is characterized by loss of Cr and Ni, which is suspected having initiated the event.
(f ) The loss of Cr and Ni during the pitting event could not be resolved. This should be possible when measuring at shorter (few s) time intervals.
Overall, the observed behavior of Cr, Fe and Ni can be understood by the corresponding Pourbaix diagrams [66], however, only when considering reaction dynamics and kinetic limitations imposed by the film structure and composition.
Using thin films on membranes, pitting can also be investigated with high resolution, high chemical and structural sensitivity by scanning x-ray microscopy. This was demonstrated here by ex situ imaging a pit in a 80 nm SS 304 film on a SiN membrane using absorption contrast at the Fe L 3 edge.
The present study was performed with an electrochemical cell, allowing x-ray grazing incidence excitation and in situ x-ray fluorescence detection. The results show that grazing exit detection, which in principle can also strongly enhance the surface sensitivity when using bulk samples, has a serious disadvantage as unavoidable variations in the electrolyte layer thickness introduce major changes in the x-ray fluorescence signal that seriously limit the quantitative accuracy of the method. Thus, normal exit emission is the method of choice and with a better detection scheme-the present study was performed with a single-element SSD -both, time resolution and sensitivity can be significantly improved, with the exciting prospect of resolving individual pitting events in greater detail.