# An Integrated Software for Computing Mechanical Properties of Crystalline Material by Means of XRD
## 2 Material Analyzing Software
### Stress Measurement by X-ray Diffraction  
Stress determination is based on lattice strain, which is expressed by the following Bragg's law as:  
\[n\lambda=2d_{hkl}\sin\theta \tag{15}\]  
where \(\lambda\) is wavelength, \(\theta\) is Bragg angle, \(d_{hkl}\) is interplanar spacing, and \(n\) is an integer. If the Bragg angle \(\theta\) in the stress direction is measured, the lattice spacing \(d_{hkl}\), and thus the stress, is determined. Figure 5 shows the coordinate system 11, 22, and 33 on the surface of the specimen. The stress measurement direction L\({}_{3}\) is the normal plane of the crystalline matrix. The stresses \(\sigma_{\rm ij}\) generate the strains \(\varepsilon_{\rm ij}\). Figure 4: Determination of slope in smoothing technique. Figure 5: Relation between measured strain \(\varepsilon_{33}^{L}\) and the stresses \(\sigma_{\rm ij}\) generated in the surface layer. The strain \(\varepsilon_{33}^{L}\) in the measurement direction is determined from the lattice spacing \(d_{hkl}\) as [2;3]  
\[\varepsilon_{33}^{L}=\frac{d_{hkl}-d_{0}}{d_{0}} \tag{16}\]  
where \(d_{0}\) is the lattice spacing in the non-stress state. Equation (16) can be expressed in terms of strains \(\varepsilon_{\bar{y}}\) (\(i\)\(j\) = 1 to 3) in the specimen coordinate system by the tensor transformation as  
\[\varepsilon_{33}^{L}=a_{3k}a_{3k}\varepsilon_{3l} \tag{17}\]  
where \(a_{3k}\), \(a_{3l}\) are, respectively, the directional cosines between the normal of the diffraction plane and the axes 11, 22, and 33 to the direction cosine matrix as shown in Figure 5 by  
\[a_{ik}=\left[ \begin{array}{ccc}\cos\varphi\cos\psi&\sin\varphi\cos\psi&-\sin \psi\\ -\sin\varphi&\cos\varphi&0\\ \cos\varphi\sin\psi&\sin\varphi\sin\psi&\cos\psi\end{array} \right] \tag{18}\]  
From Equations (16)-(18), the relation between a strain in the laboratory system and the strain components in the specimen system is:  
\[ \begin{array}{l}\varepsilon_{33}^{L}=\frac{d_{hkl}-d_{0}}{d_{0}}= \varepsilon_{11}\cos^{2}\varphi\sin^{2}\psi+\varepsilon_{12}\sin 2\varphi \sin^{2}\psi+\varepsilon_{22}\sin^{2}\varphi\sin^{2}\psi\\ +\varepsilon_{33}\cos^{2}\psi+\varepsilon_{13}\cos\varphi\sin 2\psi+\varepsilon_{23} \sin\varphi\sin 2\psi\end{array}  \tag{19}\]  
From the elastic theory, strain-stress relation gives:  
\[ \begin{array}{l}\varepsilon_{33}^{L}=\frac{1+\
u}{E}(\sigma_{11}\cos^{2} \varphi+\sigma_{12}\sin 2\varphi+\sigma_{22}\sin^{2}\varphi-\sigma_{33})\sin^{2} \psi\\ +\frac{1+\
u}{E}\sigma_{33}-\frac{\
u}{E}(\sigma_{11}+\sigma_{22}+\sigma_{33} )\\ +\frac{1+\
u}{E}(\sigma_{13}\cos\varphi+\sigma_{23}\sin\varphi)\sin 2\psi \end{array}  \tag{20}\]  
where \(E\) is the [PERSON]'s modulus and \(v\) is [PERSON]'s ratio. For a plane stress state of the specimen, the third stress components are zero. Equation (20) becomes:  
\[\varepsilon_{33}^{L}=\frac{1+\
u}{E}\sigma_{\varphi}\sin^{2}\psi-\frac{\
u}{ E}(\sigma_{11}+\sigma_{22}) \tag{21}\]  
where \(\sigma_{\phi}\) is the term stress in the \(\phi\) azimuth. Equation (21) can be written as:  
\[d_{hkl}=d_{0}\frac{1+\
u}{E}\sigma_{\varphi}\sin^{2}\psi-d_{0}\frac{\
u}{E}( \sigma_{11}+\sigma_{22})+d_{0} \tag{22}\]  
If we put \(m\) as the slope of the straight line fitted to the lattice spacing \(d\) in the d\({}_{hkl}\)-sin\({}^{2}\)\(\Downarrow\) diagram, the stress can be determined as:  
\[\sigma_{\varphi}=\frac{m}{d_{0}}(\frac{E}{1+\
u}) \tag{23}\]  
where \(m\) is the slope in Equation (22). Now, \(m\) is determined experimentally from the sin\({}^{2}\)\(\Downarrow\) diagram by fitting a straight line to a set of experimental points (\(d_{hkl1}\), sin\({}^{2}\)\(\Downarrow\)), (\(d_{hkl2}\), sin\({}^{2}\)\(\Downarrow\)),... (\(d_{hkln}\), sin\({}^{2}\)\(\Downarrow\)) using the least-squared method.