This repository offers a comprehensive introduction to solving Partial Differential Equations (PDEs) using iterative methods. Our goal is to elucidate the efficiency, accuracy, and convergence characteristics of three prominent iterative techniques: Jacobi, Gauss-Seidel, and Successive Over Relaxation (SOR).
The focus is on a two-dimensional Laplace equation with Dirichlet boundary conditions. We aim to approximate solutions using finite difference schemes and iterative methods.
The process involves:
- Discretizing the Laplace equation via finite difference schemes.
- Employing iterative methods such as Jacobi, Gauss-Seidel, and SOR.
- Analyzing the results to assess the impact of grid spacing (
$h$ ) on speed and accuracy and comparing the convergence rates of the iterative methods.
Here,
Consider a square metal plate with temperature
As a 2D boundary value problem, four boundary conditions are necessary for a unique solution. The top edge temperature is
This is a 2D boundary value problem that can be solved using the eigenfunction expansion method; however, this method can be extremely difficult. Instead we will invoke an analytical approach. In order to find an analytical solution, we must discretize the partial differential equation and use iterative methods.
In the Jacobi method, the temperature at each grid point is updated based on its neighbors' values, iterating until convergence is achieved.
The Gauss-Seidel method updates temperatures in-place for faster convergence compared to Jacobi.
SOR enhances Gauss-Seidel by incorporating a relaxation factor (
The linear system is solved for
As expected, SOR converges the fastest, followed by Gauss-Seidel then Jacobian.
This observation can also be explained mathematically by evaluating
$\rho(B_J) = \cos(\pi h) \approx 1 - \frac{2\pi}{h}$ $\rho(B_{GS}) = \cos^2(\pi h) \approx 1 - \pi^2h^2$ $\rho(B_{w^*}) = \frac{\pi h}{2(1 + \sqrt{1 - \rho(B_J)^2})} - 1 \approx 1 - 2$
Notice that
This repository highlights the effectiveness of iterative methods in solving PDEs. It emphasizes the need for selecting suitable numerical approaches for precise and efficient problem-solving in various scientific and engineering applications.