Вы находитесь на странице: 1из 5

Forced convection over a flat plate by Finite difference Method

Nihanth Wagmi Cherukuru ASU ID- 1204102245


1.1 1.2 1.3 1.4 1.5 1.6 Aim Background Difference Equations Implementation in MATLAB Results and analysis MATLAB code

1.1 Aim: To simulate flow over flat plate and obtain the variation of ) value of ( ( ) at Pr=0.01,1,10 1.2 Background: From the governing equations of fluid flow, upon applying similarity transformations we get the following ODE equation of ( ) and (1) Where ( ) (2) Where Let (3) Boundary conditions are: , . From the plots, to deduce the

( )

1.3 Difference Equations: Using finite difference approximation of second order accuracy we get the following difference equations: (4) ( ) ( )

( Where

( )

Upon rearranging the terms, we get: [( [ Where ( Where Here Boundary conditions remain the same as presented before. 1.4 Implementation in MATLAB: 1. 2. 3. 4. 5. 6. Firstly Eq.6 was implemented by assuming linear variation between is taken to be 0.05 and is taken as 45 Using the values of h obtained, f is determined from Eq.8 Now, a two tri-diagonal matrices is defined for h and from i=0 to i=45 The boundary conditions are implemented in the constant matrix on the RHS while solving the h matrix for ( ) node. The newly obtained h matrix is now updated and the process is repeated 15 times. Numbers of iterations were taken as 15 by running the code a number of times till the values of h change negligibly. Similarly, matrix is also determined. Finally, the plots are obtained between This process is repeated for Pr=1, Pr=10 and Pr=0.01 A variable to store the CPU elapsed time was also implemented. 2 nd ) (8) ( )
) ( )

[( [ (

] ]

[( [ (

] ] )

(6) (7)

] )

7. 8. 9. 10.

1.5 Results and analysis:


10 45

40

Pr=10 Pr=1 Pr=0.01

35

7 30 6 25 5

20 4 15 3 10 2

0.5 h

1.5

0 -0.5

0.5

1.5

1. From the first plot we see that, as increases, h approaches 1 and at the value of h is 0.9910. This point is denoted by a * in the plot and it marks the value of for which 2. From the h matrix obtained 3. From the second plot slopes varying with Pr. 4. From the matrix ( ( ( ) is calculated and it was found to be decreases and tends to become 0 with

( )= 0.336 we see that as increases, ) were obtained as: )= {

5. Thus, we observe that the slope of increases in the negative direction as Pr increases. 6. We also observe that as Pr increases, the thermal boundary layer decreases and for Pr<1 the thermal boundary layer is thinner than the momentum boundary layer. For Pr=1, the thickness of momentum boundary layer and thermal boundary layer are the same. 7. The average CPU time consumed for this code is 3.6816 seconds.

1.6 MATLAB code:


clear all; t=cputime; etamax=45; deta=0.01; Pr=1; N=etamax/deta; c=zeros(N,N); h=zeros(N,1); T=zeros(N,N); h(1,1)=0; eta=zeros(N,1); eta(1,1)=0; for i=2:N eta(i,1)=eta(i-1,1)+deta; end for i=2:N h(i,1)=h(i-1,1)+(1/(N-1)); end f=zeros(N-1,1); f(1,1)=0; p=1; while p<15 for i=2:N-1; f(i,1)=(h(i,1)*deta)+f(i-1,1); end for i=1:N if i==1 || i==N for j=1:N c(i,j)=0; end else j=i; c(i,j-1)=(-(f(i,1)/(4*deta)))+(1/(deta)^2); c(i,j)=(-2)/((deta)^2); c(i,j+1)=((f(i,1)/(4*deta))+(1/(deta)^2)); end end for i=1:N for j=1:N if abs(i-j)>1 c(i,j)=0; end end end c(1,1)=1; c(N,N)=1; rhs=zeros(N,1); rhs(N,1)=1; rhs(1,1)=0; hnew=c\rhs; h=hnew; for i=1:N if i==1 || i==N for j=1:N T(i,j)=0;

end else j=i; T(i,j-1)=((-(f(i,1)*Pr)/(4*deta)))+(1/(deta)^2); T(i,j)=(-2)/((deta)^2); T(i,j+1)=(((f(i,1)*Pr)/(4*deta))+(1/(deta)^2)); end end for i=1:N for j=1:N if abs(i-j)>1 T(i,j)=0; end end end T(1,1)=1; T(N,N)=1; rhsT=zeros(N,1); rhsT(1,1)=1; rhsT(N,1)=0; Tnew=T\rhsT; T=Tnew; p=p+1; end i=1; while h(i,1)<=0.99 i=i+1; end bleta=deta*(i-1); subplot(2,2,[1 3]); plot(hnew,eta); xlim([0 1.5]); ylim([0 10]); hold on; plot(bleta,'*'); subplot(2,2,[2 4]); plot(T,eta); xlim([-0.5 1.5]); hold on; e=cputime-t

Вам также может понравиться