Secondary circulation appears after fluid with a non-uniform velocity distribution passes round a bend. It alters the character of the flow and is a source of loss. A general expression is developed for its change along a streamline in a perfect, incompressible fluid. The flow in bent circular pipes is analyzed and the theory is compared with experiments on bent pipes and rectangular ducts. In bends the secondary flow is not spiral but oscillatory, the direction of the circulation changing periodically. The theory shows that secondary circulation remains unchanged if streamlines are geodesics on surfaces of constant total pressure.