## 3 Model Construction and Parameter Selection  
The process of 3D numerical modeling can be subdivided into four steps. First, a three-dimensional laser scanner was used to obtain point-cloud modeling data. Second, a three-dimensional modeling process was performed based on the point-cloud modeling data to obtain a three-dimensional model. Third, a texture-mapping process was performed on the three-dimensional model to obtain a grotto mode. Fourth, combined with geological surveys, a comprehensive 3D geological model of the Yuanjue Grottos with their joints and fissures was constructed using software such as Autodesk ReCap, Geomagic studio, Rhino, and FLAC\({}^{\text{3D}}\).  
For this simulation, the target was the cliff which, under static conditions, does not exhibit significant internal deformation or flow. Therefore, the Mohr-Coulomb model was employed for the analysis. In FLAC\({}^{\text{3D}}\), the Mohr-Coulomb model was represented in a three-dimensional principal stress space, where the corresponding strain components were the three principal strains. In the principal stress space, the incremental equation of [PERSON]'s law can be expressed as follows:  
\[\delta\sigma_{ij}=2G\delta\epsilon_{ij}+(3\text{K}-2\text{G})(\delta\epsilon_{ ik}\delta_{ij})/3,\]  
\[\delta\epsilon_{ij}=(3\text{K}-2\text{G})(\delta\sigma_{ij}-\delta\sigma_{ ik}\delta_{ij}/3)/6\text{K}+2\text{G}(\delta\epsilon_{ij}-\delta\epsilon_{kk} \delta_{ij}/2)\delta\epsilon_{\bar{\imath}}/3.\]  
where \(\delta\sigma_{ij}\) and \(\delta\epsilon_{ij}\) are the increments of stress and strain, respectively; G is the shear modulus; K is the bulk modulus; and \(\delta_{ij}\) is the Kronecker delta, which is 1 if \(i=j\) and 0 otherwise.  
The Mohr-Coulomb failure criterion was then applied to determine the onset of failure based on the principal stresses, with the failure occurring when the shear stress on any potential failure plane exceeded the shear strength, as defined by the Mohr-Coulomb parameters (cohesion \(c\) and friction angle \(\phi\)):  
\[\tau=c+\sigma_{\text{n}}\text{tan}(\phi)\]  
where \(\tau\) is the shear stress, \(\sigma_{\text{n}}\) is the normal stress, and \(\phi\) is the friction angle of the material.  
There were 787,148 elements and 176,620 nodes in the wallrock model of the Yuanjue Grottos, and there were 113,592 elements and 21,563 nodes in the local model of the roof of the grotto  
Figure 4: Cross-section diagram of the wallrocks of the Yuanjue Grottos. 3 thin-bedded fine sandstone, 4 fine sandstone, 5 interbedded fine sandstone, 6 fine sandstone, 7 pebbled fine sandstone, 8 fine sandstone, 9 mudstone, 10 fine sandstone, 11 mudstone  
The weathering cavities directly beneath the Yuanjue Grottos were selected as the study object to carry out 3D geological modeling analysis in accordance with our geological investigation. The outermost cavity was 3.5 m wide, the innermost width was 0.35 m, and the depth was 10 m in the modeling. The weathering cavities were divided into 10 groups on the basis of a 1 m depth variate. A three-dimensional geological model of the Yuanjue Grottos with their cavities was established, as shown in Figure 5.  
The stratigraphic sequence of the Yuanjue Grottos was obtained through drilling and coring, the physical and mechanical parameters of the different rocks were measured or tested in the laboratory, and the petrophysical parameters used in the numerical simulation were also determined, as shown in Table 1.