Consider a large uranium plate of thickness 5 cm and thermal conductivity k = 28
ID: 2074177 • Letter: C
Question
Consider a large uranium plate of thickness 5 cm and thermal conductivity k = 28 W/m·K in which heat is generated uniformly at a constant rate of egen = 600 kW/m3 . One side of the plate is insulated while the other side is subjected to convection to an environment at 30°C with a heat transfer coefficient of h = 60 W/m2 ·K. Develop a Matlab program to Consider equally spaced nodes with a nodal spacing of 0.1 cm, and determine the nodal temperatures under steady conditions by solving those equations. Plot the temperature profile in Matlab.
Just want to know how to write a code for solving t(i)=(t(i-1)+t(i+1)-1.764)/2 for nodes from 0:50. since node0 is insulated, T(0)=2*T(1)-1.764
Explanation / Answer
you calculated with the logic you have written i.e. t(i)=(t(i-1)+t(i+1)-1.764)/2, instead of using node numbers from 0:50, use 1:51. Since, in MATLAB there is no location storage which starts with '0'.
before for loop you write following lines,
t=zeros(size(1,51)) % this line will pre-allocate for the temperature for 51 number of nodes i.e a matrix of size 1x51
t(1,1)=2*t(1,2)-1.764;
And your for loop will become;
for i=2:50;
t(1,i)=(t(1,i-1)+t(1,i+1)-1.764)/2;
end
-----------------------------------
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.