The Peclet number is a dimensionless number used in calculations involving convective heat transfer.  It is the ratio of the thermal energy convected to the fluid to the thermal energy conducted within the fluid.  If Pe is small, conduction is important and in such a case, the major source of conduction could be down the walls of a tube.  The Peclet number is the product of the Reynolds number and the Prandtl number.  It depends on the heat capacity, density, velocity, characteristic length and heat transfer coefficient. 

The program 'pecalc' calculates the Peclet number for a specified Pressure, temperature, characteristic length and velocity.  It incorporates the programs 'recalc' and 'prcalc'  in order to perform the major calculations. 

                        

 

The matlab code for pecalc is specified below-


function pecalc(P,T,l,v,index)

global mw % loads molecular weights
global nc %load number of compounds
global cnms %load compound names
global TbpK %load boiling point


%define constants 
R=82.0578/(10^3); %gas constant with units of m^3*atm/kg-mol/K


if nargin >4
i=index;
mu(i)=mucalc(T,index);
pr(i)=prcalc(T,index);
T=at(T);
%check to see if all the necessary data is contained in database
if mw(i)==NaN,
fprintf('Molecular weight data for compound *%s* is not available .\n',cnms(i,:))


elseif (T<TbpK(i))
fprintf('The temperature for compound *%s* is below the boiling point.\n',cnms(i,:))

elseif (T<0)
fprintf('The temperature for compound *%s* is below absolute zero,enter a higher temperature.\n',cnms(i,:))

elseif (P> 10)
fprintf('The entered pressure value is too high, the gas may not behave ideally')

elseif (P<0)
fprintf('The entered pressure is below zero,try again')

elseif (l<0)
fprintf('The entered length is negative,try a different length')

elseif (v<0)
fprintf('The entered velocity is below zero,try again')

else %if all data is specified
Rho(i)=mw(i)*P/R/T;
Re(i)=Rho(i).*v.*l./mu(i);
Pe(i)=Re(i).*pr(i);

end
Pe(i)

else %if index not specified, calculate data for all compounds
mu=mucalc(T);
pr=prcalc(T);
T=at(T);
for i=1:nc,
if mw(i)==NaN,
fprintf('Molecular weight data for compound *%s* is not available .\n',cnms(i,:))


elseif (T<TbpK(i))
fprintf('The temperature for compound *%s* is below the boiling point.\n',cnms(i,:))

elseif (T<0)
fprintf('The temperature for compound *%s* is below absolute zero,enter a higher temperature.\n',cnms(i,:))

elseif (P> 10)
fprintf('The entered pressure value is too high, the gas may not behave ideally')

elseif (P<0)
fprintf('The entered pressure is below zero,try again')

elseif (l<0)
fprintf('The entered length is negative,try a different length')

elseif (v<0)
fprintf('The entered velocity is below zero,try again')

else %if all data is specified
Rho(i)=mw(i)*P/R/T;
Re(i)=Rho(i).*v.*l./mu(i);
Pe(i)=Re(i).*pr(i);
end

end
Pe
end

Return to home