Numerical Simulation of Miscible and Immiscible Fluid Flows in Porous Media