pset_3_sol

# pset_3_sol - 2.29 Numerical Fluid Mechanics Solution of...

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

! = 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

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

View Full Document
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
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.5) ( 0 + 1.5 ( 0 = 0 x 2 (1) = 0 4 + 1 = 1 ) x 2 (1) = 1.5) ( 0 + 1.5 ( 1 = 1.5 x 3 (1) = + 0 4 + 1 = 1 ) x 3 (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 = 1.5) ( 0 + 1.5 ( ’ 1.5 = 2.25 x 2 = 2.25 4 + 1 = 1.5625 ) x 2 = 1.5) ( 1.5 + 1.5 ( 1.5625 = 1.59375 x 3 = + 2.25 4 + 1 = 0.4375 ) x 3 = 1.5) ( 1.5 + 1.5 ( 0.4375 = 0.09375 x = ! 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).

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/27/2012 for the course MECHANICAL 2.29 taught by Professor Henrikschmidt during the Spring '07 term at MIT.

### Page1 / 39

pset_3_sol - 2.29 Numerical Fluid Mechanics Solution of...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online