## 2 Mathematical Models
### Two-Phase Relative Permeability Hysteresis Model
It was assumed that trapping only occurs during the imbibition period; thus, if the imbibition process is reversed, then the imbibition curve will be precisely retraced. Let \(S_{nt}\) be the \"trapped\" fraction of saturation, and \(S_{nf}\) be the \"free\" fraction, so that:  
\[S_{n}=S_{nf}+S_{nt} \tag{36}\]  
The value of the imbibition curve that \(\text{k}_{\text{n}}\) follows must be the value of the drainage curve calculated only for the free saturation, equivalently:  
\[K_{n}{}^{I}(S_{n})=K_{n}{}^{D}\Big{(}S_{nf}\Big{)} \tag{37}\]  
[PERSON] [38] introduced a water-oil relative permeability hysteresis model to simulate the historically related hysteresis behavior exhibited by the Cold Lake reservoir. This model, which is based on laboratory measurements, takes into account the influence of saturation history on relative permeability. To use this model, boundary imbibition and drainage curves are input, and grid block relative permeabilities are determined such that the calculated values always lie on or below the drainage curve and always on or above the imbibition curve. This modeling approach allows for more realistic simulations and improves the accuracy of predicting reservoir behavior. Hysteresis is only applied to water/oil two-phase relative permeabilities. The three-phase permeability is calculated using gas/oil two-phase curves, hysteresis water/oil curves, and the Stone I model. Display a pair of normalized water relative permeability boundary curves, one for increasing water saturation (imbibition), and one for decreasing water saturation (drainage). Assume that these curves depend only on water saturation. Point P refers to the conditions within the block when saturation reversal occurs. Normalized water relative permeability and water saturation are given:  
\[k_{rw}^{*}=k_{rw}/(k_{rw})_{ro} \tag{38}\]  
\[S_{gr}=\frac{S_{gi}}{1+CS_{gi}} \tag{30}\]0  
As water saturation increases, the block's water relative permeability will move towards the imbibition boundary curve. We define a ratio, \(K\), which compares the distance of the block's permeability from the boundary curve to the total distance between boundary curves, all at the same water saturation:  
\[S_{gr}=\frac{S_{gi}}{1+CS_{gi}} \tag{30}\]1  
Now, \(k_{rw}^{*}\) can be calculated using Equation (38). Assuming K (1 \(\geq\) S\({}_{w}^{*}\) \(\geq\) (S\({}_{w}^{*}\))\({}_{\text{P}}\):  
\[S_{gr}=\frac{S_{gi}}{1+CS_{gi}} \tag{30}\]2  
where A, B, and n are constants. There are three boundary conditions. First, when S\({}_{W}^{*}\) = 1, K = 0. This forces the scanning curve to approach the water imbibition boundary curve. So, A = 0, n > 0. The second boundary condition forces the scanning curve to pass through the initial point P:  
\[S_{gr}=\frac{S_{gi}}{1+CS_{gi}} \tag{30}\]3  
\[S_{gr}=\frac{S_{gi}}{1+CS_{gi}} \tag{30}\]4  
The third boundary condition requires that the derivative of K with respect to \(S_{w}^{*}\) is finite within the range 1 \(\geq\) S\({}_{w}^{*}\) \(\geq\) (S\({}_{w}^{*}\))\({}_{\text{P}}\) at S\({}_{W}^{*}\) = 1, This derivative is infinite. Therefore, n \(\geq\) 1. Therefore, by combining Equations (20) and (23) and using Equation (20) to define \(K_{P}\), we obtain the expression for \(k_{rv}^{*}\):  
\[S_{gr}=\frac{S_{gi}}{1+CS_{gi}} \tag{30}\]5  
Because the other derivations are similar, only the final equation is provided.