Algorithms and discretization schemes for efficient simulation of multiphase flow and transport in porous media