Formation of gas bubbles at horizontal orifices