Advanced Non-Destructive in Situ Characterization of Metals with the French Collaborating Research Group D2AM/BM02 Beamline at the European Synchrotron Radiation Facility

The ability to non-destructively measure the structural properties of devices, either in situ or operando, are now possible using an intense X-ray synchrotron source combined with specialized equipment. This tool attracted researchers, in particular metallurgists, to attempt more complex and ambitious experiments aimed at answering unresolved questions in formation mechanisms, phase transitions, and magnetism complex alloys for industrial applications. In this paper, we introduce the diffraction diffusion anomale multi-longueur d'onde (D2AM) beamline, a French collaborating research group (CRG) beamline at the European Synchrotron Radiation Facility (ESRF), partially dedicated to in situ X-ray scattering experiments. The design of the beamline combined with the available equipment (two-dimensional fast photon counting detectors, sophisticated high precision kappa diffractometer, a variety of sample environments, continuous scanning for X-ray imaging, and specific software for data analysis) has made the D2AM beamline a highly efficient tool for advanced, in situ synchrotron characterization in materials science, e.g., single crystal or polycrystalline materials, powders, liquids, thin films, or epitaxial nanostructures. This paper gathers the main elements and equipment available at the beamline and shows its potential and flexibility in performing a wide variety of temporally, spatially, and energetically resolved X-ray synchrotron scattering measurements in situ.


Introduction
The race for miniaturization, motivated by both the observation of new promising properties when scaling down devices and structures and the need to understand the local phenomena in classical devices and materials, led to an unprecedented race in improving characterization techniques for local probing. New avenues for material engineering are emerging thanks to a better understanding of the local heterogeneity. This is due to our ability to follow physical and chemical phenomena taking place in these devices when exposed to external forces, reactions, or simply ageing. While the majority of these techniques still requires specific sample preparation and very restrictive environments, X-ray scattering This paper gives an overview of the D2AM beamline, aiming to show its capabilities with respect to the characterization of metallic materials, and it offers a detailed instrumental and technical database for researchers to plan experiments. A detailed description of the beamline from the source to the sample will be described, followed by the main equipment used at the D2AM beamline and its specifications. The last part is dedicated to the sample environments frequently used at the beamline for in situ (or operando) measurements and their specifications.

Primary Optics
The D2AM beamline, a French CRG (Collaborating Research Groups) beamline, was built in the 1990s on the BM02 port at the ESRF in Grenoble, France. A polychromatic X-ray beam is produced when the accelerated electrons travel through a bending magnet of 0.8 T. It is characterized by a vertical divergence of 0.2 mrad. Whereas, the effective horizontal divergence is determined by the projection of the curvature of the bending magnet, and is equivalent to 3 mrad. Due to this intrinsic and geometrical divergence, and in order to collect the maximum flux on the sample, the X-ray beam is focused back onto the sample by the X-ray optical elements mounted in the optics cabin. Figure 1 displays the beam trajectory as well as the optical elements installed in the beamline optics cabin used for collimating and directing the X-rays towards the sample. An initial water-cooled mirror of 1.1 m length, mounted in the horizontal plane 26 m away from the source, allows a vertical reflection of the incident polychromatic beam. The surface of the mirror is coated with two strips of 400 Å-thick and 30 mm-wide Rh and Pt along the whole length of the mirror. The incidence angle of the first mirror is set slightly below the critical angle of total reflection for a wavelength λ to reject its λ/3 harmonics. This rejection is necessary to prevent the overlapping of both contributions. Being fixed to two benders, the mirror can be cylindrically bent, depending on the required energy, in order to parallelize the reflected beam. Hereafter, the beam is monochromatized, at an energy ranging from 5 to 40 keV, by being diffracted from an initial Si (111) water-cooled crystal mounted 1.93 m downstream of the first mirror. The monochromatic beam then hits a second Si (111) crystal, mounted on a specific sophisticated mechanical system, leading to an energy resolution ∆λ/λ = 2 × 10 −4 . The latter is designed to allow not only tilt and position adjustment of the second crystal but also its bending in order to focus the beam sagittally. To avoid anticlastic effects while bending [9,10], the second crystal of the monochromator was locally backside-etched to shape segments of 700 µm-thick Si, separated by non-etched ribs with 400 µm widths and 3 mm thicknesses. A rib-free central zone 5 mm in width is mainly used to deliver a uniform, focused beam without the satellites that may be reflected by the inter-rib regions. The tuning of the second crystal is permanently monitored and adjusted using a feedback tracking system where a piezo motor adjusts the Bragg angle of the crystal to maintain the highest diffracted intensity when scanning the energy. Having the rotation axis of the monochromator system set on the surface of the first crystal, together with the available translations of the second crystal, delivers a point-focused fixed exit beam essential for energy scans. It is therefore possible to perform anomalous X-ray scattering by maintaining the illumination on the same spot on the sample. After the second crystal, the horizontally focused monochromatic beam gets reflected, 1.82 m later, downwards by a second mirror identical to the first one. This reflection, coupled with a rotation of the mirror around a horizontal axis perpendicular to the beam direction, puts the beam back on its initial horizontal axis defined by the source. As for the first mirror, a similar set of benders induces an ellipsoidal curvature to the second mirror to focus the beam vertically. Without using any other focusing lenses or mirrors, this optical element configuration delivers a flux of 10 11 photons/s in a 100 µm × 90 µm (horizontal × vertical) focal spot size.
After the second mirror, the beam goes through a pair of slits and travels 10 m before entering an experimental cabin 9 m in length. At the entrance of this cabin, a set of two Si Kirkpatrick-Baez (KB) mirrors are installed and coated with Ir with a roughness less than 20 Å. These mirrors can be moved into or out of the beam. By bending the KB mirrors elliptically, the first mirror (300 × 50 × 15 mm 3 ) focuses the beam vertically while the second one, with a trapezoidal shape (170 × 44 − 15 × 8 mm 2 ), focuses the beam horizontally. At 8 keV, the beam can be focused down to 30 × 30 µm 2 with 10 8 photons/s. This beam size is still higher than the predicted one because of the high roughness of the KB mirrors. A new set of mirrors will be installed in the coming years capable of focusing the X-ray beam to 10 × 10 µm 2 , and it will get to 1 × 1 µm 2 with the implementation of a new X-ray source within the EBS (Extremely Brilliant Source) upgrade program of the ESRF [11]. Besides reducing the beam size on the sample, the use of the KB mirrors filters the beam vibrations that may be induced by the upstream optical elements or external works occurring during beamtime. After a pair of slits and a set of automated Al and Cu attenuation foils, the beam arrives at the sample position. The sample orientation can be dictated by a six-circle diffractometer [12].

Diffraction Diffusion Anomale Multi-Longueur D'onde (D2AM) Endstation
The D2AM diffractometer, illustrated in Figure 2a, is a six-circle diffractometer with a kappa geometry built by the Newport Micro-controle company (Evry, France). A list of its motors, their respective mnemonics, strokes and resolutions is provided in Table 1. Along the vertical z-axis, a tripod-like set of encoded motors are dedicated to adjust the horizontality of the diffractometer as well as its height with respect to the X-ray beam. In addition, two motors allow the translation of the diffractometer perpendicularly to the X-ray beam's direction as well as the rotation around the z-axis.

Motors
Mnemonic Stroke Resolution All rotation axes go through the center of rotation (COR) of the diffractometer. The detector arm is connected to a vertical structure that rotates vertically along del and to a horizontal one that rotated along nu horizontally.
The Mu base that can rotate around the vertical axis supports the kappa sample stage. The latter is composed of three rotational motors: Theta, Kappa, and Phi. On top of Phi, an XYZ translation stage is used for sample alignments using encoded motors. The Chi rotation is based on a combination of the three motors, Phi, Kappa, and Theta, and rotates the sample around the beam axis and maintains the same incidence angle. From the detection side, a motorized structure with two rotations around the vertical z-axis as well as the horizontal y-axis (Delta, Nu) gives access to a wide range of the scattering vector Q values. The only range-limiting parameter may be the sample environment mounted for in situ/operando experiments. All these rotations coincide in a 60 µm sphere of confusion with a maximum load of 20 kg on the sample stage and 50 kg on the detector arm.
The rotations offered by the D2AM diffractometer allow following the diffracted intensity using two different hkl modes: the 4-circles (kappa) and 6-circles (kappapsic) modes. Within these modes, an orientation matrix can be defined by referencing two Bragg reflections, thus, hkl scans can be performed or Bragg reflections with complex orientations can be accessed. Moreover, a sample holder (Figure 2b inset) made of two motorized, crossed cradles (Rox, Roy) and two translations (tox, toy) can be mounted on top of the kappa sample stage, i.e., on top of the theta, chi and phi motors. This configuration offers the possibility of aligning the sample surface, or diffracting planes with respect to the X-ray beam, to an accuracy of a few thousandths of a degree [13] and, thereafter, to perform 3D-RSM under a constant incidence angle (the azimuthal angle). This can be done close to a given Bragg reflection or near the origin of reciprocal space (GISAXS experiments).
Finally, a 3-axis polarization analyzer system can be mounted on the detector arm. It consists of two coaxial rotations: ThetaA for the crystal Bragg angle and DeltaA for the detection angle, and a third rotation (EtaA) that rotates the ensemble to swap between the two polarization configurations. A large variety of analyzer crystals is available; the most commonly used ones are one flat and two curved graphite crystals and one flat germanium crystal. As the incident X-ray beam is linearly polarized in the horizontal plane, a set of polarizer crystals, with a Bragg reflection close to 90 • , can be used to investigate the electronic and/or magnetic order parameters [14].
Currently, the main rotational motors of the D2AM diffractometer (phi, del, nu, mu, kappa, and theta) can be configured, together with the available detectors, to perform continuous scans. In this mode, the motor moves continuously while the detector acquires images in a synchronized manner. The scanning overhead related to the positioning and to the software/hardware communication dead time is, consequently, very small. The advantage of this approach is not only limited to a substantial gain of time (a factor of six), but it extends to offer the possibility of performing new types of exhaustive in situ measurements during very short beamtimes.
Downstream of the diffractometer, a 4 m-long granite table is fixed in the D2AM experimental cabin. Along the beam direction, this table is used for SAXS experiments where motorized sample stages and detector holders can be set up at any position along that table. It can also be used to perform GISAXS with the sample standing on the goniometer and leading to long sample-detector distances [15,16].
On the detection side, a set of three fast photon counting pixel detectors supplements the detection capabilities of the D2AM beamline. These Si-based detectors (S70, D5, and WOS [8] (WAXS Open for SAXS)) were produced by IMXPAD (Now sold by the CEGITECK INNOVATION company under the name REBIRX) and developed with the beamline staff through collaboration with CPPM (Centre de Physique des Particules de Marseille) [17]. They are characterized by a linear counting rate of 2 × 10 5 photons/s/pixel, a dynamic range of 32 bits, and a pixel size of 130 × 130 µm 2 . Their threshold can be tuned over an energy range of 4-35 keV. The pixel number and the active area differs from one detector to the other (see Figure 3). All the active surfaces of the detectors are made of similar modules. The D5 has eight more modules compared to the S70, and is stacked in a column to increase the detection area with an inter module gap of 5 mm for electronic wirings and connections. Both detectors have a frame rate of 100 Hz. Whereas, the WOS, with a higher frame rate of 250 Hz, has 10 modules mounted as shown in Figure 3c (5 rows × 2 columns) in order to maximize the detection area, particularly for WAXS measurements. The horizontal gap between the two modules of the second row is higher than the others to give way for an opening 10 mm in diameter in the active area. On the backside of the WOS detector, a 10 cm exit opening increases the exit angular range. Even though it can be used on the diffractometer to have a large angular range, when installed on the SAXS granite table the WOS can detect WAXS signals and let the transmitted beam go through its opening. The transmitted beam, thus, gets detected by the D5 mounted one to three meters downstream of the sample. Accordingly, this configuration allows for performing simultaneous SAXS/WAXS experiments (Figure 4). These detectors may be fixed on the granite table on motorized z-y translation stages or on the detector arm of the diffractometer that can rotate around the zand y-axes. The sample-detector distance may consequently range between 20 to 5 m or 10 to 2 m for SAXS and XRD measurements, respectively. The weight load and space limitations on the granite table, together with the high weight load capacity and the kappa geometry of the diffractometer, makes D2AM a well-suited beamline for synchrotron in situ and operando X-ray diffraction measurements. Besides the sample environment equipment that can be used from the ESRF instrument pool (heating coils, traction machine, etc.), a variety of sample environments were developed on the beamline with collaborators and scientists to meet specific requirements and needs of the beamline user community.

Sample Environments
A wide variety of sample environments can be installed on the D2AM beamline and benefit from the X-ray scattering advanced characterization techniques for in situ measurements. While beamline users can bring their own equipment, we will limit our discussion in this paper to the most frequently used ones that are always available at the beamline.

"QMAX" Very High Temperature Furnace
For achieving high temperatures, a new furnace ( Figure 5) capable of heating samples under primary vacuum, air, or controlled atmosphere up to 1700 • C was developed at the beamline in collaboration with beamline users [12]. It can be mounted on the goniometer head on the diffractometer, allowing to conduct in situ wide-angle or small-angle measurements under conventional out-of-plane, in-plane, or grazing incidence. The "QMAX furnace" consists of a heating metallic resistor supported by a ceramic plate, 20 mm in diameter, which connects the sample thermally to the heating element. Two domes (Be and PEEK) were specifically made for this furnace. These domes diffract at different angles when crossed by an X-ray beam. Choosing one or the other is based on the required temperature/gas environment, as well as the region of the reciprocal space that scientists would like to explore to prevent parasitic scattering/overlapping of sample-dome signals. Two controlled gas lines were designed and calibrated in terms of flow rate for oxygen and nitrogen. The heating plate and the thermocouples are read and controlled by a Nanodac controller from Eurotherm by Schneider Electric. The furnace can handle a heating rate of up to 50 • C/s with a thermal stability of ±1 • C. According to these characteristics, this furnace is very well-suited for the study of a large number of scientific topics related to the behavior of metals at high temperature (solid-gas reactivity, thermal expansion, phase transitions, phase separations, self-ordering processes, etc.).

Small-Angle X-ray Scattering (SAXS) Furnace
Another furnace, developed in-house together with SIMaP (Science et Ingénierie des Matériaux et Procédés) colleagues, is dedicated to SAXS and WAXS measurements. It is installed on a translational motorized stage inside a vacuum vessel. It is designed to work in a transmission geometry where the beam goes through the sample. Two configurations are available with different opening diameters for scanning larger samples. While the first one ( Figure 6) with an aperture of 4 mm can heat up to 900 • C, the second one, with an opening of 25 mm, can heat up to 500 • C. Controlled by a Nanodac station, these furnaces are used for SAXS and WAXS in situ measurements. De Geuser et al. [18] investigated, using in situ SAXS, the relationship between alloy processing and its chemical properties by studying aging effects on nanostructured precipitations in samples having a composition gradient. Using a similar experimental approach on cold-pressed as-milled powders, Deschamps et al. were able to investigate the precipitation kinetics in as-milled oxide dispersion-strengthened steel powders during heating [19]. Currently, a new SAXS furnace is under development to help achieve temperatures up to 1200 • C.

Cryostat
A cryostat can be mounted on the kappa diffractometer (Figure 7) for low-temperature studies, typically 10 K is achieved under a secondary vacuum using two Be domes. A He gas compressor (ARScryo, Advanced Research Systems, Macungie, PA, USA) is used to cool down the sample where the He is circulated in a closed circuit. A heater head, set below the sample stage, helps to not only regulate the temperature but also to heat up to 800 K. The heating is controlled by a Lakeshore 336 temperature controller (Lake Shore Cryotronics Inc., Westerville, OH, USA). Even though many cables and tubes have to be connected to the cryostat, all the diffractometer translations and rotations are maintained, giving access to all of the reciprocal space and to conduct in situ measurements without instrumental limitations. Grenier et al. observed the Verwey transition in a magnetite ultrathin film grown on Ag that was recently detected, near 120 K, by conducting in situ resonant X-ray scattering [20]. A low-temperature phase transition in a periodic approximant to an icosahedral quasicrystal were investigated by Yamada et al. This is an order-disorder transition accompanied by a lattice distortion from cubic to monoclinic at low T (190 K). The cryostat allowed not only the study of phase transition but also of the pre-transitional fluctuations and their divergence when approaching Tc from high temperatures [21,22]. Even though the mentioned sample environments are the most requested and frequently used at the beamline, other equipment for specific in situ characterization has been used, or can be easily accommodated. For instance, a tensile testing machine (Deben UK Ltd., Suffolk, UK) was installed on the D2AM diffractometer to study the effects of cyclic deformations on the evolution of dislocation structures as a function of grain size and film thickness [23]. New fabrication processes, e.g., additive manufacturing, may also benefit from the in situ X-ray characterization tool. It is now possible, for example, to map the microstructural evolution during the melting and the solidification processes in selective laser melting (3D printing) using X-ray diffraction. A thorough investigation of these processes will help optimize the printing settings for more reliably produced parts. In addition, a hot isostatic pressing (HIP) device may be designed and mounted on the beamline to perform temporally and spatially resolved X-ray measurements in situ. They may also be designed to look into mechanisms involved in processes for improving mechanical properties with sintering powder or achieving a diffusion weld.

Data Treatment and Analysis
The multidimensional data sets recorded at the beamline are treated directly after each measurement, allowing one to drive the experiment on the fly. Python-based short scripts were written by beamline scientists to perform specific treatments, such as the conversion from angular to reciprocal space, azimuthal integrations and correction of distortions induced by the detectors' geometries based on the PyFAI (Fast Azimuthal Integration using Python) suite [24], data visualization (3D maps, cuts), and fittings. Due to the specificity and complexity of the conducted experiments, these scripts undergo continuous minor or major modifications depending on the experimental configuration and the information that needs to be accessed. The Jupyter Notebooks platform is used to keep track and document the data treatment process. The beamline is, thus, building a modular python-based software that can be adapted to each experiment, creating a data treatment electronic logbook that helps to process the data in future similar experiments. With the variety of experimental configurations and experiments that are being conducted at the beamline, this modular approach appears to be best suited for performing fast and efficient online data analysis and to meet the challenges of big data.

Conclusions
The compactness and high efficiency of in situ devices, combined with the high load capacity of the D2AM precise kappa diffractometer and the three fast photon-counting detectors, make the beamline a very powerful tool for advanced, in situ, structural, and non-destructive characterization. This approach will provide more insight into the kinetics of specific phenomena such as phase transitions, precipitations, oxidation, corrosion, diffusion, and doping. This approach will contribute to understanding the structural evolution under internal and external, varying conditions and reactions, such as new alloys and new fabrication technologies (e.g., additive manufacturing) and how they may be optimized and designed. Even though the available technology offers great opportunities for the fine investigation of matter, a concurrent synchrotron source upgrade (EBS) is taking place to bring the most brilliant synchrotron X-ray source. With the EBS program, the D2AM beamline will deliver micrometer beam-spot size for in situ micro structural imaging and higher resolution mappings. In addition, an increase in X-ray beam coherence will open a completely new realm of possibilities in terms of imaging, both spatially and temporally, the structural parameters in materials. New devices will be acquired and developed to take advantage of the new source characteristics. At the D2AM beamline, new KB mirrors with low surface roughness, new monochromator designs for collecting higher intensities in the focused beam, and new photon counting detectors are under development and will equip the beamline after 2020 for faster experiments and higher resolution mapping. Funding: Part of the development of the beamline was made within the framework of the QMAX Project No. ANR-09-NANO-031, funded by the French National Agency (ANR) within its Nanosciences, Nanotechnologies, and Nanosystems program (P3N2009), as well as the EQUIPEX ANR-11-EQPX-0010 'CRG/F' funded by the French National Agency (ANR). As part of the French CRG (F-CRG) beamlines, the operating budget of the D2AM beamline is funded by a French CEA-CNRS consortium.

Acknowledgments:
The beamline development would not have been possible without the support of the French Consortium CEA-CNRS that we thank. The success of the beamline in this field is a result of many contributions and commitments of users and scientists who were closely involved in the beamline investigations. Thanks to their efforts and to their feedback, the beamline continues to evolve to offer what is best for the user community.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.