The problem of interaction of a plasma flow with an inhomogeneous magnetic field is considered. The field is generated by magnetic coils. Field lines along the coil axis form a channel which is used to control the plasma flow. A two-dimensional axial-symmetric plasma model and 3D hybrid code has been used. The work results can be used for a study of processes taking place in a magnetic nozzle.