We develop efficient algorithms to solve convex cost flow problems where the underlying graph is a circle, a line, or a tree. Each node i has an associated supply/demand b(i ). The cost of sending flow on arc (i , j ) is a piecewise linear convex function f ij defined over R. Let n be the number of nodes and m = O(n) be the total number of pieces of all the convex functions. A flow x is feasible if the imbalances on all nodes are nonnegative. Excess e i (x ) stored on node i has an associated linear cost c i × e i (x ). We show that the problem on a circle can be transformed into an equivalent problem on a line in O(n) time. Thereafter, we develop an algorithm that solves the problem on a line in O(sort(n) + nα(n)) time, where sort(n) is the time to sort n real numbers and α(n) is the inverse Ackermann function. We also prove that when the nodes lie on a tree, the problem can be solved in O(n log n) time using the dynamic tree data structure. We describe applications in areas such as distributed computing, lot-sizing, computational biology, computational music, and transportation.