Simulation and Optimization of Foam EOR Processes