## 4 Flow Field Analysis of Corner-Filled Goaf Area Using ANSYS Fluent  
### Model Establishment  
After the implementation of the fully mechanized coal mining face, the voids resulting from the roof collapse are intricately linked to the lithology of the roof, mining methods, and the fragmentation coefficient of the coal-rock mass. Researchers view the goaf as a vast porous medium area. Variations in airflow within the goaf are influenced by factors such as porosity, permeability, source terms, and ventilation methods within the goaf area. ANSYS Fluent 2022 R1, numerical simulation software that accommodates multiple variables, is widely used for simulating gas migration in the goaf area [33]. When simulating airflow in the goaf using Fluent, aside from the fundamental model establishment and grid division, it is crucial to optimize the formula for goaf porosity through the utilization of the User-Defined Function (UDF) based on the collapse and fragmentation coefficient of the goaf rock mass to accurately capture the simulation results.  
According to the research of scholars [34], based on the definition of porosity and the fragmentation coefficient of fractured rock mass, Formula (1) can be derived:  
\[\varphi=1-\frac{1}{K_{\text{P}}} \tag{1}\]  
where \(K_{\text{P}}\) is the fragmentation coefficient of the collapsed rock mass, and \(\varphi\) is the porosity of the collapsed rock mass. The porosity of the carved rock mass considering the influence of gravity satisfies the following equation:  
\[\phi_{\text{G}}=\beta_{1}\sigma+\phi_{\text{G}} \tag{2}\]  
\[\phi_{\text{G}}(Y=0)=\beta_{1}\frac{(1-\phi_{\text{G}})\tau(\frac{l_{y}}{2}-y )\sin\alpha}{\sigma_{0}}+\left[1+e^{-0.15\left(\frac{l_{y}}{2}-|y|\right)} \right]\cdot\left\{1-\frac{h_{d}}{h_{d}+H-\left[H-h_{d}(K_{P_{b}}-1)\right](1 -e^{-\frac{\pi}{2}})}\right\} \tag{3}\]  
By solving the above equation, we obtain  
\[\phi_{\text{G}}(x,y)=1+\frac{\left[1+e^{-0.15\left(\frac{l_{y}}{2}-|y|\right) }\right]\cdot\left\{1-\frac{h_{d}}{h_{d}+H-\left[H-h_{d}(K_{P_{b}}-1)\right] \left(1-e^{-\frac{\pi}{2}}\right)}\right\}-1}{1+\sigma_{0}^{-1}\beta_{1} \gamma(\frac{l_{y}}{2}-y)\sin\alpha} \tag{4}\]  
where \(\Phi_{\text{G}}(x,y)\) is the variation curve of porosity in the goaf; \(\beta_{1}\) is the regression coefficient; \(\sigma\) is the relative axial stress, Mpa; \(\gamma\) is the bulk density of the caved rock mass, N/m\({}^{3}\); \(l_{y}\) is the width of the goaf in the strike direction, m; \(H\) is the mining height, m; \(h_{d}\) is the thickness of the immediate roof, m; \(K_{P_{b}}\) is the residual fragmentation coefficient of the immediate roof rock mass; \(l\) is the distance of roof collapse, m; and \(\alpha\) is the inclination angle of the mining face.  
Based on the geological conditions of the 22,122 working face and considering the distribution law of the fragmentation coefficient, a fitting process was conducted to obtain a porosity distribution map of the goaf with Z = 1.5 for the 22,122 working face using Python-3.9.6. The porosity, permeability, gas flow, and dissipation coefficient of the goaf were then imported into Fluent for solving using UDF functions. The resulting goal model is illustrated in Figure 8.