Week 5.1 - Mid term project - Solving the steady and unsteady 2D heat conduction problem
2D Heat Conduction equation :
The 2D heat conduction equation describes how temperature changes over time in a two-dimensional space. It is a partial differential equation that governs the distribution of heat within a material. The equation is derived from the principles of conservation of energy and Fourier's law of heat conduction. The general form of the 2D heat conduction equation is:

Here, T is the temperature as a function of both spatial coordinates x and y, t is time, and alpha is the thermal diffusivity of the material.
The equation models the evolution of temperature in a two-dimensional space over time. Solving this equation numerically allows one to simulate and analyze the temperature distribution within a physical system, such as a solid object, in response to initial conditions and boundary conditions. It finds applications in various fields, including engineering, physics, and environmental science, where understanding heat transfer is essential. Numerical methods like finite difference, finite element, and finite volume are commonly employed to solve the 2D heat conduction equation in practical scenarios.
Functions code :
Jacobi :
Gauss Seidel :
Succesive Over Relaxation :
Matlab code :







- Jacobi Method: It is the slowest among the three methods, as it updates the entire grid at each iteration. Convergence is achieved through a large number of iterations, and each iteration involves updating the entire grid.
- Gauss-Seidel Method: It is faster than Jacobi, as it updates the grid in a more sequential manner. The new values are used immediately, leading to a quicker convergence compared to Jacobi.
- Successive Over Relaxation (SOR): SOR introduces a relaxation factor (omega) to speed up convergence. It is expected to converge faster than Gauss-Seidel and Jacobi. The choice of omega affects the convergence rate.
- Explicit Method: This method involves updating the temperature at each grid point explicitly based on the previous time step. The stability of the solution depends on the Courant-Friedrichs-Lewy (CFL) condition. It is conditionally stable, and a small time step is required for stability. The convergence is achieved through time iterations.
- Implicit Method (Jacobi, Gauss-Seidel, SOR): Implicit methods involve solving a system of linear equations at each time step. They offer unconditional stability and larger time steps compared to explicit methods. However, each time step involves solving a system, making it computationally more expensive.
- For steady-state simulations, SOR is expected to converge faster than Gauss-Seidel, and Gauss-Seidel is expected to converge faster than Jacobi. The choice of method depends on the problem size and desired accuracy.
- For transient simulations, the implicit methods (Jacobi, Gauss-Seidel, SOR) are more stable and allow for larger time steps compared to the explicit method. Among the implicit methods, SOR may converge faster due to the relaxation factor.
- The convergence rates are influenced by factors such as grid resolution, boundary conditions, and the choice of relaxation parameters (omega for SOR).
- Adjustments to the numerical parameters(e.g.,time step,grid spacing) and the choice of iterative solvers can significantly impact the convergence behaviour.