A problem in the calculus of variations for film condensation on curvilinear fins