0001 T = 50:1:120;
0002 K = 1:0.01:5;
0003 P = zeros(length(T),length(K));
0004 H = 0.1;
0005 threshold = 0.5;
0006 for i=1:length(T)
0007 target = T(i);
0008 for j=1:length(K)
0009 a = 0;
0010 b = 1;
0011
0012
0013 while max(max(fin06(0,4,0,4,0.1,10,10,b,K(j),H))) < target
0014 b = b + 1;
0015 end
0016
0017 [w_a,T_a] = fin06(0,4,0,4,0.1,10,10,a,K(j),H);
0018 [w_b,T_b] = fin06(0,4,0,4,0.1,10,10,b,K(j),H);
0019
0020 if ( (T_a<target) && (T_b>target) )
0021 [w_c, T_c] = fin06(0,4,0,4,0.1,10,10,(a+b)/2.0,K(j),H);
0022 while abs(T_c - target)/2 > threshold
0023 if T_c < target
0024 a = (a+b)/2.0;
0025 else
0026 b = (a+b)/2.0;
0027 end
0028 [w_c, T_c] = fin06(0,4,0,4,0.1,10,10,(a+b)/2.0,K(j),H);
0029 end
0030 else
0031 disp('error: T_a and T_b on same side of target')
0032 K(j)
0033 end
0034 P(i,j) = (a+b)/2.0;
0035 end
0036 end
0037 mesh(K,T,P);
0038 title('Dependence of Power on Thermal Conductivity and Temperature');
0039 xlabel('Thermal Conductivity [W / cm*C]');
0040 ylabel('Max Temperature [C]');
0041 zlabel('Power [W]');