pset_3_sol - 2.29 Numerical Fluid Mechanics Solution of...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
! = 1.5 2.29: Numerical Fluid Mechanics Solution of Problem Set 3 MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING CAMBRIDGE, MASSACHUSETTS 02139 2.29 NUMERICAL FLUID MECHANICS— SPRING 2007 Solution of Problem Set 3 Totally 120 points Posted 04/03/07, due Thursday 4 p.m. 04/19/07, Focused on Lecture 8 to 17 Problem 3.1 (15 points): Consider the following system of equations: Ax = b , A = 1 2 ! 1 2 8 0 ! 1 0 4 " # $ $ $ % & , b = 0 8 4 " # $ $ $ % & a) b) c) d) e) Cholesky factorize A (Note that A is positive definite). Find an LU factorization form for A. Use LU factorization of A to find x. Compute the x by two iterations of successive over-relaxation scheme. Use relaxation parameter and initial guess of zero. Compute the solution by 4 iterations of conjugate gradient method. Solution: a) We need to find the lower triangular matrix L such that A = LL * . However, since A is positive definite the “L” elements are real and we have A = LL * = LL T . So we need to solve the below equations: Find L = l 11 0 0 l 21 l 22 0 l 31 l 32 l 33 ! " # # # $ % & & & , such that A = LL T and l ii > 0 l 11 2 l 11 l 21 l 11 l 31 l 11 l 21 l 22 2 + l 21 2 l 21 l 31 + l 22 l 32 l 11 l 31 l 21 l 31 + l 22 l 32 l 33 2 + l 32 2 + l 31 2 ! " # # # $ % & & & = 1 2 1 2 8 0 1 0 4 ! " # # # $ % & & & The above equation can be solved very easily: 1
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2.29: Numerical Fluid Mechanics Solution of Problem Set 3 So we have: l 11 = 1, l 21 = 2, l 31 = ! 1 l 22 = 8 ! l 21 2 = 2 l 32 = ! l 21 l 31 + 0 l 22 = ! 2 " ! 1 2 = 1 l 33 = 4 ! l 32 2 ! l 31 2 = 2 L = 1 0 0 2 2 0 ! 1 1 2 " # $ $ $ % & Alternatively we could use the below formula b) The Cholesky decomposition is already a “LU” factorization form so 1 : c) L = 1 0 0 2 2 0 ! 1 1 2 " # $ $ $ % & , U = L T = 1 2 ! 1 0 2 1 0 0 2 " # $ $ $ % & We have to find y such that Ly = b and then we have to find x such that Ux = y : Ly = b ! 1 0 0 2 2 0 " 1 1 2 # $ % % % & ( ( ( y = 0 8 4 # $ % % % & ( ( ( ! y = 0 4 0 # $ % % % & ( ( ( Ux = y ! 1 2 " 1 0 2 1 0 0 2 # $ % % % & ( ( ( x = 0 4 0 # $ % % % & ( ( ( ! x = " 4 2 0 # $ % % % & ( ( ( 1 Otherwise we can use the Gaussian Elimination and find L and U accordingly: L = 1 0 0 2 1 0 ! 1 0.5 1 " # $ $ $ % & , U = 1 2 ! 1 0 4 2 0 0 2 " # $ $ $ % & 2
Image of page 2
2.29: Numerical Fluid Mechanics Solution of Problem Set 3 d) Since the matrix is positive definite, we do not need to impose diagonally dominant condition. As a result we can use the below format for Gauss-Seidel: Ax = b ! x 1 = " 2 x 2 + x 3 x 2 = " x 1 4 + 1 x 3 = x 1 4 + 1 # $ % % % & % % % Also for the relaxation we have: x i ( n + 1) = (1 ! " ) x i ( n ) + " x i ( n + 1) , where x i n + 1 is the " n + 1" iterateon x i computed by Gauss ! Seidel from x So we have: x (0) = 0 0 0 ! " # # # $ % & & & x 1 (1) = 2 ( 0 + 0 = 0 ) x 1 (1) = (1 1.5) ( 0 + 1.5 ( 0 = 0 x 2 (1) = 0 4 + 1 = 1 ) x 2 (1) = (1 1.5) ( 0 + 1.5 ( 1 = 1.5 x 3 (1) = + 0 4 + 1 = 1 ) x 3 (1) = (1 1.5) ( 0 + 1.5 ( 1 = 1.5 x (1) = 0 1.5 1.5 ! " # # # $ % & & & x 1 (2) = 2 ( 1.5 + 1.5 = 1.5 ) x 1 (2) = (1 1.5) ( 0 + 1.5 ( ’ 1.5 = 2.25 x 2 (2) = 2.25 4 + 1 = 1.5625 ) x 2 (2) = (1 1.5) ( 1.5 + 1.5 ( 1.5625 = 1.59375 x 3 (2) = + 2.25 4 + 1 = 0.4375 ) x 3 (2) = (1 1.5) ( 1.5 + 1.5 ( 0.4375 = 0.09375 x (2) = ! 2.25 1.59375 ! 0.09375 " # $ $ $ % & e) Mathematically by at most “n=3” iterations we have to find the exact solution. However in practice there will be still errors due to numerical truncations. The good thing about conjugate gradient’s method and other iterative methods is that they are selfcorrective and their repeated application decrease the accumulate errors due to numerical truncation (as seen in the program run).
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern