## 4 Numerical Examples
### Thermal Fracturing Due to Rock Heterogeneity  
Previous research has predominantly employed two approaches to characterize rock heterogeneity. The first assumes that rock's physical and mechanical properties conform to a statistical distribution. The second derives the actual mineral composition via digital image processing (DIP). While these approaches yield useful results, they are not without limitations. The statistical method overlooks the real mineral composition. DIP, though precise, is confined to lab settings due to its high costs. Accordingly, we introduce the Knuth-Durstenfeld shuffle algorithm to capture rock mineral heterogeneity [5; 49]. The detailed procedure of the Knuth-Durstenfeld shuffle algorithm applied in the present study is as follows: (1) Determine the total number of elements, N, in the numerical model; (2) Assign the number of elements occupied by each mineral according to its volumetric fraction. If the volume fractions of quartz, feldspar, amphibole, and clay minerals are P\({}_{1}\), P\({}_{2}\), P\({}_{3}\), and P\({}_{4}\), respectively, then the corresponding element counts are N\({}_{i}\) = N \(\times\) P\({}_{i}\); (3) Enumerate all elements in sequential order and endow each with the appropriate  
Figure 16: Final crack patterns at different heat transfer coefficients. Figure 17: Distribution of crack morphology under different heat transfer coefficients. physical-mechanical parameters; (4) Apply the shuffle algorithm to reorder the parameter array, yielding a new parameter distribution. This algorithm combines the benefits of random statistical distribution with consideration of actual mineral composition. Additionally, it is well-suited for characterizing large-scale in-situ rock mass heterogeneity. A model considering the actual composition of the minerals is established, as shown in Figure 18. The physical and mechanical parameters for each mineral type are provided in Table 1.  
To explore the thermal damage mechanism induced by mineral heterogeneity during high-temperature heat treatment of sandstone specimens, a sandstone sample heated to 600 \({}^{\circ}\)C was chosen. Figures 19 and 20 illustrate the changes in temperature and stress fields inside the sandstone during heat treatment, as well as the temperature distribution of sandstone samples at different cross-sections when heated to 600 \({}^{\circ}\)C. During heating, heat gradually propagates inward from the exterior. However, due to sandstone's heterogeneity, the thermophysical parameters of different mineral crystals vary, causing the temperature contour lines to exhibit noticeable tortuosity (Figure 19a). Once thermal cracks form, they impede heat conduction, leading to significant temperature differences across the cracks and temperature discontinuity. The overall temperature on different cross-sections roughly follows a parabolic trend, but fluctuations occur in the temperature curve due to differences in thermophysical parameters. The temperature near the boundary is higher, while the middle part has the lowest temperature. The temperature at cracks on the intercept changes significantly, such as at points (38 mm, 10 mm) and (25.2 mm, 30 mm). Due to the heterogeneity of mineral thermal expansion coefficients, non-uniform thermal expansion occurs within the sandstone at high temperatures. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Mineral** & **Quartz** & **Feldspar** & **Amphibole** & **Clay Minerals** \\ \hline Content (\%) & 40.14 & 30.75 & 15.16 & 13.95 \\ \(E\) (GPa) & 12 & 8 & 10 & 8 \\ \(v\) & 0.16 & 0.19 & 0.23 & 0.22 \\ \(G_{c}\) (N/m) & 2.56 & 1.19 & 1.15 & 0.76 \\ \(\rho\) (kg/m\({}^{3}\)) & 2650 & 2570 & 2650 & 2410 \\ \(k\) (W/(m\text{-}K)) & 7.69 & 2.31 & 3.00 & 2.15 \\ \(C_{p}\) (J/(kg\text{-}K)) & 700 & 630 & 800 & 700 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Physical and mechanical parameters of sandstone. Figure 18: Numerical model. This results in huge thermal stresses at mineral boundaries (Figure 19b,c).