Increasing demand for oil in the near future implies the need for Enhanced Oil Recovery (EOR) methods to produce the remaining oil after primary and secondary production. Miscible gas injection has an excellent microscopic sweep efficiency; however due to density difference, high gas mobility and reservoir heterogeneity, the macroscopic sweep efficiency can be poor. The application of foam, which is a dispersion of a gas in a liquid phase with surfactant, greatly reduces the gas mobility. This minimizes gas override and gas channeling through high-permeability layers, thus increasing the macroscopic sweep efficiency. Fractional-flow theory provides key insights into one-dimensional miscible foam displacements. First-contact-miscible and multiple-contact-miscible displacement simulations show that foam is able to displace all the oil in the reservoir, and with sufficient grid resolution, the simulation converges towards the fractional-flow solution. Numerical dispersion introduced by the simulator affects the mobilities near the miscible front. In multiple-contact-miscible displacement simulations with insufficient grid resolution, numerical dispersion can cause loss of miscibility. Two-dimensional simulation shows that applying sufficient grid blocks to mitigate the effect of numerical dispersion for a multiple-contact-miscible displacement is, however, not feasible due to the enormous number of grid blocks and amount of time required to simulate each case. As a result, our 2D simulations of the multiple-contact-miscible case is more like an immiscible case than it is like a first-contact-miscible case. In both immiscible and multiple-contact-miscible displacements with insufficient grid resolution, there is a slowly advancing region of zero oil saturation as hydrocarbon is dissolved into injected CO2. Our results show that when oil has a detrimental effect on foam, as modelled in current simulators, it affects only immiscible foam displacements. In a miscible displacement there is only ever one nonaqueous phase present at any location; if it is "gas," there is no oil to destabilize foam; if it is "oil," there is no gas to generate foam. Thus, the effect of hydrocarbons on foam in miscible displacements is to destroy foam at the point where the simulator defines the nonaqueous phase to be "oil" instead of "gas." For immiscible displacements, foam sweep efficiency decreases greatly if the injected foam is not stable at the oil saturations encountered in the reservoir. Pressure variation causes in-homogeneity in densities and gas viscosity in the mixed zone for compressible CO2 not accounted for in Stone's model for gravity segregation. Nevertheless, Stone’s model is able to predict the segregation length for water and gas fairly accurate for first-contact-miscible, and certain multiple-contact-miscible displacement cases for co-injection and SAG injection, if one uses fluid properties from the middle of the mixed zone. For first-contact-miscible displacements, the steady state assumed in Stone's model is achieved relatively quickly. For immiscible displacements, there are two regions in the mixed zone, as in the 1D displacements: a slowly advancing region of zero oil saturation, and a region of gas flow with immobile oil present. The segregation length calculated from fluid properties in the inner zone of zero oil saturation could be greater or less than the actual segregation length. At fixed injection rate, modified SWAG injection (simultaneous injection, with water injected higher in the formation than gas) results in up to 71% longer segregation distance compared to co-injection for first-contact-miscible displacements, 110% longer for multiple-contact-miscible displacements, and 130% longer for immiscible displacements, when injecting same amount of fluids at same injection rates. In layered reservoirs, placement of surfactant into lower-permeability layers is a key challenge to sweep efficiency. However, both layered reservoirs show very similar sweep efficiencies.