Question: Using the given MatLab code: function Name_1D_Conduction clc %clear all variables clear ilast = %number of grid points in x tlast= %number of iterations for

 Using the given MatLab code: function Name_1D_Conduction clc %clear all variables

Using the given MatLab code:

function Name_1D_Conduction

clc %clear all variables

clear

ilast = %number of grid points in x

tlast= %number of iterations for time

dx = %grid spacing

dt = %time spacing

k = %thermal conductivity of material

rho = %density of material

cp = %specific heat of material

alpha = %thermal diffusivity

t = %initial time (t=0seconds)

%Boundary Condition on left side of Rod

Tnew(1) =

Fo = (dt*alpha)/dx^2; %Fourier Number (Should be less than or equal to

0.5)

%iterations

for k=1:tlast-1 %time loop

t=t+dt; %incremental time

Told=Tnew; %setting old to previous new temperatures for differencing

Example Told(2)=Tnew(1)

for i=2:ilast-1

x(i)=(i-1)*dx; % actual values of depth

Tnew(i)=

end

plot(x,Tnew) %Temperature vs. distance at last timestep

end

-ZCOM + Matlab Exercise The temperature of a perfectly insulated iron bar In loa? Ibe temperature of the na t e d a mantained at 200 C. Plot the tenperature distituiona 000. The raterial properties are. -802 .R ?-787 p- Use the 1-I) Fourier Heat condiction equation and Matlah t? plot the soh!tion: wbene pe -ZCOM + Matlab Exercise The temperature of a perfectly insulated iron bar In loa? Ibe temperature of the na t e d a mantained at 200 C. Plot the tenperature distituiona 000. The raterial properties are. -802 .R ?-787 p- Use the 1-I) Fourier Heat condiction equation and Matlah t? plot the soh!tion: wbene pe

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!