216 the solution process depends on the order in

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

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

Unformatted text preview: Example 9.2.4. Consider the boundary value problem for Laplace's equation on a unit square u=0 (x y) 2 u(x y) = 0 iif x = 0 y = 1 (x y) 2 @ : 1 f x=1 y=0 14 Solution Techniques for Elliptic Problems K 1 0 1 0 1 0 1 0 k ν+1 (j,k) 1 0 1 0 ν 1 0 1 0 1 0 1 0 0 0 j J Figure 9.2.1: Gauss-Seidel iteration with row ordering. Let us solve this problem on a 3 3 mesh using Jacobi and Gauss-Seidel iteration with x = y = 1=3 hence, using (8.1.2) with x = y = 1=4 and fjk = 0, we have Ujk = 1 (Uj+1 k + Uj;1 k + Uj k+1 + Uj k;1) j k = 1 2: 4 The Jacobi iteration is ( ) j k=1 2 = 0 1 ::: : Ujk +1) = 1 (Uj(+1 k + Uj(;)1 k + Uj( k)+1 + Uj( k);1) 4 (0) Starting with the trivial initial guess Ujk = 0, j k = 1 2, we present solutions after the one and ve iterations in Table 9.2.1. The exact solution and di erences between the exact and Jacobi solutions after ve iterations are shown in Table 9.2.2. The Gauss-Seidel method for this problem is 1) ( = 0 1 ::: : Ujk +1) = 4 (Uj(+1 k + Uj(;+1) + Uj( k)+1 + Uj( k+1) ) 1k ;1 Its solution after ve iterations is shown in Table 9.2.3. The maximum error after ve Jacobi iterations is 0.01656 and after ve Gauss-Seidel iterations is 0.00146. Thus, as expected, Gauss-Seidel iteration is converging faster than Jacobi iteration 9.2. Basic Iterative Solution Methods 15 0 0 0 0/1 0 0 0 0/1 0 0 0.25 1 0 0.23438 0.48344 1 0 0.25 0.5 1 0 0.48344 0.73438 1 0/1 1 1 1 0/1 1 1 1 Table 9.2.1: Solution of Example 9.2.4 after one iteration ( = 0, left) and after ve iterations ( = 4, right) using Jacobi's method. 0 0 0 0/1 0 0 0 0 0 0.25 0.5 1 0 0.01562 0.01656 0 0 0.5 0.75 1 0 0.01656 0.01562 0 0/1 1 1 1 0 0 0 0 Table 9.2.2: Exact solution of Example 9.2.4 (left) and the errors in the Jacobi solution after ve iterations (right). 0 0 0 0/1 0 0 0 0 0 0.24927 0.49963 1 0 0.00073 0.00037 0 0 0.49854 0.74927 1 0 0.00146 0.00073 0 0/1 1 1 1 0 0 0 0 Table 9.2.3: Solution of Example 4 after ve iterations ( = 4) using the Gauss-Seidel method (left) and errors in this soluti...
View Full Document

This document was uploaded on 03/16/2014 for the course CSCI 6840 at Rensselaer Polytechnic Institute.

Ask a homework question - tutors are online