## 2 Mathematical Models
### Three-Phase Relative Permeability Hysteresis Model
In a multi-cycle process, considering the influence of saturation direction and saturation path, the relative permeability is determined by the following equation:  
\[k_{ro}=\bar{S}_{of}^{1/2}\Bigg{[}\bigg{(}1-\bar{S}_{w}^{1/m}\bigg{)}^{m}-\bigg{(} 1-\bar{S}_{t}^{1/m}\bigg{)}^{m}\bigg{(}1-\frac{\overline{S}_{gro}}{1-\overline{ S}_{t}^{min}}\bigg{)}-\Big{(}1-\bar{S}_{t}^{1/m}\bigg{)}^{m}\frac{\overline{S}_{gro}}{1- \overline{S}_{t}^{min}}\bigg{]}^{2} \tag{80}\]9  
The method is applicable to any relative permeability model that includes captured saturation, even in multi-cycle processes with phase-wise monotonic increases where captured saturation remains constant, as shown below:  
\[k_{rg}=\bar{S}_{gf}^{1/2}\Big{(}1-\bar{S}_{t}^{1/m}\Big{)}^{2m} \tag{81}\]0where \(\left(S_{jt}\right)_{E,n-1}\) represents the captured saturation at the end of the previous cycle, \(\Delta S_{jt}\) is the captured saturation for the current cycle, and parentheses introduce the influence of saturation pairs of conjugate phases at the beginning of the current cycle. Water, oil, and gas are defined as the conjugate phases of gas, water, and oil phases, respectively. We use an improved [PERSON] model ([PERSON], 1997) to calculate the phase capture of non-wetting phases:  
\[k_{rg}=\bar{S}_{gf}^{1/2}\Big{(}1-\bar{S}_{t}^{1/m}\Big{)}^{2m} \tag{81}\]1  
Different cycle's trapping saturation is calculated as follows:  
\[k_{rg}=\bar{S}_{gf}^{1/2}\Big{(}1-\bar{S}_{t}^{1/m}\Big{)}^{2m} \tag{81}\]2  
\[k_{rg}=\bar{S}_{gf}^{1/2}\Big{(}1-\bar{S}_{t}^{1/m}\Big{)}^{2m} \tag{81}\]3  
The proposed model addresses the cycle-related Land coefficients in a multi-cycle process:  
\[k_{rg}=\bar{S}_{gf}^{1/2}\Big{(}1-\bar{S}_{t}^{1/m}\Big{)}^{2m} \tag{81}\]4  
\(S_{jr}^{3P}\) is corrected based on changes in composition and trapping number. Initially, the impact of two-phase residual saturations on trapping numbers is considered, then extended to include three-phase residual saturations in the equation, where \(S_{jc}\) and \(S_{ic}\) represent the co-existing water and critical oil or critical gas saturations, respectively. (6) WAG-HW Model ([PERSON], 2016)  
[PERSON] and [PERSON] proposed the WAG-HW model to simulate the cyclic hysteresis of three-phase relative permeability during WAG injection. This technique is a direct approach that utilizes measured three-phase relative permeability data obtained from the first cycle of WAG injection to predict the relative permeability of subsequent cycles. The basic equation is as follows:  
\[k_{rg}=\bar{S}_{gf}^{1/2}\Big{(}1-\bar{S}_{t}^{1/m}\Big{)}^{2m} \tag{81}\]5  
Here, \(k_{ri}\) represents the relative permeability of different fluid phases, \(n\) denotes different periods, and \(H\) is a constant coefficient. The model derives different expressions for relative permeability in different stages, divided into the following sections:  
The relative permeability of the gas phase during the gas injection stage:  
\[k_{rg}=\bar{S}_{gf}^{1/2}\Big{(}1-\bar{S}_{t}^{1/m}\Big{)}^{2m} \tag{81}\]6  
\[k_{rg}=\bar{S}_{gf}^{1/2}\Big{(}1-\bar{S}_{t}^{1/m}\Big{)}^{2m} \tag{81}\]7  
Here, \(k_{rg}^{GI}\) is the gas-phase relative permeability for gas injection, \(S_{g,start}^{n}\) is the initial gas saturation, and \(S_{g}^{*}\) is the adjusted gas saturation. The relative permeability of the gas phase during the water injection stage:  
\[k_{rg}=\bar{S}_{gf}^{1/2}\Big{(}1-\bar{S}_{t}^{1/m}\Big{)}^{2m} \tag{81}\]8\[k_{rg}=\bar{S}_{gf}^{1/2}\Big{(}1-\bar{S}_{t}^{1/m}\Big{)}^{2m} \tag{81}\]9  
\[\Big{[}K_{rg}^{drain}\Big{]}_{n}=\bigg{\{}\Big{[}K_{rg}^{2 Ph}\big{(}S_{g} \big{)}-K_{rg}^{2 Ph}\Big{(}S_{g}^{init}\Big{)}\Big{]}\cdot\bigg{(}\frac{S_{w_{ j}}}{S_{w}^{init}}\bigg{)}^{a}\bigg{\}}_{n}+\Big{[}K_{rg}^{imb}\Big{(}S_{g}^{ init}\Big{)}\Big{]}_{n-1} \tag{82}\]0  
Here, \(k_{rg}^{WI}\) is the gas-phase relative permeability during water injection.