## 2 Mathematical Models
### Three-Phase Relative Permeability Hysteresis Model
The current captured gas saturation \(S_{gr}\) during secondary imbibition process is given 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}\]1  
where \(S_{g\text{max}}\) is the historical maximum \(S_{g}\), and \(S_{gt}\) is the final captured gas saturation to be reached in the current hysteresis cycle:  
\[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}\]2  
The relative permeability curves for the gas phase, \(k_{rgo}\) and \(k_{rgw}\), are then readjusted to meet the current value of \(S_{gr}\):  
\[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}\]3  
\[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}\]4  
Calculate the hysteresis in units of \(k_{ro}\) and \(k_{w}\) based on the boundary water/oil curves for secondary drainage and imbibition shown in the graph. The hysteresis paths depend on the 3P values previously reached for \(S_{om\text{min}}\) and \(S_{wmax}\), respectively. \[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}\]5  
\[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}\]6  
The interpolation weights are calculated as follows:  
\[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}\]7  
\[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}\]8  
UTHYST Model [16]  
Beygi provides a simple method to calculate the irreversible hysteresis behavior of any phase.