The cycle of bubble production from a gas cavity in a supersaturated solution