hw5 - tri-diagonal system for your direct solver. Calculate...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Numerical Methods for Coastal and Oceanographic Engineering Slinn Spring 2004 Home Work Problem # 5. Due April 8, 2004. The task is to solve the equation ) ( 2 2 x R x p = , for p using 1. Direct solvers (a) tri-diagonal inversion, (b) F.F.T.’s, 2. Jacobi method 3. Gauss-Siedel iteration 4. S.O.R. (under relaxed and over relaxed) We will test two functions for p(x) 1. p(x) = a + b x + c x 2 + d x 3 + …. 2. = = + + + + = N n n n N n n n nx b nx a a x p 1 1 0 ) sin( ) cos( ) ( ϕ φ for any coefficients, and with N << number of grid points. You choose, x. Use mixed boundary conditions for (1), i.e., Dirichlet, Neumann, and periodic boundary conditions for (2). For example, for (1) use Dirichlet B.C.’s at both ends, Neumann at both ends, or one type at each end. Define an interval (0, L), e.g, π 2 0 x , and form the analytic right hand side by taking derivatives of your function. Also calculate exact values for p(0), p(L), and ) 0 ( x p , ) ( L x p when needed. Discretize the governing equation using 2 nd order central differences so that you obtain a
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: tri-diagonal system for your direct solver. Calculate the number iterations required to iterate to convergence for the Jacobi, Gauss-Siedel, and S.O.R. methods, using either the L2, or sup-norm, of either the residual error, or the rate of change of the iterates, or both. For the S.O.R. method, plot how the number of iterations changes with the relaxation parameter, , over the range 0.5 &lt; &lt; 1.99. Compare the absolute error of the accuracy of the methods to the exact solution from the formula you began with. Choose any stopping criteria. For Gauss-Siedel, plot the absolute error, and the approximate error used for the stopping criteria, as a function of iteration, on a log plot. Finally, for the S.O.R. scheme, try a 4 th order discretization of 2 2 x p with one Dirichlet B.C. and one 3 rd order Neumann B.C for the polynomial function. Plot results with Tecplot....
View Full Document

Ask a homework question - tutors are online