Week 5.1 - Mid term project - Solving the steady and unsteady 2D heat conduction problem
Problem Overview:
In this task, we will solve the 2D steady-state and transient heat conduction equation using point iterative techniques such as Jacobi, Gauss-Seidel, and Successive Over-Relaxation (SOR). The boundary conditions are given as:
- Top Boundary = 600 K
- Bottom Boundary = 900 K
- Left Boundary = 400 K
- Right Boundary = 800 K
The problem consists of two parts:
- Steady-State Analysis: Using Jacobi, Gauss-Seidel, and Successive Over-Relaxation to iteratively solve the implicit equations with an absolute error criterion of 10−4.
- Transient State Analysis: Solve the transient version of the heat conduction equation using both explicit and implicit schemes, and compare the convergence rates of the different methods.
Discretization:
The 2D heat conduction equation in steady state is given by:
This equation is discretized using the finite difference method:
Where is the temperature at the grid point .
The transient heat conduction equation is given by:
where α is the thermal diffusivity. This equation is discretized as:
This is the explicit scheme for transient heat conduction.
Steady-State Solution:
We will implement the Jacobi, Gauss-Seidel, and SOR methods for steady-state analysis.
MATLAB Code:
Explanation of Code:
- The code initializes a 2D temperature field based on the given boundary conditions and solves for the steady-state temperature distribution using the Jacobi, Gauss-Seidel, and Successive Over-Relaxation (SOR) methods.
- The
Jacobi,Gauss_Seidel, andSORfunctions solve the system iteratively until the error tolerance is reached. - The results are plotted as contour plots showing the steady-state temperature distribution for each method.
- The number of iterations for each method is also displayed, which provides insight into the convergence rates of the methods.
Results:
- Jacobi Method: Typically slower to converge since it uses values from the previous iteration for all grid points.
- Gauss-Seidel Method: Converges faster than Jacobi because it updates the temperature values as soon as they are available in the iteration.
- Successive Over-Relaxation (SOR): This method accelerates convergence by introducing a relaxation factor ω. With , the SOR method converges faster than both Jacobi and Gauss-Seidel.
Transient Analysis (Explicit and Implicit):
For the transient part, we can implement both explicit and implicit time-stepping schemes. Here's a brief idea of how to proceed:
- Explicit Scheme: Use forward differencing in time.
- Implicit Scheme: Use backward differencing or Crank-Nicolson in time.
The solution will involve solving the discretized heat equation over time and comparing the results for explicit and implicit methods. These methods will be affected by the CFL condition and stability criteria.
Conclusion:
- Steady-State Analysis: SOR converges faster than Jacobi and Gauss-Seidel, which reduces the computational effort for large systems.
- Transient Analysis: Explicit schemes are faster but may require a smaller time step to ensure stability, while implicit schemes are unconditionally stable but require solving a system of equations at each time step.