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

Info icon This 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
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 < λ < 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

{[ 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