## 2 Equations and Methods
### Numerical Computing Method  
First, Equations (5) and (6) are deformed and then added to obtain the gas-liquid two-phase pressure control equation, as follows:  
\[B_{g}\
abla\big{[}\beta_{g}\
abla(P_{g}-\rho_{g}gh)\big{]}+B_{w}\
abla\big{[} \beta_{w}\
abla(P_{w}-\rho_{w}gh)\big{]}+B_{g}(q_{sg}+q_{smfg})+B_{w}q_{sw}= \varphi_{f}C_{t}\frac{\partial P_{g}}{\partial t} \tag{9}\]  
where \(\beta_{g}=\frac{k_{\infty}k_{rg}}{B_{g}l_{g}}\), \(\beta_{w}=\frac{k_{\infty}k_{rw}}{B_{w}l_{w}}\). The definition of the total compression coefficient is \(C_{t}=C_{  
\[\mathrm{G}_{g}=T_{g,j+1/2}\rho_{g}g(h_{j+1}-h_{j})-T_{g,j-1/2}\rho_{g}g(h_{j}-h_{j- 1})\]  
\[\mathrm{G}_{w}=T_{w,j+1/2}\rho_{w}g(h_{j+1}-h_{j})-T_{w,j-1/2}\rho_{w}g(h_{j}-h_{ j-1})\]  
\[+T_{w,j+1/2}(P_{ggu,i+1}-P_{ggu,i})-T_{w,j-1/2}(P_{ggu,i}-P_{ggu,i-1})\]  
\[+T_{w,j+1/2}(P_{ggu,j+1}-P_{cgw,j})-T_{w,j-1/2}(P_{cgu,j}-P_{ggu,j-1})\]  
\[+T_{w,k+1/2}(P_{ggu,k+1}-P_{cgu,k})-T_{w,k-1/2}(P_{cgw,k}-P_{cgu,k-1})\]  
\[\mathrm{Q}_{gg,i,j,k}=V_{B}q_{gg,i,j,k}\]  
\[\mathrm{Q}_{smfg,i,j,k}=V_{B}q_{smfg,i,j,k}\]  
\[\mathrm{Q}_{sw,i,j,k}=V_{B}q_{sw,i,j,k}\]  
where \(T_{g,i+1/2}\) is given as follows:  
\[T_{g,j+1/2}=\frac{\Delta y_{j+1/2}\Delta z_{j+1/2}}{\Delta x_{j+1/2}}(\frac{k _{g}k_{g}}{B_{g}k_{g}})_{j+1/2}\]  
The coefficients on other nodes are deduced in the same way. Without special instructions, the above coefficients are all calculated with physical quantities at time n. For the numerical calculation of pressure in Equation (10), because it is a 7-diagonal large sparse matrix equation system, it can be solved using the iterative method. The commonly used iterative methods are Jacobian iteration, Gauss Seidel iteration, SOR iteration, etc. These numerical methods can be found in the classical book [29]. Both the coal and shale reservoirs contain rich organic matter, which has the characteristics of adsorbing methane gas. A large part of gas is stored in organic matter in the form of adsorbed gas. For example, in shale, adsorbed gas accounts for 20-80% of the total gas storage, and in coal rock, this proportion is higher (usually more than 85%). In the middle and late stages of production, the adsorbed gas has a significant impact on the gas production rate. Therefore, it is necessary to describe the adsorption and desorption of the adsorbed gas. The Langmuir adsorption model is the most frequently used and simplest model to characterize the gas adsorption and desorption in the organic matter. Generally, \(q_{smfg}\) represents the matrix diffusion source term; that is, because the gas pressure in the fracture decreases, the gas in the matrix is desorbed from the matrix surface and diffused into the fracture. The existence of \(q_{smfg}\) can continuously supplement the gas in the fracture, so it is called the source term, whose unit is 1/s, and its definition is  
\[\mathrm{G}_{g}=T_{g,j+1/2}\rho_{g}g(h_{j+1}-h_{j})-T_{g,j-1/2}\rho_{g}g(h_{j}-h_{j- 1})\]0  
where  
\[\mathrm{G}_{g}=T_{g,j+1/2}\rho_{g}g(h_{j+1}-h_{j})-T_{g,j-1/2}\rho_{g}g(h_{j}-h_{j- 1})\]1  
where \(\overline{V}_{m}\) represents the gas concentration in the matrix, dimensionless; \(V_{E}\) is the gas concentration in the fracture, dimensionless; and \(F_{G}\) is the matrix shape factor, which can be taken from 2 to 6. \(\tau\) is the desorption time. The above formula shows that the greater the concentration difference, the greater the source term. According to the Langmuir desorption model, there are the following relationships  
\[\mathrm{G}_{g}=T_{g,j+1/2}\rho_{g}g(h_{j+1}-h_{j})-T_{g,j-1/2}\rho_{g}g(h_{j}-h_{j- 1})\]2  
\[\mathrm{G}_{g}=T_{g,j+1/2}\rho_{g}g(h_{j+1}-h_{j})-T_{g,j-1/2}\rho_{g}g(h_{j}-h_{j- 1})\]3where the gas concentration \(\overline{V}_{m}\) is related to the gas pressure \(P_{mg}\) in the matrix, and the gas concentration \(V_{E}\) is related to the gas pressure \(P_{fg}\) in the fracture where \(V_{L}\) is the Langmuir volume constant. \(V_{L}\) represents the maximum adsorption capacity (saturated adsorption capacity) of gas in unit volume matrix.