## 3 Methodology and the Model
### Inhomogeneous Shale Model and User-Defined Material Failure Criterion
#### 3.3.2 Shale Rock Model with User-Defined Constitutive  
To accurately simulate the stress field and the crack initiation, 2-D finite element model of shale rock was established (Figure 9). There was in situ stress around the model, which was represented as \(\sigma_{fy}\) and \(\sigma_{fz}\). Due to strong turbulence in the mixing layer, the total pressure on most of the FSI boundary was different at different positions. Therefore, in the perforation tunnel, the non-uniform pressure load was applied by the SC-CO\({}_{2}\) jet. The total pressure on the perforation wall was loaded in two-step solutions. According to fluid mechanics, the total pressure is defined according to Equation (6).  
\[P_{t}=P_{s}+P_{v}. \tag{6}\]  
In the perforation tunnel, there was a stagnation region, where the velocity of SC-CO\({}_{2}\) was reduced to 0 m/s. In this paper, the perforation pressure on the FSI boundary in the stagnation region was denoted as \(P_{t}^{*}\), and was defined as the perforation pressure. The perforation pressure for an arbitrary point on the boundary was given by \(P_{t}(y,z)\). The SC-CO\({}_{2}\) jet core disappeared in the perforation, and the pressure was boosted.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Item** & **Specimen-1** & **Specimen-2** & **Specimen-3** & **Specimen-4** \\ \hline Maximum Stress (MPa) & 109.654 & 242.697 & 168.549 & 259.498 \\ Maximum Strain (E-3) & 5.959 & 8.084 & 7.331 & 7.306 \\ Elasticity Modulus (GPa) & 27.655 & 35.630 & 29.613 & 39.042 \\ Tangent Modulus (GPa) & 14.040 & 28.448 & 18.996 & 34.491 \\ Poisson’s Ratio & 0.244 & 0.220 & 0.159 & 0.173 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Various mechanical properties of the four specimens.  
Figure 8: Scanning Electron Microscope (SEM) images of the shale rock.  
The displacement constraints in the \(y\) and \(z\) directions were applied on the boundary of casing and cement. As the inhomogeneous properties were observed in the experiments, it is necessary to choose the material model that is similar to that of the real rock. It is believed that the probability distribution of rock properties was similar to that of the real rock. It was found that the Weibull probability distribution contributed to a better simulation of the mechanical properties of rock. Therefore, the tangent modulus of shale rock had the following Weibull probability distribution.  
\[E_{T}=E_{T}\alpha(\frac{p}{\beta})^{\alpha-1}\exp(-(\frac{p}{\beta})^{\alpha })+E_{T0} \tag{7}\]  
where \(E_{T}\) is the tangent modulus of shale rock, \(E_{T0}\) is the average tangent modulus of shale rock, which prevents \(E_{T}\) from becoming equal to 0, \(p\) is a random number generated by the computer, \(\alpha\) is a non-uniform parameter that characterizes the magnitude of the random selection of sample values, and \(\beta\) is the scaling parameter, which represents the average of the random numbers.  
ADINA software provided an excellent secondary developed interface to explore the user-defined constitutive. Equation (7) was added to the constitutive code before the simulation started. Each element in the shale rock was assigned a random tangent modulus, which obeyed the Weibull probability distribution, as shown in Figure 10.  
Figure 10: Tangent modulus distribution of elements in the shale rock model.  
Figure 9: 2-D model of the shale rock.