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 (\(\overrightarrow{\mathrm{S}}\)) and laboratory (\(\overrightarrow{\mathrm{L}}\)) coordinate systems.

Figure 1
figure 1

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

\({\overrightarrow{S}}_{\varphi }\) 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.

Figure 2
figure 2

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

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).

$$\left( {\mathop {\varepsilon _{{33}} }\limits^{{^{\prime } }} } \right)_{{\varphi \psi }} = n_{1}^{2} \varepsilon _{{11}} + n_{2}^{2} \varepsilon _{{22}} + n_{3}^{2} \varepsilon _{{33}} + 2n_{1} n_{2} \varepsilon _{{12}} + 2n_{1} n_{3} \varepsilon _{{13}} + 2n_{2} n_{3} \varepsilon _{{23}}$$
(1)

The following sub-sections give more details about the two analysis methods, their calculation approaches, assumptions, advantages, and disadvantages.

sin2 ψ 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 sin2ψ is calculated from the following equation [2]:

$$n = \left( {\begin{array}{*{20}c} {n_{1} } \\ {n_{2} } \\ {n_{3} } \\ \end{array} } \right) = \left( {\begin{array}{*{20}c} {\sin \psi \cos \varphi } \\ {\sin \psi \sin \varphi } \\ {\cos \psi } \\ \end{array} } \right)$$
(2)

The residual strains in the sin2ψ method then can be calculated as [2]:

$$\left( {\mathop {\varepsilon _{{33}} }\limits^{\prime } } \right)_{{\varphi \psi }} = \frac{{\left( {d_{{{\text{hkl}}}} } \right)_{{\varphi \psi }} - d_{0} }}{{d_{0} }} = {\text{ }}\varepsilon _{{11}} \cos ^{2} \varphi \sin ^{2} \psi + \varepsilon _{{12}} \sin {2} \varphi \sin ^{2} \psi + \varepsilon _{{22}} \sin ^{2} \varphi \sin ^{2} \psi {\text{ }}\quad + \varepsilon _{{33}} \cos ^{2} \psi + \varepsilon _{{13}} \cos \varphi \sin {2} \psi + \varepsilon _{{23}} \sin \varphi \sin {2} \psi$$
(3)

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 \(\left( {\mathop \varepsilon \limits^{\prime }_{33} } \right)_{\varphi \psi }\) 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 \({\overrightarrow{\mathrm{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, \({\left({\overrightarrow{\mathrm{L}}}_{33}\right)}_{\varphi \psi }\). 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 sin2ψ. When either of these terms are not zero, i.e., shear strains presents, there is a ψ-splitting due to the sin2ψ 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]:

$$\varepsilon_{\varphi \psi } = \frac{1}{2}s_{2} \left( {{\text{hkl}}} \right)\left[ {\sigma_{11} \sin^{2} \psi + \sigma_{33} \cos^{2} \psi } \right] + \frac{1}{2}s_{2} \left( {{\text{hkl}}} \right)\left[ {\sigma_{13} \sin{2} \psi } \right] + s_{1} \left( {{\text{hkl}}} \right)\left[ {\sigma_{11} + \sigma_{22} + \sigma_{33} } \right]$$
(4)

in which s1(hkl) and \(\frac{1}{2}{s}_{2}\left(\mathrm{hkl}\right)\) are the {hkl}-dependent X-ray elastic constants (XEC), \({s}_{1}\left(\mathrm{hkl}\right)=-\frac{{\nu }^{\mathrm{hkl}}}{{E}^{\mathrm{hkl}}}\), \(\frac{1}{2}{s}_{2}\left(\mathrm{hkl}\right)=\frac{1+{\nu }^{\mathrm{hkl}}}{{E}^{\mathrm{hkl}}}\) [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]:

$$\frac{{d_{\psi } - d_{0} }}{{d_{0} }} = \frac{1}{2}s_{2} \sigma_{\varphi } \sin^{2} \psi + \frac{1}{2}s_{2} \sigma_{13} \sin{2} \psi + s_{1} \left( {\sigma_{11} + \sigma_{22} } \right)$$
(5)

This equation shows a linear relationship between dψ and sin2ψ when no shear stress exists on the surface, σ13 = 0. Therefore, the σφ could be calculated from the slope of the dψ versus sin2ψ curve by the linear regression approach. Since determining the lattice spacing of a stress-free material, d0, is challenging, the lattice spacing of the first tilt angle is considered as d0, 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 sin2ψ method.

Since different exposures at different angles are needed and each exposure takes a few minutes, each RS measurement by the sin2ψ method takes around a few hours to complete.

It is worth mentioning when the sample has a complex geometry, the sin2ψ 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 sin2ψ 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]:

$$n = \left( {\begin{array}{*{20}c} {n_{1} } \\ {n_{2} } \\ {n_{3} } \\ \end{array} } \right) = \left( {\begin{array}{*{20}c} {\cos \eta \sin \psi_{0} \cos \varphi_{0} - \sin \eta \cos \psi_{0} \cos \varphi_{0} \cos \alpha - \sin \eta \sin \varphi_{0} \sin \alpha } \\ {\cos \eta \sin \psi_{0} \sin \varphi_{0} - \sin \eta \cos \psi_{0} \sin \varphi_{0} \cos \alpha + \sin \eta \cos \varphi_{0} \sin \alpha } \\ {\cos \eta \cos \psi_{0} + \sin \eta \sin \psi_{0} \cos \alpha } \\ \end{array} } \right)$$
(6)

Figure 3 shows the reflection geometry in the cosα method and the angles used in Eq. (6).

Figure 3
figure 3

Reflection geometry in cosα method [7].

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.

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.

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]:

$$\varepsilon_{{\alpha_{1} }} \left( {\varphi_{0} } \right) = \frac{{\left[ {\left( {\varepsilon_{\alpha } - \varepsilon_{\pi + \alpha } } \right) + \left( {\varepsilon_{ - \alpha } - \varepsilon_{\pi - \alpha } } \right)} \right]}}{2}$$
(7)
$$\varepsilon_{{\alpha_{2} }} \left( {\varphi_{0} } \right) = \frac{{\left[ {\left( {\varepsilon_{\alpha } - \varepsilon_{\pi + \alpha } } \right) - \left( {\varepsilon_{ - \alpha } - \varepsilon_{\pi - \alpha } } \right)} \right]}}{2}$$
(8)

in which, \(\varepsilon_{\alpha } = \frac{{\cos^{2} \theta_{0} }}{{2L_{{\text{m}}} \tan \theta_{0} }}\left( {r_{\alpha } - r_{0} } \right)\), where Lm is calculated from the mean radius, rm. 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]:

$$\varepsilon_{\alpha } = \sigma_{11} \left( \frac{1}{E} \right)\left[ {n_{1}^{2} - \nu \left( {n_{2}^{2} + n_{3}^{2} } \right)} \right] + \sigma_{22} \left( \frac{1}{E} \right)\left[ {n_{2}^{2} - \nu \left( {n_{1}^{2} + n_{3}^{2} } \right)} \right] + \sigma_{12} \left[ {\frac{{2\left( {1 + \nu } \right)}}{E}} \right]\left( {n_{1} n_{2} } \right)$$
(9)

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 εα2-sinα curves, respectively [7]:

$$\sigma_{11} \left( {\varphi_{0} = 0} \right) = - \frac{E}{{\left( {1 + \nu } \right)}}\frac{1}{{\sin{2} \eta }}\frac{1}{{\sin{2} \psi_{0} }}\left( {\frac{{\partial \varepsilon_{\alpha 1} }}{\partial \cos \alpha }} \right)$$
(10)
$$\sigma_{12} \left( {\varphi_{0} = 0} \right) = \frac{E}{{2\left( {1 + \nu } \right)}}\frac{1}{{\sin{2} \eta }}\frac{1}{{\sin \psi_{0} }}\left( {\frac{{\partial \varepsilon_{\alpha 2} }}{\partial \sin \alpha }} \right)$$
(11)

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, the measured shear stresses by Eq. (11) is in a different direction from what is calculated by sin2ψ 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 Williamson-Hall [20] 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 sin2ψ method. There are two tilting methods in the sin2ψ 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]:

$$\tau = \frac{\sin \theta \cos \psi }{{2\mu }}$$
(12)

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].

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 sin2ψ with side inclination and b cosα methods.

Similar to the sin2ψ 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]:

$$\tau = \frac{1}{\mu }\left[ {\frac{1}{{\cos \psi_{0} }} + \frac{1}{{ - \cos{2} \theta \cos \psi_{0} + \sin{2} \theta \sin \psi_{0} \cos \alpha }}} \right]^{ - 1}$$
(13)

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 sin2ψ methods rely on the linear correlation between two quantities, namely between 2θ and sin2ψ 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 sin2ψ/cosα plots and the D-S ring for the ideal situations for a sample with good measurement condition in sin2ψ and cosα methods. The presence of shear RS causes splitting in the sin2ψ 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 sin2ψ, and σ12 in the cosα method. Coarse grain structure causes oscillation in 2θ-sin2ψ 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θ-sin2ψ 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θ-sin2ψ curves. By performing ψ scans at a constant θ angle, the coarse grain and texture could be distinguished in the sin2ψ method. Finally, RS gradients in the sin2ψ measurements result in curvature in the 2θ-sin2ψ 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].

Figure 6
figure 6

2θ, d, ε versus sin2ψ/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 coarse grain microstructure; c and g materials with textured microstructure; and d and h in-depth stress gradients near the surface.

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 sin2ψ method [27, 30].

The accuracy and precision of the cosα method compared to the sin2ψ-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 sin2ψ 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.

Materials and methods

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.

Table 1 Chemical composition of the investigated alloys

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 as-fired 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.

Table 2 Sample conditions

Figure 7 shows the samples measured in this study.

Figure 7
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, points 1, 2 and 3 are 5 mm, 10 mm and 15 mm away from the weld center line. Scalebars in all figures are in mm.

Measurements

For the sin2ψ 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 sin2ψ method.

Table 3 Measurement conditions for the sin2ψ 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 sin2ψ 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 sin2ψ 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.

Table 4 Measurement conditions for the cosα method

To calculate the RS from the measured strains, the equations mentioned in Sections "sin2ψ method" and "cosα method" were used. Our in-house code was used for the calculations of the sin2ψ 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.

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 sin2ψ and cosα methods, respectively

For the fitting of the reflections, the Lorentz fitting was used for the cosα method, and the pseudo-Voigt method was used for the sin2ψ method. Also, an elliptical fit was utilized for the fitting of the 2θ-sin2ψ 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θ-sin2ψ and εα1-cosα diagrams of 1.4545-M sample.

Figure 8
figure 8

sin2ψ 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.

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 sin2ψ 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 sin2ψ and cosα diagrams of the 1.4545-SP sample.

Figure 9
figure 9

sin2ψ 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 9(a) and (b) shows a slight curvature in the sin2ψ distribution, which indicates in-depth RS gradients of the component. The penetration depth of the sin2ψ 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 (α) 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 sin2ψ 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 sin2ψ measurements. Figure 10, for instance, shows the sin2ψ and cosα diagrams of the AA7075-SP sample.

Figure 10
figure 10

sin2ψ 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.

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 sin2ψ and cosα diagrams of the sample in direction2 of point 2.

Figure 11
figure 11

a sin2ψ 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 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 sin2ψ method, significantly reduced the effect of fluorescence from the surface and made the measurements more accurate. Although, the measured values by the sin2ψ 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 sin2ψ curve and changes in the reflection intensities of different tilt angles. The microscopy observations also proved the presence of coarse grain structure, Fig. 12.

Figure 12
figure 12

Microstructure of a AA2618-M, b AA2618-LSP, c AA7075-M, d AA7075-LSP, e HP NO30-15, f SiSiC samples.

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 sin2ψ and cosα diagram of AA2618-M sample.

Figure 13
figure 13

sin2ψ 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 13 clearly shows that the measured data cannot be accurately fitted. Although the fitting curve is closer to the measured data in the sin2ψ 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 sin2ψ method, 500 versus 12. The results of the sin2ψ 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 sin2ψ and cosα measurements, although, the uncertainties of the cosα measurements are still high. Figure 14 shows the sin2ψ and cosα diagrams of the AA7075-LSP sample for the discussion of the differences.

Figure 14
figure 14

sin2ψ 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.

Both for the cosα and sin2ψ 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 sin2ψ 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.

Figure 15
figure 15

sin2ψ 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.

Looking at the reflections from the sample with the sin2ψ 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 sin2ψ measurement shows lower levels of uncertainties and is more accurate.

Figure 16
figure 16

a reflections from sin2ψ 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.

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θ-sin2ψ 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.

Figure 17
figure 17

a sin2ψ 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.

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 sin2ψ 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 sin2ψ 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.

Figure 18
figure 18

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

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 (sin2ψ method) eliminated most of these backgrounds and lowered errors from this effect. Furthermore, better fit was achieved in sin2ψ measurements as well. Therefore, the measurements of the sin2ψ method are assumed to be more accurate.

Figure 19 shows the sin2ψ 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 sin2ψ 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 sin2ψ method. Although, they show higher levels of uncertainties compared to the sin2ψ and other measurements by the cosα method with similar oscillations in the curve, which did not have the fluorescence reflection issue.

Figure 19
figure 19

sin2ψ 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.

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 sin2ψ 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.

Figure 20
figure 20

cosα RS versus sin2ψ RS depending on the a material and b 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 sin2ψ 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 sin2ψ 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. sin2ψ 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θ-sin2ψ distributions, which come from the above-mentioned microstructures. The texture and coarse grain effects show themselves as oscillations in the 2θ-sin2ψ 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 sin2ψ method, while the accuracy is comparable to the sin2ψ measurements. In contrast, when the sample is textured, has coarse grains, shows asymmetric reflections, or has high fluorescence reflections, sin2ψ 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 sin2ψ 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 sin2ψ 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.

Data and code availability

The data of this manuscript are available by request.