## 2 Stress Field Inversion Method and Verification of Its Accuracy
### Verification of the Accuracy of the Method  
To validate the reliability of the proposed inversion method, a simple three-dimensional tunnel example was constructed for verification (Figure 4). A rock model with dimensions of 18 m \(\times\) 18 m \(\times\) 20 m was established, with a tunnel measuring 4 m \(\times\) 5.6 m (highlighted in red) oriented perpendicular to the tunnel axis (\(z\)-direction). Known loads with specified directions and magnitudes were applied to the boundaries of the model. The strains at measurement points A to E (Figure 5) were extracted as the target values for actual measurements. In the example model, the rock had an elastic modulus of 80 GPa and a Poisson's ratio of 0.25. The Mohr-Coulomb criterion was used to simulate rock plastic damage, with a friction angle of 40.5\({}^{\circ}\), dilation angle of 20.25\({}^{\circ}\), and cohesion of 6.5 MPa. To determine the rationality of rock mechanics parameters, this research uses ABAQUS software to establish a uniaxial cylindrical compression model using Mohr-Coulomb constitutive law. The stress-strain curve of the assumed model is obtained (as shown in Figure 6), demonstrating a typical stress-strain relationship (including plasticity and elasticity) of the rock, and the peak stress of the rock is 118 MPa. In the inversion model, the boundary conditions for the stress equilibrium were set using the geostatic stress subroutine, such that \(\sigma_{x}\) = 19.8 MPa, \(\sigma_{y}\) = 18.0 MPa, \(\sigma_{z}\) = 12.6 MPa, \(\sigma_{xy}\) = 5.4 MPa, \(\sigma_{yz}\) = 3.6 MPa, and \(\sigma_{zx}\) = 7.2 MPa. The target values of the measurement points for inversion were obtained through simple finite element calculations (Table 1); \(\varepsilon_{x}\), \(\varepsilon_{y}\), \(\varepsilon_{z}\), \(\gamma_{xy}\), \(\gamma_{yz}\), and \(\gamma_{xz}\) represent the elastic normal strains and elastic shear strains at the measurement points. Figure 4: Finite element model. Figure 5: Measurement points. However, in practice, we can only measure the vertical (\(y\)-direction) elastic strain \(\varepsilon_{y}\), the along-tunnel (\(z\)-direction) elastic strain \(\varepsilon_{z}\), and the surface shear strain \(\gamma_{yz}\) at Points A to D. Additionally, the horizontal (\(x\)-direction) elastic strain \(\varepsilon_{x}\), the along-tunnel (\(z\)-direction) elastic strain \(\varepsilon_{z}\), and the surface shear strain \(\gamma_{xz}\) at point E can be measured. Therefore, during the inversion process, this research only considers the elastic strains \(\varepsilon_{y}\), \(\varepsilon_{z}\), and \(\gamma_{yz}\) at Points A to D, as well as the elastic strains \(\varepsilon_{x}\), \(\varepsilon_{z}\), and \(\gamma_{xz}\) at Point E. The error is defined as follows:  
\[\delta=-\sqrt{\left(\sum_{i=1}^{n}\Bigl{[}\left(\varepsilon_{xi}-\widetilde{ \varepsilon}_{xi}\right)^{2}+\left(\varepsilon_{zi}-\widetilde{\varepsilon}_ {zi}\right)^{2}+\left(\gamma_{xzi}-\widetilde{\gamma}_{xzi}\right)^{2}\Bigr{]} +\sum_{i=n}^{m}\Bigl{[}\left(\varepsilon_{yi}-\widetilde{\varepsilon}_{yi} \right)^{2}+\left(\varepsilon_{zi}-\widetilde{\varepsilon}_{zi}\right)^{2}+ \left(\gamma_{yzi}-\widetilde{\gamma}_{yzi}\right)^{2}\Bigr{]}\right)\Biggr{/}m} \tag{5}\]  
where \(\varepsilon_{xi},\varepsilon_{yi},\varepsilon_{zi}\), \(\gamma_{xzi}\) and \(\gamma_{yzi}\) are the inverted strain values at Point \(i\), \(\widetilde{\varepsilon}_{xi},\widetilde{\varepsilon}_{yi},\widetilde{\varepsilon }_{zi}\), \(\widetilde{\gamma}_{xzi}\) and \(\widetilde{\gamma}_{yzi}\) are the target strain values at Point \(i\). For the three-dimensional case, six parameters should be inverted. Before inversion, the range of each parameter is set, and they are discretized at random into 400 arrays. After 200 iterations, the error stabilizes, and the program is terminated.