function out = h_nat(T, Tamb, L) % h_nat returns the value of the heat transfer coefficient corresponding to % the cooling of a vertical plate by air in natural convection. The heat % transfer coefficient is depends on the surface temperature T, the % temperature of the surrounding air Tamb and the length of the of the % wall. % Air properties. k = 2e-2; % Thermal condunctivity [W/(m*K)]. rho = 1; % Density [kg/m^3]. cp = 1e3; % Heat capacity [J/(kg*K)]. mu = 1e-6; % Dynamic viscosity [Pa*s]. g = 9.81; % Gravity [m/s^2]. % Definition of Prandt number. Pr = cp*mu/k; % Definition of Rayleigh number. Ra = 2*g*rho^2*cp/(mu*k).*abs((T-Tamb)./(T+Tamb)).*L.^3; % Defifinition of Nusselt number. num = 387e-3*Ra.^(1/6); denom = (1+(492e-3/Pr)^(9/16))^(8/27); Nu = (825e-3+num/denom).^2; % Return heat transfer coefficeint. out = k.*Nu./L;