## 4 Conclusions  
In conclusion, the fluid flow behaviors from foam-assisted N\({}_{2}\) flooding are intuitively observed in a three-dimensional visualized fracture-vuggy model. Foam and N\({}_{2}\) can migrate to the upper region of the fracture-vuggy units due to gravity overlap effects. The accumulation of foam and N\({}_{2}\) at the top of the fracture-vuggy unit is conducive to enhancing oil recovery. Significantly, foam slug can enlarge the sweep efficiency of N\({}_{2}\), suppress the formation of nitrogen channeling, and detach the oil film. Additionally, the decline rate of OWI height near the injection well is faster than that of the OWI height far away injection well. The FOI of the foam displacement front is higher than that of the foam displacement behind, which is highly consistent with the published results from the two-dimension fracture-vuggy model. The residual oil types after nitrogen gas flooding include bypassed oil, oil film, attic oil, and oil cluster, while the residual oil types after foam-assisted N\({}_{2}\) flooding include residual oil in the corner and residual oil drop. Finally, 39.70% of oil recovery can be increased by foam-assisted N\({}_{2}\) flooding, which has a 12.36% higher oil recovery than nitrogen gas flooding. Conceptualization, M.Q. ; methodology, M.Q., T.L. and J.H. ; software, M.Q. and T.L. ; formal analysis, M.Q. and T.L. ; investigation, M.Q. and T.L. ; data curation, M.Q. ; writing--original draft preparation, M.Q., T.L. and J.H. ; writing--review and editing, M.Q., T.L. and J.H. ; visualization, T.L. ; supervision, J.H. ; project administration, J.H. ; funding acquisition, M.Q. All authors have read and agreed to the published version of the manuscript. This research was funded by the Science Foundation of China University of Petroleum, Beijing (Grant No. 2462020 XKBH013 and 246201 YJRC037) and the National Natural Science Foundation of China (Grant No. 51804316). Not applicable. This work is applicable. This work is supported by the National Natural Science Foundation of China (Grant No. 51804316). * [PERSON] et al. (2016) [PERSON]; [PERSON]; [PERSON]; [PERSON] Karsf zonings and fracture-cave structure characteristics of Ordovician reservoirs in Tahe oilfield, Tarim Basin. _Acta Pet. Sin._**2016**, _37_, 289-298. * [PERSON] et al. (2016) [PERSON]; [PERSON]; [PERSON]; [PERSON] Development Strategy Optimization of Gas Injection Huff and Puff for Fractured-Caved Carbonate Reservoirs. In Proceedings of the Spe Kingdom of Saudi Arabia Technical Symposium & Exhibition, Dammam, Saudi Arabia, 25-28 April 2016. * [PERSON] et al. (2016) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Integrated dynamic evaluation of depletion-drive performance in naturally fractured-vuggy carbonate reservoirs using DPSO-FCM clustering. _Fuel_**2016**, _181_, 996-1010. [CrossRef]
* [PERSON] et al. (2016) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Effect of bottom water on subsequent water flooding and gas drive in fractured-vuggy carbonate oil reservoir. _Pet. Geol. Recovery__Effic._**2016**, _23_, 111-115. * [PERSON] and [PERSON] (2015) [PERSON]; [PERSON] Experimental Study of Water and CO\({}_{2}\) Flooding in the Tight Main Pay Zone and Vuggy Residual Oil Zone of a Carbonate Reservoir. _Energy Fuel_**2015**, _29_, 6213-6223. [CrossRef]
* [PERSON] et al. (2016) [PERSON], [PERSON]; [PERSON], [PERSON]; [PERSON], [PERSON]; [PERSON]; [PERSON], [PERSON]; [PERSON]; [PERSON] [PERSON] Three-dimensional physical simulation and optimization of water injection of a multi-well fractured-vuggy unit. _Pet. Sci._**2016**, _13_, 259-271. [CrossRef]
* [PERSON] et al. (2018) [PERSON], [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] The feasibility of CO\({}_{2}\) and N\({}_{2}\) injection for the Tahe fracture-cavity carbonate extra-heavy oil reservoir: An experimental study. _Fuel_**2018**, _226_, 598-606. [CrossRef]
* [PERSON] et al. (2017) [PERSON]; [PERSON]; [PERSON]; [PERSON] Mechanism and influencing factors of EOR by N\({}_{2}\) injection in fractured-vuggy carbonate reservoirs. _J. Nat.