Solve Poissons Equation using 5-Point Stencil with SOR method

Solution Poisson's Equation In a Rectangular Domain Using 5-Point Stencil

Poisson's equation in a square domain 0x,y1 with source term given by q(x)=100sin(πx)sin(πy). The boundaries of the domain are maintained at u=0. Determine the solution using finite difference method.

Solution:

Discretizing domain uniformly with step size h and k along x and y direction. Using five point stencil, equation at each node is given by ui+1,j2ui,j+ui1,jh2+ui,j+12ui,j+ui,j1k2=q(i,j)
ui,j=12h2+2k2(ui+1,j+ui1,jh2+ui,j+1+ui,j1k2+q(i,j))
where q(i,j)=100sin(πxi)sin(πyj) Here a MATLAB code is given below. Choosen m=n=11 grid to solve the problem using SOR (successive overrelaxation).

Mathematica Code:

  • In this algorithm, changing the value of sor=1 gives the "Gauss-Seidel iteration", and sor=0 gives "Jacobi iteration" and 1<sor<2 gives the "successive overrelaxation result(SOR)".
  • The successive overrelaxation method generally used for elliptical pdes.

Comments

Popular posts from this blog

Backward Substitution in MATLAB

Solve Poisson's Equation in Matlab

Solving Poisson's Equation Using 5-Point Stencil In A Rectangular Domain