diff options
Diffstat (limited to '3588/CH7')
-rw-r--r-- | 3588/CH7/EX7.1/EX7_1.sav | bin | 0 -> 29064 bytes | |||
-rw-r--r-- | 3588/CH7/EX7.1/EX7_1.sce | 44 | ||||
-rw-r--r-- | 3588/CH7/EX7.11/EX7_11.sav | bin | 0 -> 30232 bytes | |||
-rw-r--r-- | 3588/CH7/EX7.11/EX7_11.sce | 55 | ||||
-rw-r--r-- | 3588/CH7/EX7.2/EX7_2.sav | bin | 0 -> 17584 bytes | |||
-rw-r--r-- | 3588/CH7/EX7.2/EX7_2.sce | 15 | ||||
-rw-r--r-- | 3588/CH7/EX7.3/EX7_3.sav | bin | 0 -> 29776 bytes | |||
-rw-r--r-- | 3588/CH7/EX7.3/EX7_3.sce | 50 | ||||
-rw-r--r-- | 3588/CH7/EX7.4/EX7_4.sav | bin | 0 -> 21776 bytes | |||
-rw-r--r-- | 3588/CH7/EX7.4/EX7_4.sce | 58 | ||||
-rw-r--r-- | 3588/CH7/EX7.5/EX7_5.sav | bin | 0 -> 39928 bytes | |||
-rw-r--r-- | 3588/CH7/EX7.5/EX7_5.sce | 89 | ||||
-rw-r--r-- | 3588/CH7/EX7.6/EX7_6.sav | bin | 0 -> 19544 bytes | |||
-rw-r--r-- | 3588/CH7/EX7.6/EX7_6.sce | 24 | ||||
-rw-r--r-- | 3588/CH7/EX7.7/EX7_7.sav | bin | 0 -> 20688 bytes | |||
-rw-r--r-- | 3588/CH7/EX7.7/EX7_7.sce | 26 | ||||
-rw-r--r-- | 3588/CH7/EX7.9/EX7_9.sav | bin | 0 -> 28576 bytes | |||
-rw-r--r-- | 3588/CH7/EX7.9/EX7_9.sce | 46 |
18 files changed, 407 insertions, 0 deletions
diff --git a/3588/CH7/EX7.1/EX7_1.sav b/3588/CH7/EX7.1/EX7_1.sav Binary files differnew file mode 100644 index 000000000..0eeaab6ea --- /dev/null +++ b/3588/CH7/EX7.1/EX7_1.sav diff --git a/3588/CH7/EX7.1/EX7_1.sce b/3588/CH7/EX7.1/EX7_1.sce new file mode 100644 index 000000000..e378b08cf --- /dev/null +++ b/3588/CH7/EX7.1/EX7_1.sce @@ -0,0 +1,44 @@ +//Clearing console +clc +clear + +//Intializing Variables +d = 0.06 +k1 = 200 +k2 = 389 +L = 0.5 +T(5,1) = 80 +Q(1:4,1) = ((%pi*d^2)/4)*[4000;0;0;0] +A = (%pi*d^2)/4 + +//Calculating elemental stiffness matrices +function K= matri(k,A,L) + K=[(7*k*A)/(3*L) -(8*k*A)/(3*L) (k*A)/(3*L);-(8*k*A)/(3*L) (16*k*A)/(3*L) -(8*k*A)/(3*L);(k*A)/(3*L) -(8*k*A)/(3*L) (7*k*A)/(3*L)] +endfunction + +K1 = matri(k1,A,L) +K2 = matri(k2,A,L) + +//Calculating global stiffness matrice +K(1,1:5) = [K1(1,1:3) 0 0] +K(2,1:5) = [K1(2,1:3) 0 0] +K(3,1:5) = [K1(3,1) K1(3,2) K1(3,3)+K2(1,1) K2(1,2:3)] +K(4,1:5) = [0 0 K2(2,1:3)] +K(5,1:5) = [0 0 K2(3,1:3)] + +//Accounting for T5 = 80◦C and Calculating Qd +Qd(1:4,1) = Q(1:4,1)-T(5,1)*K(1:4,5) + +//Solving for Temperatures +T(1:4,1)=linsolve(K(1:4,1:4),-Qd(1:4,1)) + +//Sovling for heat at node 5 +Q(5,1) = K(5,1:5)*T + +//Sovling for heat flux at node 5 +q5 = - Q(5,1)/((%pi*d^2)/4) + +//Printing Results +printf('\nResults\n') +printf('\nNode-Temperatures \nT1=%f◦C \nT2=%f◦C \nT3=%f◦C \nT4=%f◦C \nT5=%f◦C',T(1,1),T(2,1),T(3,1),T(4,1),T(5,1)) +printf('\nHeat flow at node-5 \nq5=%fW/m^2',q5) diff --git a/3588/CH7/EX7.11/EX7_11.sav b/3588/CH7/EX7.11/EX7_11.sav Binary files differnew file mode 100644 index 000000000..4dbdea002 --- /dev/null +++ b/3588/CH7/EX7.11/EX7_11.sav diff --git a/3588/CH7/EX7.11/EX7_11.sce b/3588/CH7/EX7.11/EX7_11.sce new file mode 100644 index 000000000..894267d70 --- /dev/null +++ b/3588/CH7/EX7.11/EX7_11.sce @@ -0,0 +1,55 @@ +//Clearing console +clc +clear + +//Intializing Variables +d = 0.012 +L = 0.1 +k = 200 +c = 900 +p = 2700 +T(1,1) = 80 +T(5,1) = 30 +Td(1,1) = 0 +Td(5,1) = 0 +Q(1:4,1) = ((%pi*d^2)/4)*[4000;0;0;0] + +//Calculating elemental conductance and capacitance matrices +C1 = ((c*p*L*%pi*(d)^2)/(16*6))*[2 1;1 2] +K1 = ((k*%pi*(d)^2)/(L))*[1 -1;-1 1] + +//Calculating globLal capacitance matrices +C(1,1:5) = [C1(1,1:2) 0 0 0] +C(2,1:5) = [C1(2,1) C1(2,2)+C1(1,1) C1(1,2) 0 0] +C(3,1:5) = [0 C1(2,1) C1(2,2)+C1(1,1) C1(1,2) 0] +C(4,1:5) = [0 0 C1(2,1) C1(2,2)+C1(1,1) C1(1,2)] +C(5,1:5) = [0 0 0 C1(2,1) C1(2,2)] + +//Calculating global conductance matrices +K(1,1:5) = [K1(1,1:2) 0 0 0] +K(2,1:5) = [K1(2,1) K1(2,2)+K1(1,1) K1(1,2) 0 0] +K(3,1:5) = [0 K1(2,1) K1(2,2)+K1(1,1) K1(1,2) 0] +K(4,1:5) = [0 0 K1(2,1) K1(2,2)+K1(1,1) K1(1,2)] +K(5,1:5) = [0 0 0 K1(2,1) K1(2,2)] + +//Calculating Inverse of Capacitance matrix +Ci = inv(C(2:4,2:4)) + +//Caluculating Coefficents Temperature odes +A = Ci*K(2:4,2:4) +B = Ci*(Q(2:4,1)-C(2:4,1)*Td(1,1)-C(2:4,5)*Td(5,1)-K(2:4,1)*T(1,1)-K(2:4,5)*T(5,1)) + +//solving for T2 T3 and T4 +T2(1) =30 +T3(1) =30 +T4(1) =30 + +for i = 2:301 + T2(i) = T2(i-1)-(A(1,1:3)*[T2(i-1);T3(i-1);T4(i-1)])+B(1,1) + T3(i) = T3(i-1)-(A(2,1:3)*[T2(i-1);T3(i-1);T4(i-1)])+B(2,1) + T4(i) = T4(i-1)-(A(3,1:3)*[T2(i-1);T3(i-1);T4(i-1)])+B(3,1) +end + +printf('\nResults\n') +printf('\nNode-Temperatures \nT2=%fK \nT3=%fK \nT4=%fK',T2(300),T3(300),T4(300)) + diff --git a/3588/CH7/EX7.2/EX7_2.sav b/3588/CH7/EX7.2/EX7_2.sav Binary files differnew file mode 100644 index 000000000..b6df83ad8 --- /dev/null +++ b/3588/CH7/EX7.2/EX7_2.sav diff --git a/3588/CH7/EX7.2/EX7_2.sce b/3588/CH7/EX7.2/EX7_2.sce new file mode 100644 index 000000000..b6f744875 --- /dev/null +++ b/3588/CH7/EX7.2/EX7_2.sce @@ -0,0 +1,15 @@ +//Clearing console +clc +clear + +//Intializing Variables +T1 = 95.14 +T2 = 90.14 +T3 = 85.14 + +//Calculating a2 +a2 = 2*T1 - 4*T2 +2*T3 + +//Printing Results +printf('\nResults\n') +printf('\na2=%f',a2) diff --git a/3588/CH7/EX7.3/EX7_3.sav b/3588/CH7/EX7.3/EX7_3.sav Binary files differnew file mode 100644 index 000000000..b7d610c7f --- /dev/null +++ b/3588/CH7/EX7.3/EX7_3.sav diff --git a/3588/CH7/EX7.3/EX7_3.sce b/3588/CH7/EX7.3/EX7_3.sce new file mode 100644 index 000000000..75072b292 --- /dev/null +++ b/3588/CH7/EX7.3/EX7_3.sce @@ -0,0 +1,50 @@ +//Clearing console +clc +clear + +//Intializing Variables +d = 0.5 +L = 4 +kx = 120 +ha = 50 +hw = 100 +Ta = 72 +T(1,1) = 180 +Q(1:4,1) = ((%pi*d^2)/4)*[4000;0;0;0] +A = (%pi*d^2)/(4*144) +Le = 1/12 +P = %pi*d/12 + +//Calculating elemental conductance capcitance matrices +Kc = ((kx*A)/(Le))*[1 -1;-1 1] +Kh = (ha*P*Le/(6))*[2 1;1 2] + +K1 = Kc + Kh + +//Calculating global stiffness matrice +K(1,1:5) = [K1(1,1:2) 0 0 0] +K(2,1:5) = [K1(2,1) K1(2,2)+K1(1,1) K1(1,2) 0 0] +K(3,1:5) = [0 K1(2,1) K1(2,2)+K1(1,1) K1(1,2) 0] +K(4,1:5) = [0 0 K1(2,1) K1(2,2)+K1(1,1) K1(1,2)] +K(5,1:5) = [0 0 0 K1(2,1) K1(2,2)] + +f = (ha*P*Ta*Le/(2))*[1;1] +Fh(2:5,1) = [f(1,1)+f(2,1);f(1,1)+f(2,1);f(1,1)+f(2,1);f(1,1)] +Fg(2:4,1) = Fh(2:4,1) +Fg(5,1) = Fh(5,1)+A*hw*40 +K(5,5) = K(5,5) +A*hw +Fd(2:5,1) = Fg(2:5,1)-K(2:5,1)*T(1,1) + +//Solving for Temperatures +T(2:5,1)=linsolve(K(2:5,2:5),-Fd(2:5,1)) + + +//Sovling for heat at node 5 +Fg(1,1) = K(1,1:5)*T + +//Sovling for heat flux at node 5 +q1 = ((-f(1,1)+ Fg(1,1))/(A)) + +printf('\nResults\n') +printf('\nNode-Temperatures \nT1=%f◦F \nT2=%f◦F \nT3=%f◦F \nT4=%f◦F \nT5=%f◦F',T(1,1),T(2,1),T(3,1),T(4,1),T(5,1)) +printf('\nHeat flow at node-1 \nq1=%fBtu/hr-ft^2',q1) diff --git a/3588/CH7/EX7.4/EX7_4.sav b/3588/CH7/EX7.4/EX7_4.sav Binary files differnew file mode 100644 index 000000000..424bfd3b7 --- /dev/null +++ b/3588/CH7/EX7.4/EX7_4.sav diff --git a/3588/CH7/EX7.4/EX7_4.sce b/3588/CH7/EX7.4/EX7_4.sce new file mode 100644 index 000000000..24ae49e04 --- /dev/null +++ b/3588/CH7/EX7.4/EX7_4.sce @@ -0,0 +1,58 @@ +//Clearing console +clc +clear + +//Intializing Variables +a = 0.5/12 +b = 0.5/12 +t = 0.5/12 +kx = 20 +ky = 20 +h= 50 + +r(1) = sqrt(3)/3 +r(2) = -sqrt(3)/3 +s(1) = sqrt(3)/3 +s(2) = -sqrt(3)/3 +K11 = 0 + +//Gaussian quadrature Integration for calculating elements of stiffness matrix +for j =1:2 + for i =1:2 + K11 = K11 + ((kx*t*(a/b)*(s(j)-1)^2)/16)+((ky*t*(b/a)*(r(i)-1)^2)/16)+((2*h*a*b*((1-r(i))^2)*((1-s(j))^2))/16) + end +end + +K22 = 0 +for j =1:2 + for i =1:2 + K22 = K22 + ((kx*t*(a/b)*(s(j)-1)^2)/16)+((ky*t*(b/a)*(r(i)+1)^2)/16)+((2*h*a*b*((1+r(i))^2)*((1-s(j))^2))/16) + end +end + +K12 = 0 +for j =1:2 + for i =1:2 + K12 = K12 + (-(kx*t*(a/b)*(s(j)-1)^2)/16)+((ky*t*(b/a)*(r(i)+1)*(1-r(i)))/16)+((2*h*a*b*(1-r(i))*(1+r(i))*((1-s(j))^2))/16) + end +end + +K13 = 0 +for j =1:2 + for i =1:2 + K13 = K13 + ((kx*t*(a/b)*(s(j)-1)*(s(j)+1))/16)+((ky*t*(b/a)*(r(i)+1)*(r(i)-1))/16)+((2*h*a*b*(1-r(i))*(1+r(i))*(1-s(j))*(1+s(j)))/16) + end +end + +K14 = 0 +for j =1:2 + for i =1:2 + K14 = K14 + (-(kx*t*(a/b)*(s(j)-1)*(1+s(j)))/16)+(-(ky*t*(b/a)*(1-r(i))^2)/16)+((2*h*a*b*(1-s(j))*(1+s(j))*((1-r(i))^2))/16) + end +end + +//Similarly Calculating other elements +K = [K11 K12 K13 K14;K12 K22 K12 K13;K13 K12 K22 K12;K14 K13 K12 K22] + +printf('\nComplete Element Conductance Matrix in Btu/(hr-◦F )\n') +disp(K) diff --git a/3588/CH7/EX7.5/EX7_5.sav b/3588/CH7/EX7.5/EX7_5.sav Binary files differnew file mode 100644 index 000000000..b83b52725 --- /dev/null +++ b/3588/CH7/EX7.5/EX7_5.sav diff --git a/3588/CH7/EX7.5/EX7_5.sce b/3588/CH7/EX7.5/EX7_5.sce new file mode 100644 index 000000000..7cab14276 --- /dev/null +++ b/3588/CH7/EX7.5/EX7_5.sce @@ -0,0 +1,89 @@ +//Clearing console +clc +clear + +//Intializing Variables +h = 50 +kx = 20 +ky = 20 +a = 0.5/12 +b = 0.5/12 +t = 0.5/12 +Ta = 68 +T(1,1) = 180 +T(2,1) = 180 +T(3,1) = 180 + +//Surface Convection stiffness matrix from problem EX7.4 +k = [0.6327160 -0.1003086 -0.2584877 -0.1003086;-0.1003086 0.6327160 -0.1003086 -0.2584877;-0.2584877 -0.1003086 0.6327160 -0.1003086;-0.1003086 -0.2584877 -0.1003086 0.6327160] + +k1 = integrate('(1-r)^2','r',-1,1) +k2 = integrate('(1+r)^2','r',-1,1) +k3 = integrate('1-r^2','r',-1,1) + +//Edge Convection stiffness matrix and force vector +k1h = (h*t*a/4)*[k1 k3 0 0;k3 k2 0 0;0 0 0 0;0 0 0 0] +f1h = (h*t*Ta*a/2)*[2;2;0;0] + +k2h = (h*t*a/4)*[k1 k3 0 0;k3 k2 0 0;0 0 0 0;0 0 0 0]+(h*t*b/4)*[0 0 0 0;0 k1 k3 0;0 k3 k2 0;0 0 0 0] +f2h = (h*t*Ta*a/2)*[2;4;2;0] + +k3h = (h*t*a/4)*[0 0 0 0;0 k1 k3 0;0 k3 k1+k2 k3;0 0 k3 k2] +f3h = (h*t*Ta*a/2)*[0;2;4;2] + +k4h = (h*t*a/4)*[0 0 0 0;0 0 0 0;0 0 k1 k3;0 0 k3 k2] +f4h = (h*t*Ta*a/2)*[0;0;2;2] + +//Surface Convection force vector +feh = (h*t*Ta*a/2)*[4;4;4;4] + +//Constructing Elemental stiffness matrices +k1 = k1h + k +k2 = k2h + k +k3 = k3h + k +k4 = k4h + k + +//Constructing elemental force vectors +f1 = f1h + feh +f2 = f2h + feh +f3 = f3h + feh +f4 = f4h + feh + +//Constructing Global stiffness matrix +K(1,1:9) = [k1(1,1) k1(1,4) 0 k1(1,2) k1(1,3) 0 0 0 0] +K(2,1:9) = [k1(4,1) k1(4,4)+k4(1,1) k4(1,4) k1(4,2) k1(4,3)+k4(1,2) k4(1,3) 0 0 0] +K(3,1:9) = [0 k4(4,1) k4(4,4) 0 k4(4,2) k4(4,3) 0 0 0] +K(4,1:9) = [k1(2,1) k1(2,4) 0 k1(2,2)+k2(1,1) k1(2,3)+k2(1,4) 0 k2(1,2) k2(1,3) 0] +K(5,1:9) = [k1(3,1) k1(3,4)+k4(2,1) k4(2,4) k1(3,2)+k2(4,1) k1(3,3)+k2(4,4)+k3(1,1)+k4(2,2) k3(1,4)+k4(2,3) k2(4,2) k2(4,3)+k3(1,2) k3(1,3)] +K(6,1:9) = [0 k4(3,1) k4(3,4) 0 k3(4,1)+k4(3,2) k3(4,4)+k4(3,3) 0 k3(4,2) k3(4,3)] +K(7,1:9) = [0 0 0 k2(2,1) k2(2,4) 0 k2(2,2) k2(2,3) 0] +K(8,1:9) = [0 0 0 k2(3,1) k2(3,4)+k3(2,1) k3(2,4) k2(3,2) k2(3,3)+k3(2,2) k3(2,3)] +K(9,1:9) = [0 0 0 0 k3(3,1) k3(3,4) 0 k3(3,2) k3(3,3)] + +//Constructing Global force vector +F(4,1) = f1(2,1) +f2(1,1) +F(5,1) = f1(3,1) +f2(4,1)+f3(1,1)+f4(2,1) +F(6,1) = f3(4,1) +f4(3,1) +F(7,1) = f2(2,1) +F(8,1) = f2(3,1) +f3(2,1) +F(9,1) = f3(3,1) + +//Resulting force vector by accounting for T1=T2=T3=180 +Fd(4:9,1) = F(4:9,1) - K(4:9,1:3)*T(1:3,1) + +//Solving for Temperatures +T(4:9,1)=linsolve(K(4:9,4:9),-Fd(4:9,1)) + +//Sovling for heat at node 1 2 and 3 +F(1:3,1) = K(1:3,1:9)*T + +//Sovling for heat flow at node 1 2 and 3 +F1 = F(1,1) - f1(1,1) +F2 = F(2,1) -35.4168 +F3 = F(3,1)-f4(4,1) + +printf('\nResults\n') +printf('\nNode-Temperatures \nT1=%f◦F \nT2=%f◦F \nT3=%f◦F \nT4=%f◦F \nT5=%f◦F \nT6=%f◦F \nT7=%f◦F \nT8=%f◦F \nT9=%f◦F',T(1,1),T(2,1),T(3,1),T(4,1),T(5,1),T(6,1),T(7,1),T(8,1),T(9,1)) +printf('\nHeat flow at node-1 \nF1=%fBtu/hr',F1) +printf('\nHeat flow at node-2 \nF2=%fBtu/hr',F2) +printf('\nHeat flow at node-3 \nF3=%fBtu/hr',F3) diff --git a/3588/CH7/EX7.6/EX7_6.sav b/3588/CH7/EX7.6/EX7_6.sav Binary files differnew file mode 100644 index 000000000..bfa8c869c --- /dev/null +++ b/3588/CH7/EX7.6/EX7_6.sav diff --git a/3588/CH7/EX7.6/EX7_6.sce b/3588/CH7/EX7.6/EX7_6.sce new file mode 100644 index 000000000..e848eacd6 --- /dev/null +++ b/3588/CH7/EX7.6/EX7_6.sce @@ -0,0 +1,24 @@ +//Clearing console +clc +clear + +//Intializing variables +kx = 20 +ky = 20 +a = 0.5/12 +b = 0.5/12 +T =[180.000000;180.000000;180.000000;106.528061;111.987760;106.528061;89.057755;90.986763;89.057755] + +T2 = [T(4,1);T(7,1);T(8,1);T(5,1)] + +//Calculating the centroidal heat flux components for elements 2 and 3 +q2x = -(kx/(4*a))*(T2(2,1)-T2(1,1)+T2(3,1)-T2(4,1)) +q2y = -(ky/(4*b))*(T2(4,1)-T2(1,1)+T2(3,1)-T2(2,1)) + +//due to symmetry +q3x = q2x +q3y = -q2y + +printf('\nResults\n') +printf('\nHeat flux components for element 2 \nq2x=%fBtu/hr-ft 2 \nq2y=%fBtu/hr-ft^2',q2x,q2y) +printf('\nHeat flux components for element 3 \nq3x=%fBtu/hr-ft 2 \nq3y=%fBtu/hr-ft^2',q3x,q3y) diff --git a/3588/CH7/EX7.7/EX7_7.sav b/3588/CH7/EX7.7/EX7_7.sav Binary files differnew file mode 100644 index 000000000..bbe19a9ed --- /dev/null +++ b/3588/CH7/EX7.7/EX7_7.sav diff --git a/3588/CH7/EX7.7/EX7_7.sce b/3588/CH7/EX7.7/EX7_7.sce new file mode 100644 index 000000000..08d49fea8 --- /dev/null +++ b/3588/CH7/EX7.7/EX7_7.sce @@ -0,0 +1,26 @@ +//Clearing console +clc +clear + +//Intializing variables +h = 50 +a = 0.5/12 +b = 0.5/12 +t = 0.5/12 +Ta = 68 +A = 4*a*b +T =[180.000000;180.000000;180.000000;106.528061;111.987760;106.528061;89.057755;90.986763;89.057755] + +T3 = [T(5,1);T(8,1);T(9,1);T(6,1)] + +//convective heat flow rate for element 3 due to different surfaces +I1 = (2*h*A)*(((T3(1,1)+T3(2,1)+T3(3,1)+T3(4,1))/4)-Ta) +I2 = 2*h*t*b*(((T3(2,1)+T3(3,1))/2)-Ta) +I3 = 2*h*t*b*(((T3(3,1)+T3(4,1))/2)-Ta) + +//The total convective heat flow rate for element 3 +H = I1+I2+I3 + + +printf('\nResults\n') +printf('\nThe total convective heat flow rate for element 3\nH=%fBtu/hr',H) diff --git a/3588/CH7/EX7.9/EX7_9.sav b/3588/CH7/EX7.9/EX7_9.sav Binary files differnew file mode 100644 index 000000000..92c1b2a76 --- /dev/null +++ b/3588/CH7/EX7.9/EX7_9.sav diff --git a/3588/CH7/EX7.9/EX7_9.sce b/3588/CH7/EX7.9/EX7_9.sce new file mode 100644 index 000000000..8ce7692bb --- /dev/null +++ b/3588/CH7/EX7.9/EX7_9.sce @@ -0,0 +1,46 @@ +//Clearing console +clc +clear + +//Intializing Variables +d = 0.02 +L = 0.1 +k = 0.156 +c = 0.523 +h = 300 +m = 0.2*60 +Ta = 15 +T(1,1) = 50 + +//Calculating elemental conductance capcitance matrices +Kc = ((k*%pi*(d)^2)/(L))*[1 -1;-1 1] +Kh = (h*%pi*d*L/24)*[2 1;1 2] +Km = (m*c/2)*[-1 1;-1 1] + +//Calculating elemental stiffness matrice +K1 = Kc+Kh+Km + +//Calculating global stiffness matrice +K(1,1:5) = [K1(1,1:2) 0 0 0] +K(2,1:5) = [K1(2,1) K1(2,2)+K1(1,1) K1(1,2) 0 0] +K(3,1:5) = [0 K1(2,1) K1(2,2)+K1(1,1) K1(1,2) 0] +K(4,1:5) = [0 0 K1(2,1) K1(2,2)+K1(1,1) K1(1,2)] +K(5,1:5) = [0 0 0 K1(2,1) K1(2,2)] + + +f = (h*%pi*d*Ta*L/8)*[1;1] +F(2:5,1) = [f(1,1)+f(2,1);f(1,1)+f(2,1);f(1,1)+f(2,1);f(1,1)] + +Fd(2:5,1) = F(2:5,1)-K(2:5,1)*T(1,1) + +//Solving for Nodal temperatures +T(2:5,1)=linsolve(K(2:5,2:5),-Fd(2:5,1)) + +//Calculating qs +qm1 = m*c*T(1,1)*10 +qm5 = m*c*T(5,1)*10 + +printf('\nResults\n') +printf('\nNode-Temperatures \nT1=%fK \nT2=%fK \nT3=%fK \nT4=%fK \nT5=%fK',T(1,1),T(2,1),T(3,1),T(4,1),T(5,1)) +printf('\nHeat rate at node-1 \nq1=%fW',qm1) +printf('\nHeat rate at node-5 \nq5=%fW',qm5) |