|
|

|
Homework list for MEM711 |
|
Both explicit and implicit methods are employed to solve fluid flow and heat transfer problems. I decided to use Matlab to write the numerical codes. We were assigned one or two problems per chapter, covering different types and forms of partial differential equations (PDEs). After fluid mechanics (MEM612), I’d have to say that this was the most challenging course I have taken. Contact me with any questions you may have as you take this course. The textbook is Computational Fluid Dynamics, 4th Ed., Vol. 1, Hoffman and Chiang. |
|
3.5 Compute the transient heat transfer through a rectangular bar with sides held at constant temperatures. The governing equation is:
The FTCS explicit scheme is used. It is subject to stability constraints—watch Δt! See temperature contours at time 10 sec, 40 sec, and at steady state. |
|
Chapter 3: Parabolic PDEs |
|
3.9 Compute the heat transfer through a fluid moving from left to right in a rectangular channel at constant velocity. The governing equation is:
The non-dimensionalized form of the equation is used. It resembles exactly the dimensionalized form above. Use second-order central difference formulations and an implicit scheme. Use the ‘\’ command in Matlab to solve the “T*” matrix (unknowns). To perform the analysis using nonequal grid spacing, first reformulate the finite difference equations (FDEs) using Δx and γΔx in the Taylor series expansions for forward and backward differences. These are your new FDEs. Then, create a uniform θi=ξi/L grid. Use the equation for Ci to determine the unequal spacing. You can use this information to create a γi matrix of “right spacing” divided by “left spacing” for each i grid point. See temperature and error distributions. |
|
5.1 Determine the streamline pattern within a chamber with one inlet and one outlet. The governing equation is:
Five schemes are used: (a) Point Gauss-Seidel (explicit); (b) Line Gauss-Seidel (implicit); (c) Point SOR (implicit); (d) Line SOR (implicit); and (e) ADI (implicit). Tips: · For any implicit method, write out a few FDEs, i.e. for k=1 and i=2,3...IM2,IM1 to get a feel of the coefficients and RHS. · For LGS, keep track of what values are updated at k=k+1 iteration and what are known from the boundary conditions. You’ll see a pattern as you go from k=1 to k=2 which elements are always updated or known. · To perform LGS analysis for “j-sweep”, see equation on p169 and apply this pattern to the problem at hand. · To perform ADI analysis, put the “half-step” values in a separate matrix because you can’t input half-values for matrix locations. Solution of the streamline pattern is similar using all schemes so only one solution is shown. |
|
Chapter 5: Elliptic PDEs |
|
5.3 Determine the velocity profile across a cross-section of a duct. The governing equation is:
A point Gauss-Seidel (explicit) scheme is used. Two values for the pressure gradient are used. The error is very small (less than 1%) using this scheme. The velocity profile is shown. |
|
6.3 Determine the wave propagation of an initial compression wave. The governing equation is the inviscid Bergers (Burgers) equation:
The Lax-Wendroff scheme is used. It is explicit and is subject to stability constraints—watch Δt! See the velocity profiles for different Courant numbers. |
|
Chapter 6: Hyperbolic PDEs |
|
6.6 Determine the wave propagation of an initial compression wave. The governing equation is again the inviscid Bergers (Burgers) equation. The Beam and Warming implicit scheme is used. Replace “E” with “u2/2” and “A” with “u” when writing the code. (I) With no damping, the coefficients on the LHS will include the “A” terms. (II) With fourth-order damping, Eq. 6-48 is explicitly added to the RHS. Apply this damping term to points i=3:IM2. For points i=2 and i=IM1, you can try using a second-order central scheme. But I did not apply damping to the latter points and still got good results. (III) With flux-corrected transport, the predictor step is Eq. 6-83. The corrector step can be found using three methods in the book. I only got the first two to work. The first: Eq. 6-84. The second: Eqs. 6-87, 6-88, and 6-89. Remember, the “half-step” values are placed in a separate matrix. (IV) Additional assignment: Perform analysis using Harten-Yee upwind TVD limiters. The inviscid Bergers (Burgers) equation is expressed using flux limiters (Eq. 6-123). Where “h” is expressed in Eqs. 6-124 and 6-125. The limiter functions, Φ, are expressed in Eq. 6-131, and the limiter, G, in Eq. 6-123. Note that Ψ and σ are functions. See the results. |
|
7.3 Determine the temperature profile of a fluid traveling at constant velocity in a rectangular channel. The governing equation is:
(a) The nondimensionalized form resembles exactly the dimensionalized form above. The variable “u” is a constant. (b) Obtain the analytical solution by assuming T(x,y)=ζ(x) + θ(x,t). The “*” indicating nondimensionality have been dropped for convenience. Your solution will have the form of exponential + summation. (c) Use a second-order central space and first-order in time explicit FDE for equal grid spacing. (d) Repeat (c) for unequal grid spacing. This was also done in a previous assignment (3.9). You will have a ‘first derivative of T term’ in the second derivative of T central difference expression. See the temperature and error distributions. |
|
Chapter 7: Scalar representation of the Navier-Stokes equations |
|
8.1 Determine the velocity vectors and streamlines inside a driven cavity, where the upper plate is moving at a constant velocity. The governing equations are the vorticity and stream functions given by Eqns. 8-28 amd 8-30, respectively. The steps to take are: 1. Solve the parabolic vorticity function using the FTCS explicit scheme. The boundary conditions (BCs) are given in Sec. 8.8. They are numerically dependent on certain stream function values. Remember the top boundary is moving. You will need the boundary conditions for the stream function. They are assigned arbitrarily (Sec. 8.9.1) and assumed to be a zero. Thus, all the BCs of Ωi,j are known at n=1. Next… 2. Use the values of Ωi,j to solve for the stream function using the point Gauss-Seidel scheme. Knowing the values of Ψi,j now at k+1, you can recalculate the BCs of the vorticity function. Go back to step 1. 3. Repeat until the convergence criterion and steady state are reached respectively. 4. The velocity components u and v can be solved using Eqns. 8-24 and 8-25, respectively. See the velocity vectors and streamlines. |
|
Chapter 8: Incompressible Navier-Stokes equations |