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

Consider a metal rod of length L initially at temperature 20 C everywhere along

ID: 3280697 • Letter: C

Question

Consider a metal rod of length L initially at temperature 20 C everywhere along its length. At time t0 the left end of the rod is fixed at 100 C while the right end of the rod is held fixed at o C, as shown below in Figure 1: T(x=0,t) = 100 C L=1m t(x,t=0)-20 C Figure 1: problem setup The temperature along the rod at any x-position for any time t is a function of 2-variables (T(x,t) an can be found by solving the heat diffusion equation ( is a material property diffusivity and has units of m2/s, for this problem use -1) called the thermal ngth x such that the x location of the ith To solve this numerically, chop the bar up in to elements of le node is given by: In a similar fashion, the time coordinate is discretized such that the time at the jh time step is: t-jAt The derivatives in the heat-diffusion e quation are replaced by finite difference approximations: ot At ax (Ax) Substituting these finite-difference approximations in to the heat diffusion equation and solving for T (Ax)2 (+1 This result gives an explicit, algebraic equation for calculating the temperature at the next time value based on temperatures at the previous time value.

Explanation / Answer

Let us first break the length into some steps of length dx. Here, let me chose dx to be (1/20)m which means I am breaking the rod into 20 parts.

So, according to the relation given, the time step must be less than or equal to 0.00125 s.

If T(x, t) is my matrix in x and t, then T(x,1) gives the values of T at time=0. The initial values of T are given by the elements T(1,1)=100, T(20,1)=0 and T(x,1)=20 for x from 2 to 19.

Then, we need to iteratively find the remaining columns of T using the diffusion equation given and stop when we obtain a column which is the same as the previous one (upto temperature sensitivity which I have taken to be 0.01 in my example).

That is your steady state temperature.

Here's the barebones version of what your MATLAB code may look like.

T=zeros(20,1);

T_back=zeros(20,1);

time=0;

T(1,1)=100;

for(i=2:19) T(i,1)=20; end

while (sum(abs(T-T_back))>1/100)

time=time+1;

T_back=T;

for(i=2:19) T(i,1)=0.5*(T_back(i+1,1)+T_back(i-1,1)-2*T_back(i,1))+T_back(i,1); end

plot(T)

pause(0.00125);

end;

steadystatetime=time*0.00125

You can compile it on Matlab. T gives the steady state temperature distribution.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote