## 2 Mathematical Models
### Three-Phase Relative Permeability Hysteresis Model  
(1) Parker and Lenhard Model [40; 41]  
[PERSON] and [PERSON] utilized two-phase wetting-saturation-capillary pressure and three-phase saturation-capillary pressure models to simulate a drainage and imbibition process, defining saturation paths with three parameters. They proposed a theoretical model for predicting the relative permeability-saturation relationship in two-phase (gas-water) and three-phase (gas-oil-water) porous media systems influenced by arbitrary saturation paths. Integral expressions for the actual permeabilities of gas, water, and oil were given, extending [PERSON] et al. 's non-hysteretic relative permeability model to accommodate the effects of gas trapped in water and oil phases, as well as pore blockage by trapped oil in the water phase. The closed-form expressions for relative permeabilities of gas, water, and oil were derived as functions of current fluid saturations and saturation history using saturation-pressure relationships and a parameter model for fluid entrapment based on the Stone I model in the integral equations. Three-phase relative permeability-saturation relationships assumed for the principal drainage and imbibition paths in hypothetical soils were computed to illustrate the model's applicability and assess the degree of fluid trapping's impact on relative permeabilities. The water permeability-saturation relationship is expected to exhibit mild hysteresis effects except at high saturations, while hysteresis in the air permeability-saturation relationship is more pronounced. Predicted oil permeability hysteresis is lower at low water saturations, but becomes significant as water saturation increases. Water Phase:  
\[k_{rw}=\bar{S}_{\bar{w}}^{\frac{1}{2}}\bigg{[}1-\bigg{(}1-\bar{S}_{\bar{w}}^{ \frac{1}{2}}\bigg{)}^{m}\bigg{(}1-\frac{\bar{S}_{\sigma r}}{1-\bar{S}_{w}^{ \min}}\bigg{)}-\frac{\bar{S}_{\sigma r}}{1-\bar{S}_{w}}\bigg{(}1-\bar{S}_{w}^{ \min}\bigg{)}^{m}\bigg{]}^{2} \tag{79}\]  
Oil phase:  
\[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}\]  
Gas phase:  
\[k_{rg}=\bar{S}_{gf}^{1/2}\Big{(}1-\bar{S}_{t}^{1/m}\Big{)}^{2m} \tag{81}\]  
\(m\) is the parameter in the [PERSON] model [42], \(\bar{S}_{w}^{\min}\) is the minimum value of \(\bar{S}_{w}\), \(\overline{S}_{gf}\) is the flowing oil saturation, and \(\overline{S}_{gro}\) is the residual gas saturation in the gas-oil system. Larsen and Skauge Model [36]  
Larsen and Skauge model addresses hysteresis in three-phase systems, allowing for obtaining irreversible relative permeability scanning curves in the second displacement and all subsequent reverse flow processes. These models depend on the initial saturations at the start of a given process. The new three-phase model uses experimental wetting and non-wetting relative permeabilities as inputs, and understands the relationship between maximum non-wetting saturation and captured non-wetting saturation. Assumptions: Consistent gas-water phase permeability during both two-phase and three-phase flow processes. Oil-phase permeability in three-phase relative permeability calculated using the Stone I model. No hysteresis effect in the oil phase. Hysteresis phenomenon in gas-water phase permeability described by gas trapping and reduced permeability during three-phase flow. Enhanced oil recovery (decreased residual oil saturation) associated with gas trapping effects resulting from multiple gas-water cycles.