Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Volumen Finito

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

VOLUMEN FINITO

Reporte de Prácticas

Tecnológico Nacional de México, campus Morelia


Simulación de Sistemas de Energías Renovables
Consider the problem of source-free heat conduction in an insulates rod whose ends are
maintained at constant temperatures of 100 ºC and 500 ºC respectively. The one-
𝑑 𝑑𝑇
dimensional problem sketched in Figure 4.3 is governed by (𝑘 𝑑𝑥 ) = 0. Calculate the
𝑑𝑥
steady state temperature distribution in the rod. Thermal conductivity k equals 1000 W/m
k, cross sectional area A is 10 E-3 m^2

clear

clc;

%Declaracion de los comandos%

A=10e-3 %m2 Area de seccion transversal

L=0.5 %m longitud de la barra

D=0.02 %m de diametro

T_a=100 %ºC Temperatura en el extremo izq

T_b=500 %ºC Temperatura en el extremo der

k=1000 %W/mk

nc=90 %numero de celdas

dx=L/nc %Longitud entre celdas

%Declarar los coeficientes para cada tipo de celda%

%Celda frontera izq

a_Pi=(3*k*A)/dx;

a_Ei=-(k*A)/dx;

a_Wi=0;

Sui=((2*k*A)/dx)*T_a;

%Celda frontera der

a_Pd=(3*k*A)/dx;
a_Ed=0;

a_Wd=-(k*A)/dx;

Sud=((2*k*A)/dx)*T_b;

%Celda central

a_Pc=(2*k*A)/dx;

a_Ec=-(k*A)/dx;

a_Wc=-(k*A)/dx;

Suc=0;

%Vector de constantes

for(i=1:1:nc)

if(i==1)

Su(i,1)=Sui;

elseif(i==nc)

Su(i,1)=Sud;

else

Su(i,1)=Suc;

endif

endfor

%Matriz de coeficientes

C=zeros(nc,nc)

for(i=1:1:nc)

for(j=1:1:nc)

if(i==1)

if(j==i)

C(i,j)=a_Pi;
elseif(j==i+1)

C(i,j)=a_Ei;

endif

elseif(i==nc)

if(j==i)

C(i,j)=a_Pd;

elseif(j==i-1)

C(i,j)=a_Wd;

endif

else

if(i==j)

C(i,j)=a_Pc;

elseif(j==i+1)

C(i,j)=a_Ec;

elseif(j==i-1)

C(i,j)=a_Wc;

endif

endif

end

end

T=C\Su

Tt=T'

T2=[T_a,Tt,T_b]

%Malla para la grafica

dx2=dx/2;

dy=D/2;
y=[0;dy;D]

for i=1:1:nc

x(1,i)=(i*dx)-dx2;

endfor

x2=[0,x,L]

x3=[x2;x2;x2]

T3=[T2;T2;T2]

for (i=1:1:(nc+2))

y3(:,i)=y

endfor

figure 1

clf

colormap(hot)

contourf(x3,y3,T3,nc)

figure 2

clf

plot(x2,T2)
Now we discuss a problema that includes sources other that those arising from boundary conditions.
Figure 4.6 shows a large plate of thickness L)2 cm with constant thermal conductivity K = 0.5 W/m k
and uniform heat generation q = 1000 kW/m´3. The faces A and B are temperatures of 100 ºC and
200 ºC respectively. Assuming that the dimensions in the y and z directions are so large that
temperature gradients are significant in the x-direcion only calculate the steady state temperature
gradients are significant in the x-direction only calculate the steady state temperature distribution.
Compare the numerical result with the analytical solution.

Clear

clc;

%Declaracion de los comandos

A=20e-3 %metros cuadrados

L=1 %metros

L2=0.02 %metros

k=0.5 %W/m*k

T_a=100 %ºC

T_b=200 %ºC

q=1000 %kW/m^2

nc=25

dx=L/nc

%Celda frontera izq

a_Pi=(3*k*A)/dx

a_Ei=-(k*A)/dx

a_Wi=0

Sui=(q*A*dx)+(2*k*A*T_a)/dx

Spi=(-2*k*A)/dx

%Celda frontera der

a_Pd=(3*k*A)/dx
a_Ed=0

a_Wd=-(k*A)/dx

Sud=(q*A*dx)+(2*k*A*T_b)/dx

Spd=(-2*k*A)/dx

%Celda central

a_Pc=(2*k*A)/dx

a_Ec=-(k*A)/dx

a_Wc=-(k*A)/dx

Suc=q*A*dx

Spc=0

%Vector de constantes

for(i=1:1:nc)

if(i==1)

Su(i,1)=Sui;

elseif(i==nc)

Su(i,1)=Sud;

else

Su(i,1)=Suc;

endif

endfor

%Matriz de coeficientes

C=zeros(nc,nc)

for(i=1:1:nc)

for(j=1:1:nc)

if(i==1)

if(j==i)
C(i,j)=a_Pi;

elseif(j==i+1)

C(i,j)=a_Ei;

endif

elseif(i==nc)

if(j==i)

C(i,j)=a_Pd;

elseif(j==i-1)

C(i,j)=a_Wd;

endif

else

if(i==j)

C(i,j)=a_Pc;

elseif(j==i+1)

C(i,j)=a_Ec;

elseif(j==i-1)

C(i,j)=a_Wc;

endif

endif

end

end

T=C\Su

Tt=T'

T2=[T_a,Tt,T_b]

%Malla para la grafica

dx2=dx/2;
dy=L2/2;

y=[0;dy;L2]

for i=1:1:nc

x(1,i)=(i*dx)-dx2;

endfor

x2=[0,x,L2]

x3=[x2;x2;x2]

T3=[T2;T2;T2]

for (i=1:1:(nc+2))

y3(:,i)=y

endfor

figure 1

clf

colormap(hot)

contourf(x3,y3,T3,nc)

figure 2

clf

plot(x2,T2)

You might also like