Contents
Heat Transfer Home Work
clear, clc, home
fprintf('The date and time: %s \n', datestr(now))
The date and time: 17-Feb-2009 09:56:34
Problem 2.8 Heat loss through a plane wall
fprintf('\n *** Problem *** \n')
fprintf('\nHeat loss through a plane wall\n')
fprintf('\n *** Find *** \n')
fprintf('\nHeat flux and fill out the table for the unknows.\n')
fprintf('\n *** Assumptions *** \n')
fprintf('\nSteady state 1-D heat flow')
fprintf('\nNo heat generation')
fprintf('\nConstant properties\n')
fprintf('\n *** Schematics/Given *** \n')
fprintf('\nfor schematics see page 83 of the text\n')
L = 0.25
k = 50
Matrix = [1, 50, -20, 0, 0; 2, -30, -10, 0, 0; 3, 70, 0, 160, 0; ...
4, 0, 40, -80, 0; 5, 0, 30, 200, 0];
fprintf('Matrix Given: \n')
fprintf('Case \t T1 \t T2 \t dT/dx \t heat flux\n')
fprintf(' %3.0f \t %3.0f \t %3.0f \t %3.0f \t %3.0f \n', Matrix')
fprintf('\n*Zeros represent unknown values\n \n')
fprintf('\n *** Analysis *** \n')
fprintf('\nHeat Equation:')
fprintf('\nd^2T/dx^2 = 0 ... (eqn 1)\n')
fprintf('\nIntegrate (eqn 1) twice:\n')
fprintf('T(x) = c1*x + c2 ... (eqn 2)\n')
fprintf('\nBoundry conditions:\n')
fprintf('\nBC1. T1 = T(0) = c2\n')
fprintf('c2 = T1\n')
fprintf('\nBC2. T2 = T(L) = c1*L + T1\n')
fprintf('c1 = (T2-T1)/L\n')
fprintf('\nPlug BC1 and BC2 into (eqn 2):\n')
fprintf('T(x) = ((T2-T1)/L)*x + T1\n')
x = 0:.001:0.25;
*** Problem ***
Heat loss through a plane wall
*** Find ***
Heat flux and fill out the table for the unknows.
*** Assumptions ***
Steady state 1-D heat flow
No heat generation
Constant properties
*** Schematics/Given ***
for schematics see page 83 of the text
L =
0.2500
k =
50
Matrix Given:
Case T1 T2 dT/dx heat flux
1 50 -20 0 0
2 -30 -10 0 0
3 70 0 160 0
4 0 40 -80 0
5 0 30 200 0
*Zeros represent unknown values
*** Analysis ***
Heat Equation:
d^2T/dx^2 = 0 ... (eqn 1)
Integrate (eqn 1) twice:
T(x) = c1*x + c2 ... (eqn 2)
Boundry conditions:
BC1. T1 = T(0) = c2
c2 = T1
BC2. T2 = T(L) = c1*L + T1
c1 = (T2-T1)/L
Plug BC1 and BC2 into (eqn 2):
T(x) = ((T2-T1)/L)*x + T1
Case 1
T1 = Matrix(1,2); T2 = Matrix(1,3);
Matrix(1,4) = ((T2-T1)/L);
fprintf('\ndT/dx = (T2-T1)/L\n')
fprintf('dT/dx = %g\n', Matrix(1,4))
fprintf('\nq = -k*dT/dx\n')
q = -k*Matrix(1,4)
Matrix(1,5) = q;
T_case1 = ((T2-T1)/L)*x + T1;
plot(x, T_case1), xlabel('Position x, (m)'), ...
ylabel('Temperature T, (degrees C)'), ...
title('Temperature Distribution in a Plane Wall')
dT/dx = (T2-T1)/L
dT/dx = -280
q = -k*dT/dx
q =
14000
Case 2
T1 = Matrix(2,2); T2 = Matrix(2,3);
Matrix(2,4) = ((T2-T1)/L);
fprintf('\ndT/dx = (T2-T1)/L\n')
fprintf('\ndT/dx = %g\n', Matrix(2,4))
fprintf('\nq = -k*dT/dx\n')
q = -k*Matrix(2,4)
Matrix(2,5) = q;
T_case2 = ((T2-T1)/L)*x + T1;
plot(x, T_case2), xlabel('Position x, (m)'), ...
ylabel('Temperature T, (degrees C)'), ...
title('Temperature Distribution in a Plane Wall')
dT/dx = (T2-T1)/L
dT/dx = 80
q = -k*dT/dx
q =
-4000
Case 3
T1 = Matrix(3,2); dTdx = Matrix(3,4);
Matrix(3,3) = dTdx*L + T1;
T2 = Matrix(3,3);
fprintf('\nT2 = dT/dx*L + T1\n')
fprintf('\nT2 = %g\n', Matrix(3,3))
fprintf('\nq = -k*dT/dx\n')
q = -k*Matrix(3,4)
Matrix(3,5) = q;
T_case3 = ((T2-T1)/L)*x + T1;
plot(x, T_case3), xlabel('Position x, (m)'), ...
ylabel('Temperature T, (degrees C)'), ...
title('Temperature Distribution in a Plane Wall')
T2 = dT/dx*L + T1
T2 = 110
q = -k*dT/dx
q =
-8000
Case 4
T2 = Matrix(4,3); dTdx = Matrix(4,4);
Matrix(4,2) = T2 - dTdx*L;
T1 = Matrix(4,2);
fprintf('\nT1 = T2 - dT/dx*L\n')
fprintf('\nT1 = %g\n', Matrix(4,2))
fprintf('\nq = -k*dT/dx\n')
q = -k*Matrix(4,4)
Matrix(4,5) = q;
T_case4 = ((T2-T1)/L)*x + T1;
plot(x, T_case4), xlabel('Position x, (m)'), ...
ylabel('Temperature T, (degrees C)'), ...
title('Temperature Distribution in a Plane Wall')
T1 = T2 - dT/dx*L
T1 = 60
q = -k*dT/dx
q =
4000
Case 5
T2 = Matrix(5,3); dTdx = Matrix(5,4);
Matrix(5,2) = T2 - dTdx*L;
T1 = Matrix(5,2);
fprintf('\nT1 = T2 - dT/dx*L\n')
fprintf('\nT1 = %g\n', Matrix(5,2))
fprintf('\nq = -k*dT/dx\n')
q = -k*Matrix(5,4)
Matrix(5,5) = q;
T_case5 = ((T2-T1)/L)*x + T1;
plot(x, T_case5), xlabel('Position x, (m)'), ...
ylabel('Temperature T, (degrees C)'), ...
title('Temperature Distribution in a Plane Wall')
T1 = T2 - dT/dx*L
T1 = -20
q = -k*dT/dx
q =
-10000
Table filled out
fprintf('Matrix Given: \n')
fprintf('Case \t T1 \t T2 \t dT/dx \t heat flux\n')
fprintf(' %3.0f \t %3.0f \t %3.0f \t %3.0f \t %g \n', Matrix')
Matrix Given:
Case T1 T2 dT/dx heat flux
1 50 -20 -280 14000
2 -30 -10 80 -4000
3 70 110 160 -8000
4 60 40 -80 4000
5 -20 30 200 -10000
Comments:
fprintf('\nThe dirrection of heat flux is from hot to cold.')
fprintf('\nLooking at the graphs, the heat flux is dirrected "down hill".')
fprintf('\nThe isotherms for this wall would be parallel to the wall surface.\n')
The dirrection of heat flux is from hot to cold.
Looking at the graphs, the heat flux is dirrected "down hill".
The isotherms for this wall would be parallel to the wall surface.