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

10. Numbers of iterations were taken as 15 by running the code a number of times till the values of h change negligibly.3 Difference Equations: Using finite difference approximation of second order accuracy we get the following difference equations: (4) ( ) ( ) ( Where ) ( ) ( ) Upon rearranging the terms. 1. Finally. Similarly. 8. The newly obtained h matrix is now updated and the process is repeated 15 times.01 A variable to store the CPU elapsed time was also implemented.05 and is taken as 45 Using the values of h obtained. f is determined from Eq. 2 nd ) (8) ( ) ) ( ) ] [( [ ( ) ] ] [( [ ( ) ( ) ] ] ) (6) (7) ( ] ) ) ) ( 7. matrix is also determined.8 Now.4 Implementation in MATLAB: 1. Pr=10 and Pr=0. Firstly Eq. 2.6 was implemented by assuming linear variation between is taken to be 0. the plots are obtained between This process is repeated for Pr=1. 4.1. 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. 3. 9. . we get: [( [ Where ( Where Here Boundary conditions remain the same as presented before. 6. 5.

From the first plot we see that. For Pr=1. From the h matrix obtained 3.5 h 1 1. 3 . we observe that the slope of increases in the negative direction as Pr increases. From the second plot slopes varying with Pr. This point is denoted by a ‘*’ in the plot and it marks the value of for which 2. Thus.9910.5 0 -0.5 0 0. 6. 7. We also observe that as Pr increases.1. The average CPU time consumed for this code is 3. the thickness of momentum boundary layer and thermal boundary layer are the same.6816 seconds.01 35 7 30 6 25 5   20 4 15 3 10 2 1 5 0 0 0. as increases. the thermal boundary layer decreases and for Pr<1 the thermal boundary layer is thinner than the momentum boundary layer.336 we see that as increases. 4.5 1 1. From the matrix ( ( ( ) is calculated and it was found to be decreases and tends to become 0 with ( )= 0.5 Results and analysis: 10 45 9 40 8 Pr=10 Pr=1 Pr=0. ) were obtained as: )= { 5.5  1. h approaches 1 and at the value of h is 0.

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

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

Sign up to vote on this title
UsefulNot useful