The green function for potential flow in a rectangular channel