0001 function [P,T] = fin03(a,b,tol,maxT) 0002 M = 25; N = 25; 0003 while (b-a)/2 > tol, 0004 c=(a+b)/2; 0005 [w,T] = fin(0,4,0,4,0.1,M,N,c,1.68,0.005); 0006 if T > maxT, 0007 b=c; 0008 else 0009 a=c; 0010 end 0011 end 0012 P = (a+b)/2; 0013 [w,T] = fin(0,4,0,4,0.1,M,N,P,1.68,0.005); 0014 h = (4-0)/M; k = (4-0)/N; 0015 x = 0+(0:M)*h; 0016 y = 0+(0:N)*k; 0017 figure(1); 0018 mesh(x,y,w'); 0019 title(['Cooling Fin - Power (W): ' num2str(P,4) ' Max Temp. (C): ' num2str(T,4)]); 0020 xlabel('Fin Length (cm)'); 0021 ylabel('Fin Length (cm)'); 0022 zlabel('Temperature (C)'); 0023 view(0,90); 0024 figure(2); 0025 mesh(x,y,w'); 0026 title(['Cooling Fin - Power (W): ' num2str(P,4) ' Max Temp. (C): ' num2str(T,4)]); 0027 xlabel('Fin Length (cm)'); 0028 ylabel('Fin Length (cm)'); 0029 zlabel('Temperature (C)'); 0030 view(-200,30); 0031 end