WRITE A MATLAB CODE TO SOLVE THE FOLLOWING PROBLEM NUMERICAL METHODS FOR SCIENTI
ID: 3278026 • Letter: W
Question
WRITE A MATLAB CODE TO SOLVE THE FOLLOWING PROBLEM
NUMERICAL METHODS FOR SCIENTISITS AND ENGINEERS 3RD EDITION CHAPTER 11
in a pin fin. Solving a second-order UDE Example 11-1: Temperuture distrlibution (BVP) using the shooting method. A pin fin is a slender extension attached to a surface in order to increase the surface area and enable greater heat transfer. When con- vection and radiation are included in the analysis, the steady-state temperature distribution, T(x), along a pin fin can be calculated from the solution of the equation: Ts s)kA TB with the boundary conditions: T(0) T, and T(L)-7, In Eq (11.15), he is the convective heat transfer coefficient, P is the perimeter bounding the cross section of the fin, is the radiative emissivity of the surface of the fin, k is the thermal conductivity of the fin m aterial, A, is the cross-sectional area of the fin, Ts is the temperature of the surrounding air, and s,-5.67 × 10-8 W/m2K4) is the Stefan-Boltzmann constant. Determine the temperature distribution if L= 0.1 m, T(0) = 473 K, T(0.1 ) = 293 K, and T,-293 K. Use the following values for the parameters in Eq. (): 40 Wim/K, P 0.016 m, -0.4 , k 240 W/m/K, and Ac = 1.6 × 10-5 m2.Explanation / Answer
Using the values of given parameters, we can write
(1) hcP/kAc = 500/3
(2) epison*sigma*P/kAc = 1.06 x 10-3
so, our equation becomes
d2T/dx2 - 500/3 (T- Ts) - 1.06x10-3 (T4 - Ts4)= 0
now, let us divide the length of 0.1 m into 10 equal segments of dx = 0.01
and at x= 0, T = 473 K and at x = 0.1 , T = 293 K
using forward difference for second order derivative such that
d2T/dx2 = (Ti - 2Ti+1 + Ti+2)/dx2
Our set of equations to be solved become:
Ti - 2Ti+1 + Ti+2 - 10-4 x 500/3 (Ti - 293) - 10-4x1.06x10-3 (Ti4 - 7.37x109) = 0
now i goes from 0 to 8 as we have values of T0 = 493 K and T10 = 293 K.
Rewriting the equation to implement in the code,
(1 - 5/3 x 10-2 )Ti + 1.06x 10-7 Ti4 - 2Ti+1 - Ti+2 + 786.1 = 0
or 0.9833Ti + 1.06x 10-7 Ti4 - 2Ti+1 - Ti+2 + 786.1 = 0
Now we, can write a code for solving these set of equations:
THE SYSTEM OF LINEAR EQUATIONS CAN BE DEFINED IN THE MATLAB AS:
code:
function F = temp(T)
F(1) = 0.9833x293 + 1.06x 10-7x 2934- 2T1- T2+ 786.1 = 0
F(2) = 0.9833T1+ 1.06x 10-7 T14 - 2T2 - T3 + 786.1 = 0
F(3) = 0.9833T2 + 1.06x 10-7 T24 - 2T3 - T4 + 786.1 = 0
F(4) = 0.9833T3+ 1.06x 10-7 T34 - 2T4- T5 + 786.1 = 0
F(5) = 0.9833T4 + 1.06x 10-7 T44 - 2T5 - T6 + 786.1 = 0
F(6) = 0.9833T5 + 1.06x 10-7 T54 - 2T6 - T7 + 786.1 = 0
F(7) = 0.9833T6+ 1.06x 10-7 T64 - 2T7 - T8 + 786.1 = 0
F(8) = 0.9833T7 + 1.06x 10-7 T74 - 2T8 - T9 + 786.1 = 0
F(9) = 0.9833T8 + 1.06x 10-7 T84 - 2T9 - 293 + 786.1 = 0
"This will solve the set of equations and give the values of T1 to T9. as T0 and T10 are known, we can get temperature distribution.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.