Study of the nonlinear dynamics of vortex flow in a pipe