# WGAN-Based Realization Process of Gravel Soil for Hydraulic Property Simulation
## 5 Results Analysis
### Two-Point Correlation Functions  
The statistical correlation functions serve as vital criteria for assessing the quality of generation in machine learning, such as with WGAN-GP. These functions include the two-point correlation function and the lineal-path correlation function [21; 22; 23]. The former describes the probability that two points separated by a distance \(r\) are both in the same phase; hence, it is also referred to as the probability function. The latter provides the probability of finding a line segment with a length wholly contained within the same phase, thereby containing connectedness information along a linear path. These criteria are widely applied by many researchers [15; 24; 25] as they provide a good assessment of the similarity between the generative model and the training set. The two-point probability function \(S_{2}{}^{(i)}(\mathbf{r})\) is the probability that two points separated by a distance \(\mathbf{r}\) are both in the same phase \(i\), such as the pore space (a similar function canbe defined for the solid phase). A two-point correlation function for phase \(i\) of a multiphase system is defined as:  
\[S_{2}^{(i)}(\mathbf{r_{1}},\mathbf{r_{2}})=\left\langle I^{(i)}(\mathbf{r_{1}})I^{(i)}(\mathbf{r_ {2}})\right\rangle \tag{13}\]  
where \(S_{2}^{(i)}(\mathbf{r_{1}},\mathbf{r_{2}})\) is a statistical descriptor of random media; the vectors of \(\mathbf{r_{1}}\) and \(\mathbf{r_{2}}\) represent the positions of two randomly selected points in phase \(i\); the indicator function \(I^{(i)}(\mathbf{r})=1\) if \(\mathbf{r}\) belongs to phase \(i\) and is zero otherwise; and \(\langle\cdot\rangle\) represents the volume average. [PERSON] and [PERSON] (1992) [21] introduced the so-called lineal-path function \(L^{(i)}(\mathbf{r})\), which gives the probability of finding a line segment with a length wholly contained in phase \(i\). This function is similar to \(S_{2}^{(i)}(\mathbf{r})\) in that it requires two points at a distance \(\mathbf{r}\) to fall in the same phase, but it also requires all points that lie on a line between them to fall in the same phase. So, it contains connectedness information along a lineal path. It is defined as:  
\[L^{(i)}(\mathbf{r})=\left\langle P(\mathbf{r_{1}},\mathbf{r_{2}})\right\rangle \tag{14}\]  
Equation (14) is the area fraction of phase \(i\) measured from the projected image of a three-dimensional slab of thickness \(z\) onto a plane. Here, we present the two-point correlation functions and the lineal-path functions along the diagonal direction, represented by \(d_{XY}\), formed by the 45\({}^{\circ}\) angle between the \(x\) and \(y\) axes in Figures 9 and 10, respectively. Two MATLAB programs have been developed: one for the two-point probability function and another for the lineal-path correlation function. Each program is designed to read a specified M file containing a three-dimensional array variable that represents volumetric image data, such as prototypes or realizations of materials. These codes for MATLAB in this study also are available by open access at GitHub via [[https://github.com/Zhu-Bi/Gravelsoil_GAN](https://github.com/Zhu-Bi/Gravelsoil_GAN)]([https://github.com/Zhu-Bi/Gravelsoil_GAN](https://github.com/Zhu-Bi/Gravelsoil_GAN))[13], accessed on 1 May 2024. The two-point correlation function is a statistical tool used in physics to quantify the spatial clustering of objects within a system. It measures the excess probability of finding two objects at a given distance compared to a random distribution. Figure 9 depicts the probability of encountering a porous space at various vertical distances, quantified by the number of voxels, across three groups of generated soil realizations. These probabilities are contrasted with those of three groups of primitive soil prototypes of identical dimensions (64 \(\times\) 64 \(\times\) 64).