In this research, computational fluid dynamics (CFD) was employed to examine the two-phase flow of water and oil in a porous medium. For this purpose, the Navier-Stockes equations, which describe fluid motion, and the Cahn-Hillard phase field, which defines the interface between two phases, are coupled. The numerical discretization system of equations was solved using the finite element method (FEM) with the COMSOL software. To validate the results and the phase-field model (PFM), the Lucas and Washburn equation was used together with the experimental data. Through this study, the effective parameters were evaluated in two parts. In the first part, seven models with different pore morphologies were designed, and the impact of petrophysical parameters of the reservoir, including the shape of pores, connectivity of pores with or without throat lines, porous media heterogeneity, and relative permeability, on oil recovery was investigated. The second part was devoted to performing sensitivity analysis on the effect of fluid properties, including interfacial tension, wettability, viscosity ratio, injected fluid flow, and gravity, upon enhanced oil recovery (EOR) in different morphologies. Owing to the uniform distribution of capillary pressure in the patterns with the throat lines, the sweep efficiency of the injected fluid was found to be better, and thereby oil production increased. The results of the present work proved the significant influence of gravity on EOR, so that by applying gravity to the solution domain, the breakthrough time and oil recovery factor increased by 20 minutes and 28.6 %, respectively. Moreover, the velocity of the injected fluid as a representative of the flow rate had the greatest effect on EOR, with a 35 % increase in production.