An analysis of film flow and its application to condensation in a horizontal tube