Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

Use the Laplacian difference equation and Liebmann’s method to solve for temperature

VIEWS: 1,912 PAGES: 11

Use the Laplacian difference equation and Liebmann’s method to solve for temperature

More Info
									กF

9

Use the Laplacian difference equation and Liebmann’s method to solve for temperature

Use a relaxation factor of 1.5 and iterate to ε s = 2% and k=0.5 Plot both the temperature and heat flux for this plate The Laplacian Differential Equation

ก ก

Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1 − 4Ti , j = 0

ก

F (0, 1);

∂T T1,1 − T−1,1 ≅ ∂x 2 ∆x

FF

F

F ก F Plate
∂T ∂x

T−1,1 = T1,1 − 2∆x

F
2T1,1 − 2∆x

ก

F (0, 1)

F

∂T + T0,2 + T0,0 − 4T0,1 = 0 ∂x

F

F

(F

F

)

FF

F Fก

F

2T1,1 + T0,2 + T0,0 − 4T0,1 = 0 2T1,1 + T0,2 + 25 − 4T0,1 = 0 2T1,1 + T0,2 − 4T0,1 = −25 ..............................................

ก

1

ก
2T1,2 + T0,3 + T0,1 − 4T0,2 = 0 2T1,2 + 50 + T0,1 − 4T0,2 = 0

F (0, 2);

2T1,2 + T0,1 − 4T0,2 = −50 ..............................................

ก

2

F ก F F F Plate ก ก Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1 − 4Ti , j = 0 F (1, 1);
T2,1 + T0,1 + T1,2 + T1,0 − 4T1,1 = 0 T2,1 + T0,1 + T1,2 + 25 − 4T1,1 = 0

F ก F F

T2,1 + T0,1 + T1,2 − 4T1,1 = −25 ..............................................

ก

3

F (1, 2);
T2,2 + T0,2 + T1,3 + T1,1 − 4T1,2 = 0 T2,2 + T0,2 + 50 + T1,1 − 4T1,2 = 0 T2,2 + T0,2 + T1,1 − 4T1,2 = −50 ..............................................

ก

4

F (2, 1);
T3,1 + T1,1 + T2,2 + T2,0 − 4T2,1 = 0 T3,1 + T1,1 + T2,2 + 25 − 4T2,1 = 0 T3,1 + T1,1 + T2,2 − 4T2,1 = −25 ..............................................

ก

5

F (2, 2);
T3,2 + T1,2 + T2,3 + T2,1 − 4T2,2 = 0 100 + T1,2 + 100 + T2,1 − 4T2,2 = 0 T1,2 + T2,1 − 4T2,2 = −200 ..............................................

ก

6

F (3, 1);
T4,1 + T2,1 + T3,2 + T3,0 − 4T3,1 = 0 100 + T2,1 + 100 + 25 − 4T3,1 = 0 T2,1 − 4T3,1 = −225 ..............................................

ก

7

F F

ก F

F

2 0 0 0 0  T0,1   −25   −4 1  1 −4 0 2 0 0 0  T0,2   −50        1 0 −4 1 1 0 0  T1,1   −25       0  T1,2  =  −50   0 1 1 −4 0 1    0 0 1 0 −4 1 1  T   −25      2,1    0 0 0 1 1 −4 0  T2,2   −200   0 0 0 0 1 0 −4     −225    T3,1   

กก กF ก Laplacian Differential Equation F MATLAB
T0,1 = 40.7205 T0,2 = 50.3616 T1,1 = 43.7602 T1,2 = 55.3630 T2,1 = 53.9574 T2,2 = 77.3301

FF

T3,1 = 69.7394

ก Liebmann’s method ก F λ = 1.5 ε s = 2%
Ti , j = Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1
4

FF

F

F

F

Ti ,new = λTi ,new + (1 − λ )Ti ,old j j j

F

ก F i = 0, j = 1

T0,1 =

2T1,1 + T0,2 + T0,0

4 2(0) + 0 + 25 T0,1 = = 6.25 4 new T0,1 = 1.5(6.25) + (1 − 1.5)(0) = 9.3750

F i = 1, j = 1
T1,1 = T2,1 + T0,1 + T1,2 + T1,0 4 0 + 9.375 + 0 + 25 T1,1 = = 8.59375 4 new T1,1 = 1.5(8.59375) + (1 − 1.5)(0) = 12.8906

F i = 2, j = 1
T2,1 = T3,1 + T1,1 + T2,2 + T2,0 4 0 + 12.8906 + 0 + 25 T2,1 = = 9.47265 4 new T2,1 = 1.5(9.47265) + (1 − 1.5)(0) = 14.2090

F i = 3, j = 1
T3,1 = T4,1 + T2,1 + T3,2 + T3,0

4 100 + 14.2090 + 100 + 25 T3,1 = = 59.80225 4 new T3,1 = 1.5(59.30225) + (1 − 1.5)(0) = 89.7034

F i = 0, j = 2
T0,2 = 2T1,2 + T0,3 + T0,1 4 2(0) + 50 + 9.3750 T0,2 = = 14.84375 4 new T0,2 = 1.5(14.84375) + (1 − 1.5)(0) = 22.2656

F i = 1, j = 2
T1,2 = T2,2 + T0,2 + T1,3 + T1,1 4 0 + 22.2656 + 50 + 12.8906 T1,2 = = 21.28905 4 new T1,2 = 1.5(21.28905) + (1 − 1.5)(0) = 31.9336

F i = 2, j = 2
T2,2 = T3,2 + T1,2 + T2,3 + T2,1 4 100 + 31.9336 + 100 + 14.2090 T2,2 = = 61.53565 4 new T2,2 = 1.5(61.53565) + (1 − 1.5)(0) = 92.3035

F F i = 0, j = 1
T0,1 = 2T1,1 + T0,2 + T0,0 4 2(12.8906) + 22.2656 + 25 T0,1 = = 18.2617 4 new T0,1 = 1.5(18.2617) + (1 − 1.5)(9.3750) = 22.7051

F i = 1, j = 1
T1,1 = T2,1 + T0,1 + T1,2 + T1,0

4 14.2090 + 22.7051 + 31.9336 + 25 T1,1 = = 23.461926 4 new T1,1 = 1.5(23.461926) + (1 − 1.5)(12.8906) = 28.7476

F i = 2, j = 1
T2,1 = T3,1 + T1,1 + T2,2 + T2,0 4 89.7034+28.7476+92.3035+25 T2,1 = = 58.938599 4 new T2,1 = 1.5(58.938599) + (1 − 1.5)(14.2090) = 81.3034

F i = 3, j = 1
T3,1 = T4,1 + T2,1 + T3,2 + T3,0 4 100+81.3034+100+25 T3,1 = = 76.575851 4 new T3,1 = 1.5(89.7034) + (1 − 1.5)(76.575851) = 70.0121

F i = 0, j = 2
T0,2 = 2T1,2 + T0,3 + T0,1 4 2(31.9336) + 50 + 22.7051 T0,2 = = 34.143066 4 new T0,2 = 1.5(34.143066) + (1 − 1.5)(22.2656) = 40.0818

F i = 1, j = 2
T1,2 = T2,2 + T0,2 + T1,3 + T1,1 4 92.3035+40.0818+50+28.7476 T1,2 = = 52.783203 4 new T1,2 = 1.5(52.783203) + (1 − 1.5)(31.9336) = 63.2080

F i = 2, j = 2
T2,2 = T3,2 + T1,2 + T2,3 + T2,1 4 100+63.2080+100+81.3034 T2,2 = = 86.127853 4 new T2,2 = 1.5(86.127853) + (1 − 1.5)(92.3035) = 83.0400

F Error

F

F F Error F ก

F ก F ε s = 2%

F

22.7051 − 9.3750 100% = 58.71% 22.7051 28.7476-12.8906 100% = 55.16% ( ε a )1,1 = 28.7476 81.3034-14.2090 100% = 82.52% ( ε a )2,1 = 81.3034 70.0121-89.7034 100% = 28.13% ( ε a )3,1 = 70.0121 40.0818-22.2656 100% = 44.45% ( ε a )0,2 = 40.0818 63.2080-31.9336 100% = 49.48% ( ε a )1,2 = 63.2080 83.0400-92.3035 100% = 11.16% ( ε a )2,2 = 83.0400

( ε a )0,1

=

ก F F εa ก กก F F

F F

F FF

F F F

F Fก F

F ก F εs F ก F εa εs F F F F
Libemann

F F

ก MATLAB F ( ε s = 2% ) F F F
T1,1 = 47.5446 T1,2 = 63.7617

F F

F

F

T0,1 = 45.1369 T0,2 = 59.8456

T2,1 = 55.9509 T2,2 = 80.3325

T3,1 = 69.8461

F ก
qx = − k

Heat flux Ti +1, j − Ti −1, j
2∆x

ก

F k = 0.5 (ก

F ∆x = ∆y = 10 cm)

q y = −k

Ti , j +1 − Ti , j −1 2∆y

2 2 qn = q x + q y

 qy   ; For qx > 0  qx  q  θ = tan −1  y  + π ; For qx < 0  qx 

θ = tan −1 

i = 1, j = 1 T −T 55.9509 − 45.1369 qx = − k 2,1 0,1 = −0.5 = −0.27035 2∆x 2(10) T −T 63.7617 − 25 = −0.9690425 q y = − k 1,2 1,0 = −0.5 2∆x 2(10)

qn = 0.270352 + 0.96904252 = 1.0060

θ = tan −1 

180  −0.9690425  = 254.4116  + π = 4.440320128* pi  −0.27035 

F

F F Heat Flux

F

F F F F
Qn

Ø

Heat Flux

Heat Flux

F Plate

F
(%Error)

F กก
Libemann

ก Laplacian Libemann Method ก Laplacian

F

F ก F ก
flux

F The Laplacian Differential Equation Liebmann’s method F F กF ก FF กF ก ก F ก F F กF ก ก F F F ก Libemann ก Heat F ก F ก กF ก PDE
Elliptic

กก

F

ก กF F

ก

F F

F The Laplacian Differential Equation Liebmann’s method กF ก F ก F F F F F กF ก
The Laplacian Differential Equation

ก

F

ก กF ก

FF F

ก F F F
•

กF ก ก ก F F
point (

F กก F
grid )

point ( Liebmann’s method

grid )

ก

F

•

F F
•

ก F ก

Fก

F ก F

ก

ก

ก

ก ก ก กF

ก

F F

ก

ก

Liebmann’s method

ก ก

F εa F

F ก F F εs F F
•

ก F ε s = 2% F

F εa F ก

ก
•

ก ก

F ก F ก F กF F

F ก

F point (

grid )

ก ก F
point

F

The laplacian Differential Eq.

F F
• •

F F F F F F F กF F εs F กF F F F

point

F ก

F F F ก

F F กก F ก ก F

The laplacian Differential Eq.

Liebmann

( ε a = 0.001) Laplacian F

F ก

clear all,clc format short row = 4; column = 5; L = 1.5; Es = 0.02; T = zeros(4,5); T(1,:) = 25; T(4,1) = 50; T(4,2) = 50;T(4,3) = 100; T(2,5) = 100; T(3,4) = 100; FLAG = zeros(4,5); cnt = 0; disp('------------Libemann Method--------------') flipud(T) while ~(FLAG(2,1) && FLAG(2,2) && FLAG(2,3) && FLAG(2,4) && FLAG(3,1) && FLAG(3,2) && FLAG(3,3)) for i=2:1:row-1 for j=1:1:column-1 if(FLAG(i,j)==0) if(i==3 && j==4) continue end T_old = T(i,j); if (j==1) T_new = (2*T(i,j+1) + T(i+1,j) + T(i-1,j))/4;%Boudary plate else T_new = (T(i+1,j)+ T(i-1,j) + T(i,j+1) + T(i,j-1))/4;%Inner plate end T(i,j) = (L*T_new)+((1-L)*T_old); Ea = abs(T(i,j)-T_old)/T(i,j); cnt = cnt+1; fprintf('%02d row:%d col:%d Ea:%0.4f NEW:%0.4f OLD:%0.4f\n',cnt,i,j,Ea,T(i,j),T_old) if(Ea < Es) fprintf('%d row:%d col:%d Ea:%0.4f NEW:%0.4f OLD:%0.4f << break \n',cnt,i,j,Ea,T(i,j),T_old) FLAG(i,j) = 1; %set skip flag do not calculate this index end end end end end G = flipud(T) disp('------------Heat Flux--------------') k=0.5; dx=10; dy=10; Zeta=zeros(4,6); Qn=zeros(4,6); for i=2:1:row-1 for j=1:1:column-1 if(i==3 && j==4) break; end if(j==1) qy = -k*(T(i+1,j)-T(i-1,j))/(2*dy);; Qn(i,j) = sqrt(qy^2); qx = 0; else qx = -k*(T(i,j+1)-T(i,j-1))/(2*dx); qy = -k*(T(i+1,j)-T(i-1,j))/(2*dy); Qn(i,j) = sqrt(qx^2+qy^2); end if(qx > 0) Zeta(i,j)=atan(qy/qx)*(180/pi); elseif(qx < 0) Zeta(i,j)=(atan(qy/qx)+pi)*(180/pi); elseif(qx == 0 && qy ~= 0) Zeta(i,j)=90; elseif(qx==0 && qy==0) Zeta(i,j)=0; elseif(qy==0) Zeta(i,j)=0; end

end end Z=flipud(Zeta) Q=flipud(Qn)

disp('------------Laplacian Equation--------------') idx = 7; S1 = sparse(1:idx,1:idx,-4,idx,idx); A = full(S1); A(1,2)=1;A(1,3)=2; A(2,1)=1;A(2,4)=2; A(3,1)=1;A(3,4)=1;A(3,5)=1; A(4,2)=1;A(4,3)=1;A(4,6)=1; A(5,3)=1;A(5,6)=1;A(5,7)=1; A(6,4)=1;A(6,5)=1; A(7,5)=1; A b=[-25;-50;-25;-50;-25;-200;-225]; %b inv(A)*b


								
To top