Magnetohydrodynamic flow in a curved pipe