Introduction

The past 10–15 years have seen an unprecedented increase in new alloy manufacturing processes (including rapid thermal processing and additive manufacturing) which take advantage of complex thermal processing routes to obtain new material properties, graded microstructures, and simultaneous component and material creation. These processes entail a large number of parameters (e.g., maximum temperatures, heating rates, cooling rates, hold times) that must be tuned to achieve target performance goals. An empirical, trial-and-error approach continues to guide parameter optimization, which is, not unexpectedly, time-consuming and expensive. One means to accelerate the determination of ideal processing parameters is to develop in situ monitoring capabilities. With this in mind, new synchrotron x-ray capabilities have been developed to gather the requisite data. Specifically, there has been a dramatic expansion of synchrotron-based probes for studying advanced manufacturing processes, particularly additive manufacturing (AM).1,2,3,4,5,6,7,8,9,10 Diffraction measurements performed in situ can provide a picture of true material state within engineering alloys during processing, allowing manufacturing process simulations to be rapidly tuned to improve accuracy and accelerate reaching target material performance and component qualification goals.

These diffraction measurements during alloy processing have been made possible by: (1) bright, high-energy x-ray beams capable of penetrating through mm of material, (2) two-dimensional (2-D) x-ray detectors that can record material evolution at rapid time scales (\(\ll \)s), and (3) novel manufacturing test environments that mimic real manufacturing processes. As these experimental methods mature, the next step is to develop data analysis capabilities that can efficiently extract the microstructural and thermomechanical states from the diffraction patterns. A primary challenge in this effort is deconvolving the effects of the instrument, thermomechanical response, and microstructural evolution. In other measurement modalities, this is overcome by measuring many projections through the specimen to ‘invert’ the data and separate competing effects. Unfortunately, x-ray experiments during AM processes often occur at rapid time scales and require bulky instrumentation, which together preclude the ability to rotate a sample during in situ measurements.

An alternative means to understand diffraction patterns is to ‘forward-model’ (i.e., simulate) the scattering from the material, then compare the simulation results to the experimental measurements ‘at the detector’.11,12,13 With increased computational power, more complex scattering can be forward-modeled, thus enabling new reconstruction and analysis capabilities. Of particular note are high-energy x-ray diffraction microscopy (HEDM) methods (also often referred to as 3DXRD).14 At the heart of these forward-modeling methods are massively parallel simulations of monochromatic, rotating specimen diffraction experiments. A microstructure is divided into 10\(^6\)–10\(^9\) heterogeneous diffracting volumes, and the scattering from each volume is simulated in parallel to produce series of 2-D diffraction patterns that are compared to those measured experimentally. The major breakthrough with this type of approach is dividing a scattering specimen into discrete volumes, allowing heterogeneous material, and accompanying gradients, to be accurately modeled and reconstructed. However, HEDM-type scattering frameworks15 cannot be applied to simulating advanced manufacturing experiments, as the specimen in these experiments cannot rotate. Other recent forward-modeling efforts have overcome this challenge for simulating diffraction from non-rotating polycrystalline specimens by directly simulating monochromatic wave interactions with nanoscale atom ensembles.16 However, this approach is currently not suitable for modeling diffraction volumes on the order of mm\(^3\).

Instead, we present a novel framework to simulate 2-D diffraction patterns from realistic microstructures in which specimens are not placed within a rotating diffractometer. In contrast to other existing polycrystalline diffraction frameworks, the approach models pseudo-polychromatic (white-beam) diffraction with a restricted energy bandwidth (\(\Delta E/E\)) in order to simulate realistic monochromating x-ray optics, which produce beams that are not perfectly monochromatic. The diffraction simulation framework is readily coupled to finite element-based simulations of material processing. As an example, we simulate diffraction from the nickel-based superalloy Inconel 625 (IN625) during selective laser melting (SLM) to demonstrate the new analysis capability. We also discuss how these simulated diffraction patterns can help address the significant challenges associated with quantifying temperature during in situ measurements.

Model Description

This section will describe the modeling used to simulate diffraction patterns collected during advanced thermal processing. First, the diffraction simulation will be described, followed by the thermal modeling. The section concludes by describing how the modeling efforts are integrated. A general schematic of the geometric model employed is given in Fig. 1 as a reference. In the figure, the laboratory coordinate system is denoted with L and a detector coordinate system is denoted with D. The wavelength (inversely related to the photon energy) of the incoming x-ray and diffracted x-ray beams is \(\lambda \), while \({\varvec{\hat{k}_I}}\) and \({\varvec{\hat{k}_o}}\) are unit vectors in the directions of the incoming and diffracted x-ray beams, respectively. The vector \({\varvec{t_c}}\) describes the centroid position of a scattering volume with respect to the laboratory origin and \({\varvec{t_d}}\) is a vector from these centroid positions to the center of the detector surface. Lastly, the vector \({\varvec{\xi }}\) is the intercept of a diffraction event with the detector surface. A more detailed description of the geometry, as applied to modeling rotating crystal diffraction experiments, can be found in Ref. 17.

Fig. 1
figure 1

Schematic of a scattering event in the diffraction framework. The basis vectors of the laboratory coordinate system are denoted with L, while the detector coordinate system basis vectors are denoted with D. The sample is illuminated by an x-ray beam traveling in the direction \({\varvec{\hat{k}_I}}\) and diffracted x-ray beams are emitted in the direction \({\varvec{\hat{k}_o}}\). The wavelength of incoming and diffracted x-rays is \(\lambda \). The position of a scattering volume is \({\varvec{t_c}}\) and the vector from the scattering volume to the area detector origin is \({\varvec{t_d}}\). Each sample volume contains a collection of grains and each grain is subdivided into misoriented subvolumes.

Diffraction Model

A virtual sample comprises ensembles of grains located within discretized continuum-scale volumes. The current lattice strain state (thermal or mechanical) of the grains within a volume is determined by a link between the microscale and continuum thermomechanical states (e.g., isostress, isostrain, or isothermal assumptions). The orientations of individual grains within each volume are sampled from an orientation distribution, enabling the simulation of texture, if required. Although the morphologies of grains and their arrangement within each volume are not explicitly modeled, grain volumes are modeled through the number of grains inserted into each finite volume. We note that, without explicit grain morphologies modeled, grains must be significantly smaller than the continuum-scale volumes. We note that volumes must be completely illuminated by the x-ray beam. Each grain is further divided into individual subvolumes that can be misoriented from a grain average orientation. Again, these subvolumes are not spatially arranged, but do enable diffraction peak spreading to be modeled. Each grain subvolume is the base scattering unit for the diffraction modeling, and diffracted intensity from each illuminated subvolume is summed to produce a full diffraction pattern.

Diffraction occurs from a set of lattice planes within a subvolume of crystal when the diffraction condition is satisfied:

$$\begin{aligned} \frac{2\pi }{\lambda }\left( {\varvec{\hat{k}_o}}-{\varvec{\hat{k}_i}}\right) ={\varvec{g}}=\frac{2\pi }{d}{\varvec{n}} \end{aligned}$$
(1)

where \({\varvec{g}}\) is a reciprocal lattice vector, d is the spacing of lattice planes associated with \({\varvec{g}}\), and \({\varvec{n}}\) is the normal to the lattice planes. For this modeling effort, the direction of the incoming x-ray beam, the lattice plane spacing, and the normal of a set of lattice planes are assumed to be known, leaving the wavelength (or energy) and direction of the diffracted beams to be solved. Using geometric relationships, it can be shown that the wavelength (and photon energy) required for diffraction for a given set of lattice planes is equal to:

$$\begin{aligned} \lambda =-2d\left( {\varvec{\hat{k}_i}} \cdot {\varvec{n}}\right) . \end{aligned}$$
(2)

Physically valid solutions to this equation correspond to positive wavelengths. No restrictions on monochromacity of the beam is enforced at this point, and the beam is treated as perfectly polychromatic. With the required wavelength for diffraction determined, the direction of the diffracted beam \({\varvec{\hat{k}_o}}\) can be readily solved using Eq. 1. We contrast this solution process to more typical monochromatic modeling approaches, such as HEDM or when calculating goniometer rotation angles.18 In those cases, the wavelength is fixed and the rotation angles by which the crystals must be rotated in order for diffraction to occur are solved. Once the direction of a diffraction event is calculated, the intercept \({\varvec{\xi }}\) of the diffraction event with the modeled detector surface must be found. From Fig. 1, the intercept \({\varvec{\xi }}\) is equal to:

$$\begin{aligned} {\varvec{\xi }}=u{\varvec{\hat{k}_o}}-{\varvec{t_d}} \end{aligned}$$
(3)

where \(u {\varvec{\hat{k}_o}}\) is a vector from the centroid of the current scattering volume to the detector surface (u is the vector magnitude). The value u can be found by solving:

$$\begin{aligned} u=\frac{{\varvec{t_d}}\cdot {\varvec{e_z}}^D}{{\varvec{\hat{k}_o}}\cdot {\varvec{e_z}}^D} \end{aligned}$$
(4)

With u determined, \({\varvec{\xi }}\) is calculated from Eq. 3.

These calculations are performed for all sets of lattice planes (down to a prescribed minimum lattice spacing threshold), within all subvolumes, within all grains, and within each scattering volume. This typically consists of \(10^9\) diffraction event (scattering volumes \(\times \) grains \(\times \) grain subvolumes \(\times \) lattice planes) calculations for a given sample and beam configuration. However, these calculations are readily parallelized and can be performed on a modest number of processing cores (\(\approx \) 20) in a few minutes. Once the diffraction events are all calculated (determining the \(\lambda \), \({\varvec{\hat{k}_o}}\), and \({\varvec{\xi }}\) was the first step in the process), those that fall within a prescribed wavelength range are saved. For convenience, an energy bandwidth \(\Delta E/E\) is prescribed around an average energy \(E_0\) within the model that is converted to an allowed wavelength range \(\Delta \lambda \) for calculations. In other words, only diffraction events requiring x-ray energies that satisfy \(|E-E_0|< \Delta E/2\) are saved. This restriction of energy bandwidth changes the diffraction simulation modality from polychromatic to monochromatic with finite bandwidth. For this work, all diffraction events that fall within the prescribed energy bandwidth are weighted equally, corresponding to a uniform wavelength distribution. Next, the saved diffraction events that fall on the detector surface are binned into pixels, with size corresponding to the modeled detector of choice, to produce a simulated diffraction image. We note that each diffraction event can be weighted by values such as volume, incoming x-ray energy intensity spectrum, or atomic scattering factor to improve accuracy. As diffraction peaks/rings are analyzed individually in this work (rather than as full spectrum), diffraction events are only weighted by volume. The described diffraction framework is implemented utilizing the HEXRD code package.19

Thermal Model

A continuum-scale thermal analysis is used to model the laser–metal interactions and heat transport within virtual samples. A transient thermal finite element solver20 to predict temperature histories is employed. In this thermal model description, time derivatives are indicated with dots above variables. The governing heat transfer equation solved by the model is the following:

$$\begin{aligned} \dot{\rho c_p}= \nabla \cdot \left( k \nabla T \right) \end{aligned}$$
(5)

where \(\rho \) is the material density, \(c_p\) is the specific heat, k is the thermal conductivity of the material, and T is the temperature.

The stationary laser is modeled as a heat source \(q_{\mathrm {LAS}}\) described by a Gaussian distribution:

$$\begin{aligned} q_{\mathrm {LAS}} =\frac{2P\eta }{\pi R^2_b}\exp \left( \frac{-2\left\| {\varvec{o}} - {\varvec{t_c}} \right\| ^2}{R^2_b}\right) \end{aligned}$$
(6)

where P is the power of the laser, \({\varvec{o}}\) is the heat source origin, \(\eta \) is an absorptivity factor to limit the amount of energy absorbed by the material from the laser, and \(R_b\) controls the width of the laser profile. Heat loss on the free surfaces of the model is simulated though a combination of convection, radiation, and evaporation. Convective heat loss \(q_{\mathrm {CONV}}\) is defined by:

$$\begin{aligned} q_{\mathrm {CONV}} = h_c\left( T-T_{\infty }\right) \end{aligned}$$
(7)

where \(h_c\) is a convection coefficient, T is the surface temperature, and \(T_{\infty }\) is the ambient temperature. Radiation heat loss \(q_{\mathrm {RAD}}\) is defined using the Stefan–Boltzmann law, given by:

$$\begin{aligned} q_{\mathrm {RAD}} = \sigma _s\varepsilon \left( T^4-T^4_{\infty }\right) \end{aligned}$$
(8)

where \(\sigma _s\) is the Stefan–Boltzmann constant and \(\epsilon \) is the surface emissivity of the material.

Lastly, heat loss due to evaporation is considered through \(\dot{m}L_v\), where \(\dot{m}\) is the rate of mass loss due to evaporation defined according to the Langmuir equation21 as:

$$\begin{aligned} \dot{m} = p_{SAT} \sqrt{\frac{M}{2 \pi R T}} \end{aligned}$$
(9)

and, following the work of Hirano et al.,22 the saturation pressure \(p_{\mathrm {SAT}}\) is described by:

$$\begin{aligned} p_{\mathrm {SAT}} =p_0 \exp \left( \frac{L_v M}{R} \left( \frac{1}{T} - \frac{1}{T_v} \right) \right) \end{aligned}$$
(10)

where \(p_0\) is atmospheric pressure, \(L_v\) is enthalpy change due to evaporation, R is the universal gas constant, M is the molar mass, and \(T_v\) is the evaporation temperature. The evaporation model (Eq. 9) follows the Hetrz–Knudsen model which assumes that there is no back condensation of vapor molecules.

The governing equations are solved using the PETSc library23,24,25 with an implementation of the Message Passing Interface. Here, a fully implicit backward Euler approach is used for the temporal discretization with the linearized system of equations solved by the Generalized Minimal Residual method26 and the additive Schwarz method27,28 as a pre-conditioner.

Model Integration

The finite element thermal model and the diffraction model are readily integrated. Each element of the thermal model serves as a scattering volume for the diffraction model with scattering being emitted from the center of the elements. As stated, a linking hypothesis is necessary to connect the embedded grain behavior to the continuum modeling. In this work, we assume that the temperature of all grain subvolumes within an element is equal to the temperature at the center of the element. As a cubic material (IN625) is being simulated, the lattice expansion in each grain is assumed to be isotropic. The thermal strain \(\varepsilon _T\) in grain subvolumes is equal to:

$$\begin{aligned} \varepsilon _T=\int _{T_0}^T{\alpha (T) dT} \end{aligned}$$
(11)

where \(\alpha (T)\) is a temperature-dependent coefficient of thermal expansion (CTE). For a constant CTE as utilized in this work, this further reduces to:

$$\begin{aligned} \varepsilon _T=\alpha (T-T_0) \end{aligned}$$
(12)

where \(T_0\) is the initial temperature. To distort the crystal reciprocal lattice vectors for diffraction simulations, the initial reciprocal lattice vectors \({\varvec{g_0}}\) are stretched with the inverse of the left stretch tensor \({\varvec{V}}\)29:

$$\begin{aligned} {\varvec{g}}={\varvec{V}}^{-1}\cdot {\varvec{g_0}} \end{aligned}$$
(13)

which for the simple isotropic expansion reduces to:

$$\begin{aligned} {\varvec{g}}=(1-\varepsilon _T){\varvec{g_0}} \end{aligned}$$
(14)

We note that this framework (see Eq. 13) can readily extend to general mechanical distortions, anisotropic thermal expansions, and lattice expansion due to chemical segregation if included in the coupled processing model. Lastly, if the temperature of a volume exceeds the solidus temperature, crystals instantiated within a volume do not diffract.

Results

This section is divided into two portions. First, capabilities to simulate the effects of various optics configurations and microstructural effects are demonstrated. Second, simulated diffraction from laser heating of IN625 is presented. For all simulations, the modeled detector has similar characteristics to a Pilatus 2M detectorFootnote 1.30,31 The Pilatus 2M has 1475 \(\times \) 1679 pixels that have a size of 172 \(\mu \)m. The maximum frame rate for full use of this detector is 250 Hz. The detector is configured as shown in Fig. 2 (700 mm away from the sample) to capture complete (111), (200), and (220) diffraction rings. The sample is illuminated by an x-ray beam of finite size. In all simulations, the average x-ray energy (\(E_0\)) is 61.332 keV, equivalent to the Yb K absorption edge. Diffraction peaks are often displayed relative to the change in angle \(\Delta 2\theta \) measured with respect to their unstrained positions. The azimuthal direction along which diffraction patterns are integrated to generate one-dimensional (1-D) intensity profiles is also labeled.

Fig. 2
figure 2

Schematic of the transmission diffraction geometry used for simulations in this work. The virtual specimen is illuminated by a finite-sized x-ray beam. Diffracted intensity is collected on an area detector sitting 700 mm behind the specimen. Diffraction events are emitted at an angle \(2\theta \) measured from the direction of the incoming beam, and diffraction intensity on the detector can be measured related to unstrained diffraction ring positions (\(\Delta 2\theta \)). The azimuthal direction on the detector is labeled.

Beam and Microstructure Effects

To demonstrate the effects of changing the energy bandwidth \(\Delta E/E\) on simulated diffraction patterns, a sample with 10,000 randomly oriented grains was illuminated with x-ray beams of various energy bandwidths. The lattice strain state in all the grains is uniform and each grain contains 0.25\(^\circ \) of misorientation. The unstrained lattice parameter used for these simulations is 0.3601 nm. For the simulations in this subsection, all grains are located at a single point at the origin of the laboratory coordinate system. Figure 3a–c shows the resulting diffraction images as the bandwidth is increased from \(10^{-4}\) to \(10^{-2}\). Each of these scenarios roughly corresponds to using a (111) reflection from a high-resolution silicon monochromator (a), a (111) reflection from a standard double-bounce silicon monochromator (b), and a multilayer monochromator (c). Each of the patterns is normalized such that the maximum intensity on the detector is equal to \(10^3\) and plotted on a logarithmic scale. In an experiment, measured intensities are scaled by incoming flux, exposure time, and detector efficiency. In Fig. 3a–c, we can see that integrated intensity of the diffraction peaks increases as the energy bandwidth increases, since more sets of lattice planes from grain subvolumes enter the diffraction condition as the bandwidth increases. There is also a modest increase in the total number of diffraction peaks as more sets of lattice planes enter the diffraction condition. To better view the effects of bandwidth on diffraction peak broadening, diffracted intensities from the first three diffraction rings were azimuthally integrated around the detector and are plotted in Fig. 3d. The integrated diffraction peaks from three different bandwidths are shown on each plot. To facilitate comparison, the integrated diffraction peaks are normalized such that the area under the peak is equal to 1. In Fig. 3d, we see that, when the energy bandwidth is equal to \(10^{-4}\) and \(10^{-3}\), the peak shapes (relatively flat tops) and widths are very similar. This is because, in these cases, the width of the diffraction peaks is dominated by broadening due to the size of the detector pixels. At an energy bandwidth of \(10^{-2}\), broadening of the diffraction peaks due to the distribution of energy/wavelength illuminating the specimen begins to dominate.

Fig. 3
figure 3

Simulated diffraction images from a collection of 10,000 grains with 0.25\(^\circ \) of misorientation illuminated by an x-ray beam with increasing energy bandwidth (log scale). The simulated images correspond to (a) \(\Delta E/E\)=\(10^{-4}\), (b) \(\Delta E/E\)=\(10^{-3}\), and (c) \(\Delta E/E\)=\(10^{-2}\). (d) Azimuthally integrated diffraction peaks from the (111), (200), and (220) sets of lattice planes with increasing energy bandwidth.

The diffraction modeling framework is also able to capture the effect of intragranular misorientation on measured diffracted images. These effects are typically neglected in more standard 1-D simulations of diffraction,32 as intragranular misorientation manifests primarily as peak spreading perpendicular to the scattering vector direction in reciprocal space (azimuthally on an area detector). However, these effects are important when determining the number of grains in the diffraction volume. As the number of peaks and misorientation increase, intensity transition from discrete peaks to continuous rings. Figure 4a–d shows simulated diffraction images from 5000 grains with increasing amounts of misorientation present within each grain (0.25\(^\circ \)–2.5\(^\circ \)). The same 5000 average grain orientations pulled from a random distribution are used for each image. The fixed energy bandwidth \(\Delta E/E\) for each image is \(10^{-3}\). Each image also shows an enlarged inset of diffraction peaks in the (111) and (200) diffraction rings near the vertical scattering plane. As expected, the diffraction peaks broaden significantly along the azimuthal direction as the amount of misorientation is increased. The increasing amount of azimuthal broadening or streaking of diffraction peaks is a feature of the increased amounts of misorientation present within the modeled grains. Significant amounts of lattice misorientation and azimuthal peak spreading are often observed in rapidly solidified engineering alloys that have not undergone annealing heat treatments.7 Also, it is important to note the increasing amounts of diffraction peak overlap that occur as misorientation increases. As misorientation increases due to increases in defect content, individual diffraction peaks will no longer be able to be separated, and the data have to be analyzed in a manner similar to traditional powder diffraction.

Fig. 4
figure 4

Simulated diffraction images from a collection of 5000 grains illuminated by an x-ray beam with an energy bandwidth (linear scale). The image insets show an enlarge region of the (111) and (200) diffraction to rings to highlight the azimuthal broadening effects of misorientation. The images correspond to misorientation magnitudes of (a) 0.25\(^\circ \), (b) 0.5\(^\circ \), (c) 1.0\(^\circ \), and (d) 2.5\(^\circ \). The energy bandwidth \(\Delta E/E\) for the diffraction simulations shown is \(10^{-3}\).

Simulated Diffraction During Selective Laser Melting

The primary use of the framework presented is to provide the ability to better understand and interpret physical measurements that have been or can be made. As an example, we present simulation results from a modeled in situ x-ray experiment during SLM of an IN625 cylinder. The diameter of the cylinder is 2 mm and the length of the cylinder is 5 mm. This relatively simple sample geometry was chosen because it enables an isolated meltpool to develop with minimal boundary condition effects. The 2-mm diameter corresponds to a relatively large transmission length (approximately 7% x-ray transmission through Ni at 60 keV) which would be a target for future experimental work. Two different SLM simulations were performed with laser powers of 285 W and 400 W, a beam diameter of 500 \(\mu \)m (defined as 4\(\sigma \) of the Gaussian distribution), and a laser on-time of 1 ms were chosen as the process parameters for the tests. Figure 5a shows the mesh, comprised of 8 node hexahedral elements, used for simulations. As seen in the figure, a rectangular mesh is used for the region in which the melt pool forms, and the surrounding area is meshed to fill the remaining cylindrical geometry. Throughout the sample, approximate element dimensions are: 20 \(\mu \)m in the radial direction, 60 \(\mu \)m in the circumferential direction, and 100 \(\mu \)m in the vertical direction, totaling 221,250 elements. Additionally, the material properties of IN625 are summarized in Table I. While most properties are assumed to be constant, the thermal conductivity and specific heat capacity are temperature-dependent and fit to polynomial functions using data from previous experimental measurements.33

Table I Material properties of IN625 used for the thermal modeling and diffraction simulations.

Figure 5b shows the maximum temperature in the specimen as a function of time for both the 285-W and 400-W heating conditions. Note that, when the temperature is above the solidus temperature, there are volumes within the samples that do not diffract. The time step for thermal simulation was 100 \(\mu \)s and nodal temperature data were output every 500 \(\mu \)s. To match the maximum framing rate of the modeled detector, the output thermal data over eight output time steps were averaged (4 ms), generating two data frames (Frame 1 and Frame 2) for analysis. Also shown in Fig. 5b are distributions of temperature in the specimen during the 400-W heating case. We see that the SLM process produces a relatively small volume of highly heated material, with most of the sample remaining relatively cool when a single short pulse of heat is applied.

Fig. 5
figure 5

(a) Mesh used for the SLM simulations and subsequent scattering simulations, and (b) maximum temperature in the simulated diffraction volume versus time. Time points are collected into two time windows (frames) of length equal to the minimum exposure time of the detector modeled. Example distributions of temperature within the sample are also shown with the size and location of the illuminating x-ray beam marked with a red box (250 \(\mu \)m \(\times \) 250 \(\mu \)m). The solidus temperature (\(T_S\)), above which there is no diffraction in the scattering model is marked (Color figure online).

After the thermal histories for the two SLM cases were generated, they were then input into the diffraction simulation framework. The sample under the two heating conditions was illuminated by a 250-\(\mu \)m \(\times \) 250-\(\mu \)m incoming x-ray beam with an energy bandwidth of \(10^{-3}\) in a transmission geometry. Grains were assigned to each volume assuming an average diameter of 25 \(\mu \)m. With this grain size, there were 6–10 grains in each element and 12,146 grains in the illuminated diffraction volume. Each grain was modeled as having 1\(^\circ \) of misorientation present as AM materials typically exhibit azimuthal peak broadening in the as-built state. The temperature of grains in each volume is equal to the temperature at the corresponding element centers. As described in "Model Integration" section, the temperature in each element is propagated down to the diffracting crystals residing at each spatial point through lattice thermal expansion, allowing the full gradient of temperature in the diffraction volume (in the beam cross-section and through the transmission direction) to be captured in the diffraction simulation. As an example of the simulated data, Fig. 6a shows Frame 1 of the 400-W heating case plotted on a logarithmic scale. The inset is an enlarged region of the first three diffraction rings to show the large amounts of inwards radial movement on the detector that a subset of diffraction peaks exhibit (shapes here can be compared to Fig. 3d). These peaks that shift significantly are emitted from grains that are significantly heated due to the close proximity to the laser pulse. The expansion of the lattice in the embedded grains produces a corresponding reduction in reciprocal lattice vector length (see Eq. 14), moving diffraction peaks inwards. Note that, since many of the volumes illuminated are still at a relatively low temperature, there is a wide spread of radial peak positions present.

To examine the change in diffraction peak positions in the radial direction in more detail, the diffraction rings from the first three sets of lattice planes were azimuthally integrated. Figure 6b shows each of the first three integrated diffraction rings in the unheated state, during Frame 1, and Frame 2, for both the 285-W and 400-W heating cases. In Fig. 6b, we see that the negative side of the diffraction peaks (larger lattice plane spacing) is significantly impacted during the heating stage, as is to be expected. As the temperature of a large portion of the illuminated volume remains close to room temperature during the laser pulse, the more positive edge of the integrated diffraction peaks remains relatively unchanged. To view the portions of the diffraction peaks corresponding to the heated regions of the diffraction volume, enlarged views of the diffraction peaks are also shown in insets. The diffraction peaks in Frames 1 and 2 of the 400-W heating case extend further into the negative direction in comparison to the 285-W case, since the sample was heated to higher temperatures. However, it should be noted that the changes in diffraction peaks between the 285-W and 400-W cases are relatively subtle. As such, in a physical experiment with matching heating and detection parameters, direct quantitative analysis of the temperature distributions present within a diffraction volume would generally pose a challenge for data interpretation.

Fig. 6
figure 6

(a) Example of simulated diffraction image of the 400-W SLM simulation Frame 1 (see Fig. 5b) plotted on a log scale. Inset shows enlarged regions of (111), (200), and (220) diffraction rings to show diffraction peaks moving radially inwards due to lattice thermal expansion. (b) Normalized azimuthally integrated diffracted intensity from the (111), (200), and (220) sets of lattice planes for the 285-W (circles) and 400-W (squares) SLM simulations. Initial diffraction peaks are black, Frame 1 for each simulation is red, and Frame 2 for each simulation is orange. The energy bandwidth \(\Delta E/E\) for the diffraction simulations shown is \(10^{-3}\) and the beam size is 250 \(\mu \)m \(\times \) 250 \(\mu \)m. Insets of each diffraction peak profile enlarge the portions of the diffraction peaks influence by the current temperature distribution (Color figure online).

Discussion

In this work, a novel framework for modeling diffraction experiments during thermal processing of engineering alloys has been presented. In these experiments, when trying to quantify material response from diffraction patterns, the microstucture, the heterogeneous thermomechanical state, the x-ray beam, and the detector all influence the measurements made. The primary value of the framework is to help develop a better understanding of these experimental measurements in which many factors may ultimately contribute to the character of the data collected. With the ability to freely vary these effects, experiments with a high probability of success can be designed, and collected diffraction patterns can be interpreted with a higher confidence.

For the SLM simulations, a natural question is how do the instrument and material influence the determination of a temperature distribution from diffraction patterns? Accurately measuring bulk temperature (and temperature distributions) is still an active challenge.9 Figure 7a shows the distribution of temperature within the diffraction volume (a histogram transformed into a continuous distribution) for Frame 1 of the 400-W SLM simulation and can serve as the ‘ground truth’ for this analysis. We note that volumes above the solidus temperature are not included in the distribution as they do not diffract. In a normal analysis of diffraction patterns, without the ability to rotate a specimen, scattering is assumed to be emitted from a single point. Any broadening due to the physical size of the diffraction volume or the instrument is treated as a non-ideal artifact. With this assumption about the scattering, each radial position on the detector, and subsequently each \(2\theta \) position of a diffraction peak, corresponds to lattice plane spacing and reciprocal lattice vector magnitude. Within a peak, each \(2\theta \) position relative to the unstrained \(2\theta \) position can then be connected to the current temperature (if the material exhibits isotropic thermal expansion) using the relationship:

$$\begin{aligned} T=T_0+\frac{1}{\alpha }\left( \frac{\bar{\lambda }}{2\sin {(\theta )d_0}}-1\right) \end{aligned}$$
(15)

where \(\bar{\lambda }\) is the average wavelength illuminating the specimen. Using this mapping, the integrated (220) diffraction peak (see Fig. 6b) from the 400-W laser pulse case is transformed into a temperature distribution. The (220) peak is chosen as it has the highest \(2\theta \) resolution of the full diffraction rings collected. In Fig. 7b, we can see that temperature distribution from the diffraction pattern is significantly broadened in comparison to the ground truth, but compares relatively well to the ground truth at higher temperatures. Importantly, though, bounds can be established as to how well the measurement reflects the underlying temperature distribution.

Fig. 7
figure 7

(a) Temperature distribution within the diffraction volume during the 400-W SLM simulation, Frame 1, as simulated in the thermal model, and (b) temperature distribution within the diffraction volume during the 400-W SLM simulation, Frame 1 is as extracted from the simulated diffraction pattern.

Going forward, there are opportunities to further extend the presented framework. The thermal modeling capability can be applied to more realistic heating scenarios for SLM, including thin plates. Inclusion of structure factors in the model would allow all diffraction peaks to analyzed simultaneously, enabling the simulated diffraction patterns to be used with more traditional Rietveld refinement approaches.32 While only thermal effects on lattice strain were considered in this work, the diffraction framework can readily include mechanical strains. Simulating diffraction from more complete coupled processing simulations, including mechanical, thermal, and chemical strains, would enable studies of how these effects manifest in diffraction patterns. With the ability to activate and deactivate different features in the microstructure leading to scattering changes, manifestation of different physical effects in the forward-model can be explored, possibly leading to decoupling of effects. Lastly, these simulation capabilities may also be used to develop surrogate models connecting diffraction patterns directly to underlying thermal distributions.

Summary

A novel diffraction framework that incorporates a finite energy bandwidth, spatial heterogeneity of thermal response, and realistic microstructures to simulate 2-D diffraction patterns has been presented. The framework was used to simulate the diffraction that would be measured during the SLM of IN625. The simulated diffraction patterns were used to interpret the quality of temperature distribution measurements that are achieved using a standard transmission diffraction geometry. In the future, the presented capability can be used to decouple the effects of thermal and mechanical strain, in addition to developing surrogate models for the analysis of experimental data.