Countercurrent bubble and slug flows in a vertical system