Upstream and downstream influence of pipe curvature on the flow through a bend