Chapter3_Prob40
Chapter3_Prob40
(b) The following MATLAB program, written in a script file, solves the nonlinear system of equations
with the fixed-point iteration method using the iteration functions from part (a). The following initial val-
ues are used: T h = T c = 298 K, J c = 3000 W/m2, and J h = 5000 W/m2. The program carries out 100
iterations, display the value of the solutions after the last iteration, and plots the respective values to
observe their convergence.
clear all
Tc(1)=298; Th(1)=298; Jc(1)=3000; Jh(1)=5000; IT(1)=1;
Excerpts from this work may be reproduced by instructors for distribution on a not-for-profit basis
for testing or instructional purposes only to students enrolled in courses for which the textbook
has been adopted. Any other reproduction or translation of this work beyond that permitted by
Sections 107 or 108 of the 1976 United States Copyright Act without the permission of the
copyright owner is unlawful.
2
for i=2:100
IT(i)=i;
Tc(i)=((Jc(i-1)-17.41*Tc(i-1)+5188.18)/5.67E-8)^(1/4);
Th(i)=((2250+Jh(i-1)-1.865*Th(i-1))/5.67E-8)^(1/4);
Jc(i)=2352.71+0.71*Jh(i-1)-7.46*Tc(i-1);
Jh(i)=11093+0.71*Jc(i-1)-7.46*Th(i-1);
end
i
TcLast=Tc(i)
ThLast=Th(i)
JcLast=Jc(i)
JhLast=Jh(i)
subplot(2,2,1)
plot(IT,Tc)
xlabel('Iteration'); ylabel('Tc')
subplot(2,2,2)
plot(IT,Th)
xlabel('Iteration'); ylabel('Th')
subplot(2,2,3)
plot(IT,Jc)
xlabel('Iteration'); ylabel('Jc')
subplot(2,2,4)
plot(IT,Jh)
xlabel('Iteration'); ylabel('Jh')
When the program is executed, the following is displayed in the Command Window.
i =
100
TcLast =
481.0273
ThLast =
671.1240
JcLast =
6.2222e+003
Excerpts from this work may be reproduced by instructors for distribution on a not-for-profit basis
for testing or instructional purposes only to students enrolled in courses for which the textbook
has been adopted. Any other reproduction or translation of this work beyond that permitted by
Sections 107 or 108 of the 1976 United States Copyright Act without the permission of the
copyright owner is unlawful.
3
JhLast =
1.0504e+004
600 700
550
600
500
450 500
Th
Tc
400 400
350
300
300
250 200
0 20 40 60 80 100 0 20 40 60 80 100
Iteration Iteration
7000 12000
11000
6000
10000
9000
Jh
Jc
5000
8000
7000
4000
6000
3000 5000
0 20 40 60 80 100 0 20 40 60 80 100
Iteration Iteration
Excerpts from this work may be reproduced by instructors for distribution on a not-for-profit basis
for testing or instructional purposes only to students enrolled in courses for which the textbook
has been adopted. Any other reproduction or translation of this work beyond that permitted by
Sections 107 or 108 of the 1976 United States Copyright Act without the permission of the
copyright owner is unlawful.