Effects of divalent ions in surfactant flooding