Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Introduction to CFD (ME 423): Exam 2

I.   PROBLEM 1

1,1

 

 

 

 

 

U

0,0

Figure 1: A 2D square channel.

Consider a square two-dimensional channel through which a uid is owing at uniform velocity U in the x-direction (see Fig. 2).  The channel dimensions are x =  [0, 1] , y =  [0, 1].  The uid enters the channel at x = 0 with a uniform temperature of 0 and leaves with a temperature Texit(y) at x = 1.  The bottom and top walls satisfy Neumann boundary conditions,   oy=0= -3x2  and

 oy=1= x2 + 4x, respectively [remember that direction matters for normal boundary conditions so be careful with signs]. There is a heat source S(x, y). The steady state governing equation for temperature is given by

U      =         + S(x, y).

(1)

Taking

U = 1

and

S(x, y) = y2 + 5xy - 4x,

solve for the temperature eld in the domain and answer the following questions:

1.  (10 pts .)   Discuss under what assumptions would you get Eq.   1 above from the general convection-diffusion equation for temperature.

2.  (40 pts .)  Use a central difference scheme to obtain a numerical solution for T from Eq.  1. Show your derivation of the discretized form of the equation.  Write a MATLAB code to solve for T and show a contour plot of temperature distribution inside the domain.

3.  (15 pts .) Plot the temperature profile Texit(y) at the exit of the channel. Fit a curve to this profile and provide the expression. You can use MATLAB’s curve-fitting toolbox (launched by typing cftool” in the command window) to t an nth degree polynomial for this purpose. This will familiarize you with curve tting in MATLAB.

4.  (15 pts .) Plot the temperature profile Ty=0.5 (x) at the middle of the channel. Fit a curve to this profile and provide the expression.

5.  (15 pts .)  Does the temperature profile become fully developed in this problem?  We will consider a fully developed profile to be one for which  = 0 beyond a certain length of the channel. Justify your answer.

II.   PROBLEM 2

You have been taught about many numerical schemes in class. In this problem, we will introduce the concept of numerical diffusion.

Consider the following PDE

+ V      = 0,

where V is constant.

1.  (10 pts .)   Step  1:  Verify that the above equation a hyperbolic solution of the form u = g(x - Vt) is a solution to this equation.  Physically, what does this solution show?  [Hint: Think how the solution changes with time.  Simply say what happens to the shape of the solution.]

2.  (5 pts .) Write the Taylor series expansion for u(x + ∆x, t) around u(x, t) up to and including the (∆x)2  term.  This expansion should be done with respect to x.  Keep the   and  terms intact i.e. don’t replace them with any approximations.

3.  (5 pts .) Rearrange the above expression to get an approximation for 

4.  (5 pts .)   Substitute this expression for    into the original PDE. Clearly write this new version of the PDE. [Some extra info The form of the PDE that you get after replacing 

with the Taylor Series expansion is called the MODIFIED DIFFERENTIAL EQUATION. You are encouraged to read up on this topic and understand what it says about numerical approximations of a PDE.]

5.  (10 pts .)  Explain how this version of the PDE is different from the original and where the diffusion is coming from and what the diffusion coefficient is. What happens to the numerical diffusion when you decrease the mesh size? What happens to the numerical diffusion if V is higher?

6.  (20 pts .)

 

Figure 2: Grid point cluster for the one-dimensional domain.

Consider an initial condition for the solution of Eq.  2 as the Heaviside function defined as follows:

u(x, t = 0) = H(x) =0,

(1,

x < 0

x ≥ 0

Plot the function above and notice that it has a sharp change at x = 0. Choose V = 1 and

t/x = 0.5. Evolve Eq. 2 using an explicit scheme with backward dierence in x as shown

below:

uP(n)+1 = uP(n) - V  (uP(n) - uW(n)) ,

where where the subscripts correspond to the locations shown in Fig.  2.  The superscripts refer to time instants (n and n+1 refer to the previous and current time instants respectively). Plot the solution at multiple time instants in the same plot and show that the initial sharp change begins to smooth out as the solution travels forward with time.

III.   PROBLEM 3

In this problem, we will use von Neumann stability analysis on the explicit and implicit schemes of solving Eq.  2 given in the previous problem.  In class, you have been taught to approximate the round-off error as a summation of sine modes, i.e.  ε(x, t) =     m(北)in  Cjeajtsin(kjx) (see class notes).  This is because the problem discussed in class had 2nd order derivatives in the governing equation, and T = 0 boundary conditions on a nite domain. In this problem, we will consider an infinite domain, and for that, the correct Fourier expansion needs to include both sine and cosine modes. Therefore, we need to approximate the round-off errors as follows:

ma

ε(x, t) =            Cjea t  ik xjej ,

j =λmin

where i = ^-1, λmin = 2∆x and λmax = >.

1.  (15 pts .)  Consider a simple explicit scheme for solving Eq.  2 using central differencing in

space as shown below:

uP(n)+1 = uP(n) - V   ,

where the subscripts correspond to the locations shown in Fig. 2. The superscripts refer to time instants (n and n + 1 refer to the previous and current time instants respectively). The speed of the wave V is constant. Show that this scheme is unstable.

2.  (15 pts .) Consider an implicit scheme for solving Eq. 2 as follows: uP(n)+1 = uP(n) - V  \ .

Show that this scheme is stable.