Residual stress analysis in industrial parts: a comprehensive comparison of XRD methods

A recently emerged XRD-based cosα residual stress measurement method, which utilizes imaging plate detectors, has attracted special attention from both academia and industry. There are uncertainties about to which extent the method could be used and about the accuracy of the measurements when analyzing industrial components. This work investigates the accuracy of the method by targeting four common types of material structures for the XRD experiments: preferred orientation of the microstructure (texture effect), coarse grain microstructure (coarse grain effect), a combination of both, and materials with steep lateral or in-depth residual stress gradients. The analysis was carried out by the conventionally used sin2ψ and the newly developed cosα methods on ferritic and austenitic steels, aluminum alloys, and SiSiC ceramics. The results indicate that both methods are reliable in most cases. However, cosα method has higher uncertainties and is more sensitive to the initial microstructure of the material.


Introduction
X-ray diffraction is probably the most widely used method for the near surface residual stress (RS) evaluation in polycrystalline materials.The method is based on Bragg's and Hook's laws.This technique uses the interplanar spacing as the internal strain gage for the residual strain measurements.According to the Bragg's law, a polycrystalline material will diffract the incident X-ray beam with an angle proportional to the beam wavelength and inversely proportional to the lattice spacing.RS changes the interlayer spacing of the crystal and thereby causes shifts in the reflection position.The shift in the reflection position could therefore be used to calculate the residual strain in the material [1][2][3][4][5].
To determine residual strains of the samples in different directions, the geometrical parameters of the instrument and sample come into play.Figure 1 shows the sample ( � ⃗ S ) and laboratory ( � ⃗ L ) coordinate systems.� ⃗ S  is the desired direction in which RS is measured.This direction is defined by the tilt (ψ) and rotation (φ) angles.Traditionally, the residual strains are measured by tilting the sample by different angles and determining the residual strain from the shift in the reflection positions, Fig. 2.This method uses a 0D detector like scintillation counters, or a 1D detector such as position sensitive proportional counters, to collect the reflection positions at different tilt angles.
In 1978, a new method has been introduced by Taira et al. [6], which uses the complete Debye-Scherrer (D-S) ring and cosα method to measure the residual strains.The method, theoretically, can measure the residual strains with one exposure of the X-ray.Therefore, the measurement times are significantly shorter [7].Nonetheless, both methods use the same fundamental equation for the calculation of the residual strains with different diffraction vectors (n).
(1) The following sub-sections give more details about the two analysis methods, their calculation approaches, assumptions, advantages, and disadvantages.
sin 2 ψ method Lester and Aborn [8] first introduced the concepts of the residual strain in a material by using a simple camera and X-ray diffraction in 1925.They measured the lattice spacing and deduced the residual strains.The method was successfully implemented to measure RS in any direction by Glocker and Osswald [9] who measured the shift in the reflection positions at two tilt angles, ψ = 0° and 45°.The measurement is done over different inclination angles (ψ) at high diffraction angles (2θ) [4].
Considering the coordinate systems shown in Fig. 1, the diffraction vector in the sin 2 ψ is calculated from the following equation [2]: The residual strains in the sin 2 ψ method then can be calculated as [2]: In which ε ij are strain components with i indicating the strain direction and j showing normal to the surface the strain acts on, the prime notation in indicates that the strain is in the laboratory coordinate system.If the material is polycrystalline with random orientation of crystals (untextured) there is a reflection associated to every � ⃗ L 33 direction (inclination angle, ψ).However, if the material is textured, for example rolled or additively manufactured, depending on the orientation distribution function (ODF) of the material, there might be a low or no reflection intensity at specific inclination angles (ψ).Equation ( 3) is a linear equation with six unknown strain terms.The exact solution of the equation needs the measurement of d φψ in at least six  independent directions, � ⃗ L 33  .It is advised to use more points to reduce the statistical errors [2,3].When ε 13 and ε 23 are zero, Eq. ( 3) shows a linear relationship between d φψ and sin 2 ψ.When either of these terms are not zero, i.e., shear strains presents, there is a ψ-splitting due to the sin 2 ψ term.There are two techniques to calculate the normal and shear strains from this formulation, Dölle-Hauk [10] and Winholtz-Cohen least-square [11] methods.The former, which is used in this work, is based on introducing the average strain, and the deviation from this average value [10].Relevant equations could be found in the corresponding reference.
For elastically isotropic materials with assumption of homogeneous ε ij within the X-ray penetration depth, by using the Hook's law and considering φ = 0, the relationship between ε φψ and σ ij can be derived [3]: in which s 1 (hkl) and 1  2 s 2 (hkl) are the {hkl}-dependent X-ray elastic constants (XEC), [3,12].In case of an elastically isotropic material, the macroscopic elastic constants can be used.Otherwise, it is advised to calculate their values from monocrystal compliances according to the existing models [2,3].
It is assumed that the normal RS on the surface of the specimen is zero, i.e., σ 33 = 0. Since the X-ray diffraction deals with the near surface RS, this consideration is reasonable.For such a stress tensor, Eq. ( 4) becomes [2,13]: This equation shows a linear relationship between d ψ and sin 2 ψ when no shear stress exists on the surface, σ 13 = 0. Therefore, the σ φ could be calculated from the slope of the d ψ versus sin 2 ψ curve by the linear regression approach.Since determining the lattice spacing of a stress-free material, d 0 , is challenging, the lattice spacing of the first tilt angle is considered as d 0 , which introduces around 2% error to the RS calculations [4].When the shear stress on the measurement surface is not zero (σ 13 ≠ 0), the term sin(2ψ) comes into the calculations.To this end, a nonlinear regression method or a triaxial analysis must be deployed [3,[13][14][15].Lately, Luo [13] suggested a new analysis method for the calculation of the normal and shear stresses measured by the sin 2 ψ method.
Since different exposures at different angles are needed and each exposure takes a few minutes, each RS measurement by the sin 2 ψ method takes around a few hours to complete.
It is worth mentioning when the sample has a complex geometry, the sin 2 ψ method might show some limitations.For example, when measuring the transverse RS of a T-joint at the weld toe, the stiffener could limit the tilting, and all ψ angles might not be reached, like what happened in one of our previous studies [16].In these cases, it is advised to reduce the ± ψ angle range to the maximum possible tilt angle and perform the measurement.However, this approach introduces errors in the measurements, which are not easily measurable.

cosα method
The cosα method utilizes a 2D detector to capture the whole D-S ring and measures normal and shear residual strains, in contrast to the sin 2 ψ method that uses a portion of the reflecting cone.Here again, the fundamental equation for residual strain calculation, Eq. (1), will be used, although with a different diffraction vector [17]: cos sin 0 cos 0 − sin cos 0 cos 0 cos − sin sin 0 sin cos sin 0 sin 0 − sin cos 0 sin 0 cos + sin cos 0 sin cos cos 0 + sin sin 0 cos Figure 3 shows the reflection geometry in the cosα method and the angles used in Eq. ( 6).
The presence of RS causes deformation in the D-S ring. Figure 4 schematically shows the measured D-S rings captured by cosα method for a material with RS.From the different D-S ring radii shown in this figure the strain can be calculated.
The mean value of the difference of strains at each azimuthal angle (α) and deviation from the mean value will be used for the strain calculation [7]: in which, = cos 2 0 2L m tan 0 r − r 0 , where L m is calculated from the mean radius, r m .The strain in the α direction could be related to the bi-axial in-plane stress (i.e., σ i3 = 0, where i = 1-3) as [18]: For φ = 0 in a material with isotropic and homogeneous elastic behavior, the normal and shear stresses can be calculated from the slope of ε α1 -cosα and ε α2sinα curves, respectively [7]: It should be noted that the above-mentioned equations cannot be used in the case of high shear stresses on the measurement surface, σ 13 ≠ 0 and σ 23 ≠ 0. Also, (7)  the measured shear stresses by Eq. ( 11) is in a different direction from what is calculated by sin 2 ψ method by Eq. ( 5), σ 12 versus σ 13 , and therefore must not be compared.Since the samples in this study did not show high levels of shear RS by either of the methods, no errors in the calculations are expected.

Peak fitting
For the determination of d ψ from the reflections of either of the methods, determination of the reflection position is needed.There are several fitting methods used for this aim, which are based on Lorentzian (Cauchy) or Gaussian distributions, such as Scherrer [19] and  methods, or based on a combination of Lorentzian and Gaussian distributions like Voigt, and pseudo-Voigt methods [21,22].Methods based on the pure Lorentzian or Gaussian distributions are mainly accurate for symmetric reflections, however the Voigt and pseudo-Voigt methods are more advanced and showed proper fitting in case of both symmetric and asymmetric reflections [21,23].There are also more advanced methods that could be used in the case of asymmetric reflections [24][25][26].

X-ray penetration depth
When X-rays hit a sample, their intensities are reduced due to the exponential attenuation of the X-rays by the material.The X-ray penetration depths are therefore considered as those distances from the surface out of which 63% (1-1/e, e = 2.71828… being the Euler's number) of the reflection intensities are originated.The penetration depth depends on the absorption coefficient of the material, incoming and scattering beam angles.These angles depend on the geometrical parameters of the instrument and specifically the tilting (inclination) method in the sin 2 ψ method.There are two tilting methods in the sin 2 ψ approach, iso-inclination (ω-tilting) and side-inclination (ψ-tilting).In the side inclination geometry, which is used in this work, the penetration depth is calculated by [2,3,27] where μ is the attenuation coefficient of the material.For a given material and reflection angle, increasing the tilt angle decreases the penetration depth of the X-ray, Fig. 5a.The RS values are a weighted average of the measurements in these depths [3].
Similar to the sin 2 ψ method, the penetration depth of the X-ray beam for the cosα method is dependent on the sample and laboratory coordinate system and can be calculated from [7]: It is obvious that depending on the sample tilt angle (ψ 0 ) and the azimuthal angle (α) the penetration depth varies, Fig. 5b.
In practice, the penetration depths of these two methods for a given material and reflection angle (2θ) are slightly different.

The effect of the material condition
Both the cosα and sin 2 ψ methods rely on the linear correlation between two quantities, namely between 2θ and sin 2 ψ and between ε α1 and cosα [2,7].The precision and accuracy of the measurements depend on minimizing several errors that cause nonlinearity of the curves, such as the instrument alignment, material condition, and data processing.Further modifications are necessary to the fundamental equations to achieve accurate results if the nonlinearity comes from the material condition [14,24,25,28].The most common material conditions with nonlinear distributions are the textured and coarse grain structure or a combination of them.Another case is to have a component with steep RS gradients in the lateral or thickness directions.Since engineering materials are often inhomogeneous, special attention should be paid to gradients in RS or microstructure, especially in the near surface region.Figure 6(a) and (e) shows the resulting ε versus sin 2 ψ/ cosα plots and the D-S ring for the ideal situations for a sample with good measurement condition in sin 2 ψ and cosα methods.The presence of shear RS causes splitting in the sin 2 ψ curve.It should be noted splitting of the curve could also come from the instrumental misalignment [14].As mentioned before the shear stresses measured by these methods are in two different directions, σ 13 in the sin 2 ψ, and σ 12 in the cosα method.Coarse grain structure causes oscillation in 2θ-sin 2 ψ curve and changes in the reflection density around the D-S ring, Fig. 6(b) and (f).Oscillations in the cosα curve are also observed with some singular data lose in the case of severe coarse grain.Texture appears also as oscillations in 2θ-sin 2 ψ curves, while it causes higher reflection intensities on one side of the D-S ring and lower on the other side, Fig. 6(c) and (g).If the material is highly textured, there is a large gap in the cosα distribution due to the loss of data at some sections of the D-S ring.It is worth mentioning tilt angles (ψ) higher than ± 45° are necessary to detect the oscillation in the 2θ-sin 2 ψ curves.By performing ψ scans at a constant θ angle, the coarse grain and texture could be distinguished in the sin 2 ψ method.Finally, RS gradients in the sin 2 ψ measurements result in curvature in the 2θ-sin 2 ψ curves, Fig. 6(d).Since changing in the α angle changes the penetration depth in the cosα method and ε α1 determines from the differences between the strains at different depths, nonlinearity due to RS gradient is barely visible in ε α1 -cosα curve.One method to detect the stress gradient here is to repeat the measurement at different tilt angles (ψ) and check the differences in the measured RS values [29].
It should be noted that the coarse grain is relative to the beam size.The negative effects of the coarse grain and textured microstructures could be reduced by oscillating the sample and utilizing larger beam sizes.Angular oscillation is proper for textured materials and linear oscillation for coarse grain microstructure to increase grain statistics.Also, when in-depth steep residual stresses exist, measurement methods based on constant penetration depth could be used for the sin 2 ψ method [27,30].
The accuracy and precision of the cosα method compared to the sin 2 ψ-method was previously evaluated by different researchers [17,18,[31][32][33][34].These works mainly dealt with laboratory conditions, where the stresses are set by applying a known load to the sample.Although there are also reports of using the cosα method for measuring RS of manufactured parts, such as Andurkar et al. [35], there is no comprehensive comparison of the cosα and sin 2 ψ methods for industrial components.Therefore, this work concentrates on industrial components with different conditions, which are of technological importance.Four common cases are studied here: parts with preferred orientation of the microstructure (texture effect), samples with coarse grain microstructure (coarse grain effect), a combination of both effects, and parts with steep lateral or in-depth RS gradients.

Samples
To study the accuracy of the methods for measuring RS of industrial components, a wide range of production processes and materials were investigated.Heat treatable aluminum alloys AA2618 (AlCuMg1.5Ni)and AA7075 (AlZnMgCu1), ISOVAC-HP NO30-15 electrical steel, 1.4545 (15-5PH) ferritic steel, 1.4404 (SS316L) austenitic steel, and SiSiC ceramic were analyzed in this study.Table 1 shows the chemical composition of the samples.
Different production processes and post-production treatments were analyzed.AA2618, AA7075, and 1.4545 ferritic steel samples were measured in machined (M), shot-peened (SP) and laser shock peening (LSP) conditions.1.4404 has been analyzed in rolled and additively manufactured (AM) condition after welding, see [36] for details.Measurements were done in the heat affected zone of weldments and in the base material.HP NO30-15 sample could be considered as a sample under service loads.The sample was rolled, then a rectangular hole was machined in its center.Afterward, it was cyclically loaded for 1 million cycles with the maximum and minimum load of 370 N and 37 N (R-ratio = 0.1) in tension.The SiSiC ceramic was measured in the asfired condition.To have a sufficient statistic in the grain orientation for XRD measurements, the grain size and random crystal orientation are two determining factors.When working with typical beam diameters of, e.g., 1 mm, an optimum average grain size smaller than 100 μm is required and the material should have a random crystal orientation [2].
However, in practice the components which are subjected to the measurement often do not fulfill these  requirements.Therefore, in this study the components were selected in a manner to represent fine and coarse grain microstructure, crystallographic texture, and stress gradients.Table 2 summarizes the sample conditions.Figure 7 shows the samples measured in this study.

Measurements
For the sin 2 ψ measurements a laboratory Bruker D8-Discover with Cu-K α or Cr-K α radiation was used.The instrument is equipped with a high-resolution position sensitive detector (PSD) with superb energy resolution (1D LYNXEYE XE-T).For all the measurements with this instrument polycapillary primary optics and the point focus of the tubes were deployed.In general, Cr-K α radiation (λ = 2.2897 Å) was used for the steel samples and Cu-K α radiation (λ = 1.5406Å) for the rest.Samples were oscillated linearly and angularly in case of coarse grain and textured structures, respectively, to increase the crystal statistics and minimize the effect of these conditions on the quality of the measurements.Table 3 summarizes the measurement setup of the sin 2 ψ method.
Although it is recommended to utilize larger beam sizes for coarse grain materials, for sample HP NO30-15, RS at the notch was of interest and, therefore, the beam should be focused on this area.A 0.5 mm collimator was large enough to provide reflections at all tilt angles and yet small enough to focus on the notch and then was deployed.During the measurement of the 1.4404 samples, the high-resolution option of the detector was used to suppress the fluorescence radiation from the sample and to have higher net intensities.This option increases the low threshold and decreases the high threshold of the detector, which significantly decreases the fluorescence intensity and K β reflections, respectively.For the cosα method, the Pulstec μ-X360 was utilized.The instrument is equipped with a 2D imaging plate (IP) detector.Like the sin 2 ψ method, Cr-K α radiation was used for the ferrous materials and Cu-K α radiation for non-ferrous samples.The same oscillation techniques as for the sin 2 ψ were deployed in these measurements.Table 4 summarizes the measurement setup of the cosα approach.To make the movement of the instrument and further adjustments easier, it was mounted on an industrial robot KR3 R540 from Kuka.
To calculate the RS from the measured strains, the equations mentioned in Sections "sin 2 ψ method" and "cosα method" were used.Our in-house code was used for the calculations of the sin 2 ψ method and commercial software ASTRAY was utilized for the calculations of the cosα measurements.Table 5 shows the material elastic constants for the calculation of RS.
For the fitting of the reflections, the Lorentz fitting was used for the cosα method, and the pseudo-Voigt method was used for the sin 2 ψ method.Also, an elliptical fit was utilized for the fitting of the 2θ-sin 2 ψ curve, and the linear regression was deployed for fitting the ε α1 -cosα diagrams.

Results and discussion
To comprehensively assess both processes for the engineering materials, four different categories, namely, samples with stress gradient, textured components, coarse-grain structures, and parts with texture and coarse-grain structures will be investigated in detail.It is worth mentioning that the mentioned errors in the subsequent sections are the statistical errors coming from the fitting of the curves and do not include all sources of measurement uncertainties.

Samples with stress gradient
The 1.4545-M sample shows stress gradients in lateral direction, and after shock peening shows stress gradients only in the depth direction.Figure 8 shows the 2θ-sin 2 ψ and ε α1 -cosα diagrams of 1.4545-M sample.
According to the diagrams, the measurements do not show a perfect linear behavior and thus deviate from the linear fitting, which introduce certain levels of errors.The differences between the fitted and measured curves are small and these errors are expected to be low.The results show no evidence of existing stress gradients in the depth direction of the samples.However, performing ten measurements at different locations on the surfaces revealed that the RS changes from 98 to 142 MPa in direction 1, and from − 119 MPa to − 78 MPa in direction 2 of the samples.The Pulstec instrument uses a camera and a laser beam with an accuracy of several tenth of millimeters for the alignment of the measurement spot.The D8 Discover instrument has a camera for sample alignment that has a lateral accuracy of ± 0.1 mm.The above-mentioned ten measurements were carried out with a 1 mm interval between each two individual points by the D8 Discover instrument.It is evident that in the accuracy range of the instruments, especially the Pulstec, there is a steep change in the RS values, which affected the measurements on the samples.Both sin 2 ψ and cosα diagrams show a relatively linear distribution, and low levels of errors are expected from the nonlinearity of these diagrams (note the values of the vertical axis in part (c) and (d) of the figure are in the order of 10 −4 ).Furthermore, the samples were flat and negligible errors due to height misalignments are expected.Therefore, both measurements are considered correct, although there are some uncertainties in both measurements due to the lateral RS gradient.The only reason for different RS measurements is the steep lateral RS distribution on the sample surfaces within the lateral accuracy of the instruments.
Figure 9 shows the sin 2 ψ and cosα diagrams of the 1.4545-SP sample.12).These values were calculated 4 to 5.7 μm for different azimuthal angles (α) in the cosα method, Eq. ( 13).Both measurements show a good fitting of the curves, which imply that low level of error exists due to the material condition.Here, also the specimens were flat, thus, low error is expected from sample misalignments in both methods.According to the data quality observed in the measurements, both measurements are assumed to be correct, although there are some uncertainties in both measurements due to the in-depth RS gradient.The differences between the measurements seem to come from the fact that the measurements were carried out at different penetration depths with different RS values, which are the weighted average of the stresses through these penetration depths.
The LSP samples showed the same behavior as the SP samples, with different RS values.The same explanation is valid for those measurements as well.

Textured components
AA7075-SP and AA2618-SP samples, and direction 2 of the 1.4404 rolled sample have textured microstructures.However, the texture level is different in these samples.After performing residual stress analyses with the sin 2 ψ and cosα method, AA2618-SP and AA7075-SP samples showed almost the same level of uncertainty in both methods.Mild effects of texture are evident in the cosα measurement results (D-S rings), while there is negligible sign of the texture in the sin 2 ψ measurements.Figure 10, for instance, shows the sin 2 ψ and cosα diagrams of the AA7075-SP sample.As is seen in Fig. 10, both methods show a proper fitting of the diagrams, and the calculations are assumed to be accurate with both methods.Considering the accuracy of the XRD method for the RS measurements of ± 20 MPa [3,4], the deviation of the RS measurements from each other is in an acceptable range.
The uncertainties of the 1.4404 rolled sample, on the other hand, are higher in the cosα measurements although both the measurements show almost the same values of the RS. Figure 11 shows, for example, the sin 2 ψ and cosα diagrams of the sample in direc-tion2 of point 2.
Figure 11 shows that both methods have some errors coming from the poor curve fitting.The error seems to be higher than for the previous textured samples.But as Fig. 11b shows, there is a disruption in the cosα diagram.Although, the D-S ring shows high enough intensity for the calculation around the ring, looking at the reflections of the cosα method, Fig. 11c, shows high levels of fluorescence from the sample, which in turn results in high levels of the background.Especially, at higher reflection angles where the background intensity reaches the intensity of the reflection of interest.These high backgrounds make it difficult for the software to accurately fit the reflection and precisely locate its position, which in turn result in disruptions like what is shown in part (b) of the figure and imposes errors to the calculations.Utilizing narrower threshold of the detector of the sin 2 ψ method, significantly reduced the effect of fluorescence from the surface and made the measurements more accurate.Although, the measured values by the sin 2 ψ method seem to be more trustworthy due to higher quality of the data and lower uncertainties, this is mainly the advantage of the high-resolution detector with sharp and accurate energy discrimination of the corresponding laboratory instrument and not the method itself.

Coarse-grain structure specimens
After measuring samples AA2618-M, AA2618-LSP, AA7075-M, AA7075-LSP, SiSiC, and HP NO30-15, the presence of coarse grain microstructure was evident due to oscillations in the sin 2 ψ curve and changes in the reflection intensities of different tilt angles.The microscopy observations also proved the presence of coarse grain structure, Fig. 12.
In the case of AA2618 samples, the differences between the measured values by the two methods are higher than the accuracy of the XRD method for the RS measurements.Figure 13, for instance, shows the sin 2 ψ and cosα diagram of AA2618-M sample.
Figure 13 clearly shows that the measured data cannot be accurately fitted.Although the fitting curve is closer to the measured data in the sin 2 ψ method, some levels of uncertainties are expected from these measurements.For the cosα method, the measurements are highly oscillating and clearly out of linear distribution, which result in higher levels of uncertainties from the fitting of these curves.One reason for these higher uncertainties is the higher number of the data in cosα method compared to the sin 2 ψ method, 500 versus 12.The results of the sin 2 ψ method seem to be more accurate in this case because of the better fitting of the curves.But since the exact value of the RS of the sample is not known, it is not possible to have a certain conclusion about the accuracy of the methods for these coarse grain components.Almost the same level of errors and data quality were observed for the AA2618-LSP sample.However, the AA7075-M and AA7075-LSP samples showed less differences between the sin 2 ψ and cosα measurements, although, the uncertainties of the cosα measurements are still high.Figure 14 shows the sin 2 ψ and cosα diagrams of the AA7075-LSP sample for the discussion of the differences.
Both for the cosα and sin 2 ψ methods, the fitting here is better than for the AA2618-M sample, although there are evident oscillations in the cosα diagrams, which increase the uncertainties of the measurements.The sin 2 ψ fitting seems better than the one of the cosα method and therefore, the results are expected to be more accurate.There is a small deviation when comparing the results of both methods.Although cosα shows high levels of uncertainties coming from the fitting of the ε α1 -cosα curves.The intensity distributions around the D-S ring, Fig. 14(e) and (f), show clear effects of the coarse grain structure.But there are reflections from all around the ring (all α angles), which make it easier for the software to calculate the RS.The background is also not too high to interfere with the determination of the reflection position.
SiSiC and HP NO30-15 samples almost show the same behavior as the previous coarse grain structure samples, with different levels of the oscillation and spottiness of the D-S ring. Figure 15 shows, for example, these results for the SiSiC ceramics.As is seen in Fig. 15(c, d, e), and (f), the fluctuations in the cosα diagram and the spottiness of the D-S ring at the reflection of interest are almost the same as for the AA7075-LSP sample and lower than for the AA2618-M sample.But the uncertainties are almost twice as high.Looking at the reflections from the sample with the sin 2 ψ method, Fig. 16a, reveals that there are two reflections very close to one another, namely the SiC-6H and SiC-3C reflections.These reflections have been taken as a single broad reflection by the Pulstec detector (cosα method).While the SiC-3C reflection was taken for the RS calculations in both methods.This results in miscalculation of the reflection position, which in turn causes errors in the RS determination.Furthermore, the SiC-6H phase is highly textured and vanishes at some portions of the D-S ring, which affects the position of the broad reflection.Also, the presence of this phase on the left-hand side of SiC-3C phase causes asymmetry in the reflection.Considering that the ASTRAY software (cosα method) utilizes Lorentzian fitting of individual reflections, which is most accurate for the symmetric reflections, the mentioned asymmetries   result even in higher errors.It is also obvious that the net intensity of the reflections from the cosα method are lower.These problems all together cause high levels of uncertainties in the RS calculations.Due to the higher resolution of the detector, which enables distinguishing two reflections, the sin 2 ψ measurement shows lower levels of uncertainties and is more accurate.
The worst case of coarse grain effect appears for the HP NO30-15 sample, which has extremely coarse grains, Fig. 12e, and shows uncertainties as large as ± 421 MPa in point 1 of the cosα method.These uncertainties come from the poor data collected by the cosα instrument.It was not possible to collect enough data using the instrument of the cosα method for the analysis and the results show high levels of uncertainties. Figure 17 shows the collected data for point 1 of the sample.The 2θ-sin 2 ψ curve shows some oscillations that introduce some levels of errors to the calculation.But it seems more accurate due to lower level of oscillations compared to the cosα measurements.

Textured and coarse-grain structure parts
Additively manufactured and rolled 1.4404 parts in direction 1 showed both effects of the coarse grain and texture.All the measurements of these samples with the cosα method show high levels of uncertainties.In some cases, the RS values measured by the cosα and sin 2 ψ methods are in a good agreement, and in other cases, there is a large difference between them.One example of each case is presented here to discuss the possible reasons.The full results of these measurements and discussion of the results could be found in [37].Figure 18 shows the sin 2 ψ and cosα diagrams of the 1.4404-rolled sample at point 2 as a representative of the measurements with high differences between the results of the methods.It is obvious in Fig. 18 that the analysis curves of neither methods are perfectly fitted, and there are some levels of errors in both measurements.Like other 1.4404 samples, there is a high fluorescence from the samples, which creates high backgrounds.These backgrounds make it difficult for the software to determine the exact reflection position, since the background at higher reflection angles, for instance, has intensities comparable to the intensities of the reflection.Using the high-resolution option with energy discrimination of the D8 Discover instrument (sin 2 ψ method) eliminated most of these backgrounds and lowered errors from this effect.Furthermore, better fit was achieved in sin 2 ψ measurements as well.Therefore, the measurements of the sin 2 ψ method are assumed to be more accurate.
Figure 19 shows the sin 2 ψ and cosα diagrams of the 1.4404-AM sample at point 2, where both the measurements showed quite the same residual stress values.Results show that the fitting of both the methods are acceptable.Please note the values of the vertical axis of the diagrams are in the order of 10 −4 .Due to relatively low oscillations in the cosα diagram the results are close to what was measured by the sin 2 ψ method.The reflections of the sample in cosα measurement like the 1.4404-rolled sample showed fluorescence, which potentially affects the results.But the results are in a good agreement with the measurements by sin 2 ψ method.Although, they show higher levels of uncertainties compared to the sin 2 ψ and other measurements by the cosα method with similar oscillations in the curve, which did not have the fluorescence reflection issue.
From the total 9 measurements of samples with texture and coarse grain microstructure, four of them showed approximately the same results with both the methods and five had different values.The quality of the data collected in all measurements was almost the same.Almost the same background effect and oscillation of the data were observed in all measurements.In these cases, where a combination of texture, coarse grain, and fluorescence from the sample exist, because of high uncertainties and lower quality of data, distinguishing correct and incorrect data from the cosα method is not easily possible.There is no K β filter available for the cosα instruments, the IP detectors do not possess high quality needed for distinguishing reflections and eliminating the fluorescence, and therefore all the measurements show almost the same level of uncertainties.The sin 2 ψ instruments on the other hand, benefit from more powerful 1D position sensitive detectors, their laboratory instruments have the option of narrowing the high and low threshold and eliminate the fluorescence reflections, and they possess K β filters.Thus, the measurements of this method in these cases are more reliable.
Figure 20 summarizes the RS results measured by the two methods.In the figure, the results are categorized based on the material and the sample condition.
The results in this figure are categorizes according to the material, Fig. 20a, and sample condition, Fig. 20b.The investigated materials have been divided into four categories, aluminum alloys, ferritic steels, austenitic steels and SiSiC ceramics.Figure 20a clearly shows that for all the materials, except for SiSiC which has only one condition, there are some measurements with a good agreement between the results of both methods and some with high differences.It proves that the material itself is not a limiting factor in utilizing either of these measurement methods.Looking at Fig. 20b reveals that the microstructure has a significant effect on the accuracy of the measurements.In cases where steep in-depth or lateral RS exist in the sample, none of the measurements show a good agreement.These differences mainly come from the different penetration depth of the X-ray in each method and different lateral accuracy of the instruments in positioning of the beam.When the components are textured, have coarse grain or a combination of both, some measurements show a good agreement while the others show different results.When these material conditions are minor or mild the results come from both measurement methods are almost the same.However, when these problems are severe, weak agreement between the results are observed.The level of uncertainty of the measurements are also highly depends on the severity of these conditions and determines the trustworthiness of the measurements.However, the trustworthiness of the results is easily judgeable by examining the quality of the collected data.RS results of poor collected data should not be trusted under any circumstances.

Conclusions
The accuracy of the XRD-based sin 2 ψ and cosα methods for industrial applications was investigated in this work for different alloys, production processes, and initial microstructure conditions.The initial microstructure, which is the result of the production history of the component, has the dominant effect on the measurement accuracy.Texture (preferred crystallographic orientation), coarse grain structure or a combination of them, negatively affect the quality of the measurements by both the methods.The cosα method seems more prone to miscalculation of the RS in these cases.The uncertainties in this method mainly come from lower resolution of the IP detector used in the cosα instruments compared to the position sensitive detectors utilized in sin 2 ψ instruments, the formulation for RS calculations which is valid only if the ε α1 -cosα distribution is linear, Lorentzian peak fitting used by the analyzing software, which poorly estimates the position of asymmetric reflections, and the absence of K β filtering.sin 2 ψ instruments, on the other hand, possess high quality position sensitive detectors, most of their instruments have K β filters, and in laboratory instruments high resolution detectors could be deployed.The method is better established and more sophisticated peak fitting methods, such as pseudo-Voigt are available for the analysis.Moreover, it has well-established models and procedures to deal with nonlinear 2θ-sin 2 ψ distributions, which come from the above-mentioned microstructures.The texture and coarse grain effects show themselves as oscillations in the 2θ-sin 2 ψ curves in the same manner.They could be distinguished by performing a ψ scan at a constant diffraction angle (2θ).If the reflection intensity highly changes the material is textured, otherwise it has coarse grains.In the cosα method texture causes non-uniform intensity distribution around the D-S ring, in which one side of the ring has higher intensities and the other side has lower.If the material is highly textured, there is a large gap in the ε α1 -cosα curves coming from the data loss due to no reflections at some parts of the D-S ring.Coarse grain effect, on the other hand, causes spottiness of the D-S ring and oscillations in the ε α1 -cosα curves.If the grains are too course, some part of the data might lose, which result in random gaps in the ε α1 -cosα distributions.When the material does not show any sign of severe texture, highly coarse grain structure, high fluorescence reflections and asymmetric reflections, both methods show almost the same RS values.In these cases, cosα method is a more sensible method, since the measurement times are significantly shorter than the sin 2 ψ method, while the accuracy is comparable to the sin 2 ψ measurements.In contrast, when the sample is textured, has coarse grains, shows asymmetric reflections, or has high fluorescence reflections, sin 2 ψ method seems a better option.Special attention should be paid to the cases when steep lateral or in-depth RS gradients exist in the sample.Due to different penetration depths of cosα and sin 2 ψ methods, each measurement shows a different RS value, which comes from targeting a different depth of the specimen.In these cases, deploying methods with constant penetration depth reduces the differences and uncertainties.Usually, the XRD analysis software packages give the error resulting from the fitting of the curves.But in the case of the microstructural issues mentioned here, higher levels of uncertainties must be considered due to the material condition.
Shear stresses measured by the sin 2 ψ and cosα methods should be treated carefully.The former measures out-of-plane shear stresses (σ 13 ), while the latter measures in-plane shear stresses (σ 12 ).Therefore, the measured shear RS by these methods must not be compared.The presence of shear stresses is not evident in the ε α1 -cosα distributions of the cosα method, and should be checked by studying ε α2 -sinα curves.It should be noted, when high levels of out-of-plane shear stress exist in the specimen, σ 13 ≠ 0 and σ 23 ≠ 0, the cosα method explained here, which is based on the plain stress assumption, cannot be deployed.
More work on the cosα method is needed to incorporate more sophisticated fitting methods, improve the analysis methods for nonlinear cosα distributions, develop a sophisticated method proper for samples with high levels of out-of-plane shear RS, and advance the IP detectors.

Figure 1
Figure 1 Sample (S) and laboratory (L) coordinate systems used for the RS measurements [2].

Figure 2
Figure 2 Schematic representation of the shift in the reflection position due to RS.

Figure 4
Figure 4 Schematic illustration of changes in the D-S ring due to a normal RS and b shear RS.The green circles show the D-S ring of the stress-free sample and blue ellipsoids/circles represent the D-S ring of a sample with RS.

1 − 1 Figure 5
Figure 5 Changes in the X-ray penetration depth of a given material and reflection angel according to the geometrical angels of a sin 2 ψ with side inclination and b cosα methods.

Figure 6
Figure 6 2θ, d, ε versus sin 2 ψ/cosα and D-S-rings for a and e good measurement condition with and without shear stresses, please note that for the analysis of shear stresses in the cosα method ε should be plotted versus sinα; b and f materials with

Figure 7 a
Figure 7 a AA2618, b 1.4545, c HP NO30-15, d AA7075, e SiSiC, f 1.4545 samples.Red spots show the measurement points.Sample c was only measured in direction 1.For part f,

Figure 9 (
Figure 9(a) and (b) shows a slight curvature in the sin 2 ψ distribution, which indicates in-depth RS gradients of the component.The penetration depth of the sin 2 ψ was calculated to be 3.7 to 5.2 μm for the tilt angle range of − 45 to 45°, Eq. (12).These values were calculated 4 to 5.7 μm for different azimuthal angles

Figure 8
Figure 8 sin 2 ψ in a direction 1 and b direction 2, cosα and corresponding D-S ring in c direction 1 and d direction 2, the intensity distributions along α in e direction 1 and f direction 2 of 1.4545-M sample.

Figure 9
Figure 9 sin 2 ψ in a direction 1 and b direction 2, cosα and corresponding D-S ring in c direction 1 and d direction 2, the intensity distributions along α in e direction 1 and f direction 2 of 1.4545-SP sample.

Figure 10
Figure 10 sin 2 ψ in a direction 1 and b direction 2, cosα and corresponding D-S ring in c direction 1 and d direction 2, the intensity distributions along α in e direction 1 and f direction 2 of the AA7075-SP.

Figure 11 a
Figure 11 a sin 2 ψ diagram, b cosα curve and corresponding D-S ring, and c the intensity distributions along α of the 1.4404-rolled sample at point 2 in direction 2.

Figure 13
Figure 13 sin 2 ψ diagram of a direction 1 and b direction 2; cosα curve and corresponding D-S ring of c direction 1 and d direction 2, the intensity distributions along α in e direction 1 and f direction 2 of the AA2618-M sample.

Figure 14
Figure 14 sin 2 ψ diagram of a direction 1 and b direction 2; cosα curve and corresponding D-S ring of c direction 1 and d direction 2, the intensity distributions along α in e direction 1 and f direction 2 of the AA7075-LSP sample.

Figure 15
Figure 15 sin 2 ψ diagram of a direction 1 and b direction 2; cosα curve and corresponding D-S ring of c direction 1 and d direction 2, the intensity distributions along α in e direction 1 and f direction 2 of SiSiC sample.

Figure 16 a
Figure 16 a reflections from sin 2 ψ and cosα measurements, b different full width at half maximum (FWHM) and position of reflections at different α angles in cosα measurement due to textured SiC-6H phase.

Figure 17 a
Figure 17 a sin 2 ψ curve, b cosα diagram, and c the intensity distributions along α in direction 1 of point 1 of the HP NO30-15 sample.It should be noted there is a break in the vertical axis of the cosα diagram.

Figure 18 a
Figure 18 a sin 2 ψ curve, b cosα diagram, and c the intensity distributions along α of the 1.4404-rolled sample at point 2 in direction 1.

Figure 19
Figure 19 sin 2 ψ diagram of a direction 1 and b direction 2; cosα curve and corresponding D-S ring of c direction 1 and d direction 2, the intensity distributions along α in e direction 1 and f direction 2 of the 1.4404-AM sample at point 2.

Figure 20
Figure 20 cosα RS versus sin 2 ψ RS depending on the a material and b sample condition.

Table 2
Sample conditions

Table 3
Measurement conditions for the sin 2 ψ method

Table 5
Material elastic constants used for the RS calculations.(311)and (220) in the table represent the reflection planes used for the measurements by sin 2 ψ and cosα methods, respectively