I'm writing a code that predicts the surface temperature of an annulus with specific thickness running through it a hot air and outisde it is under a water bath of a specific water temperature, the code should give me the way the temperature of the surface behaves across it's length.
T = T_water * ones(nx, 1);
alpha = k_cylinder/(dx^2);
beta = h_air*dx/k_cylinder;
r_pipe = log((r+d)/r)/(2*pi*k_cylinder*L);
r_film = 1/(h_air*2*pi*r*dx);
dTdr = (T_old(j+1)-T_old(j-1))/(2*dx);
T(j) = T_old(j) + alpha*dt*(T_old(j+1)-2*T_old(j)+T_old(j-1)) + h*2*pi*r*dt*(T_air_in-T_old(j)) + 2*pi*r*h_water*dt*(T_water-T_old(j));
ylabel('Temperature [K]');
title('Temperature profile of cylinder surface');
Upon running the code, you'll see that it won't show a curve nor values across the cylinder.