Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

matlab textbook (page 111 of 488) Project 4.8 The temperature distribution ofa h

ID: 3920127 • Letter: M

Question

matlab textbook (page 111 of 488) Project 4.8 The temperature distribution ofa hickod having a circular cros- ection, initially at a uniform temperature, To, and which is suddenly immersed in a huge bath at a temperature T,, is given by 92 ? Numerical and Analytical Methods with MATLAB where J, and Jo are Bessel functions of the first kind. h the convective heat transfer coefficient. k= the thermal conductivity of the rod material R the radius of the rod. a the thermal diffusivity of the rod material. ,R the nth root of Equation (P4.8b): (P4.8b)

Explanation / Answer

clear all;
n=31;

for i = 1:n
z(i) = fzero(@(x)besselj(1,x),[(i-1) i]*pi); %%finding first 31 zeros of bessel function j1
end
h=890;
k=35;
R=0.12;

for i=1:30
z1(i)=fzero(@(x)(besselj(0,x)/besselj(1,x)-x*k/(h*R)),[z(i)+10^(-5), z(i+1)-10^(-5)]); %%finding first 30 zeros of %f(lambda*R)
end
for i=1:30
z2(i)=besselj(0,z1(i))/besselj(1,z1(i))-z1(i)*k/(h*R); %values of f(lambda(n)*R) at zeros of lambda(n)*R.
end
a=reshape(z1,6,5); %%changing array of lambda*R into array of size 6x5
b=reshape(z2,6,5); %% changing array of F(lambda*R) into array of size 6x5
disp('Lambda(n)R');
disp(a)
disp('F(Lambda(n)R)');
disp(b)