While gas injection offers the advantage of superior microscopic sweep, resulting in lower residual oil saturation in pores compared to waterflood, a significant challenge arises due to its poor volumetric sweep efficiency . This inefficiency means that a substantial portion of the oil is not contacted, resulting in overall low recovery rates. The primary causes for this inefficiency include segregation gravity and gravity override due to the gas's lower density compared to oil and water, fingering phenomena caused by high mobility ratios between injected gas and water/oil, and channeling through high-permeability layers in heterogeneous and layered reservoirs . An alternative approach to continuous gas injection is Water-alternating-gas (WAG) injection, where gas and water slugs are alternated. While this method partially addresses the limitations of continuous gas injection, gravity segregation during WAG flooding can still cause premature gas breakthroughs and gravity segregation . To address this issue and enhance control over fluid mobility in gas flooding, foam is introduced for sweep improvement and profile modification. The strategic use of foam aims to boost the efficiency of the displacing fluid in sweeping through the reservoir, ensuring better contact with and recovery of oil .