% MATLAB m.file for Bird, Stewart, and Lightfoot Ex. 13.6-1
%
% This is a script based on Fig 13.6-2.  Input the Reynolds number
% when requested and the output will be the temperature change, dT.


dHvap = 977.86;	% in Btu/lbm
k = 0.3853;		% in Btu/hr/ft/F
rho = 60.1;		% in lbm/ft^3
mu = 0.738;		% in lbm/fr/hr
g = 32.174*3600^2;	% in ft/hr^2
L = 10;		% in ft

Re = input('Enter film Reynolds number: ')

if (Re >= 410)
   x = (Re+571.4)/0.35714;
end
if ((Re < 410) & (Re > 340))
   x = 2650;
end
if (Re <= 340)
   x = (Re-65)/.11;
end

dT = x*mu^(5/3)*dHvap/k/rho^(2/3)/g^(1/3)/L;

disp('The change in temperature is: ');
disp(dT);