# Alternating Direction Implicit method for solving 2D Heat diffusion

• I
• Vick
In summary, the conversation discusses the computation of a 2D heat diffusion parabolic PDE using the ADI method. The example in a YouTube video is used as a reference, and the grid is discretized into nodes representing the length and width of the object. The boundary conditions and first direction formula are also mentioned. The calculations for i=1 and j=1 are correct, and the same formula is used to compute for i=2 and j=1.
Vick
TL;DR Summary
Computation of the discretized grid nodes as per ADI
I'm trying to compute a 2D Heat diffusion parabolic PDE:

$$\frac{\partial u}{\partial t} = \alpha \{ \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} \}$$

by the ADI method. I am actually trying to go over the example in this youtube video. The video is in another language, so just by looking at the images is illustrative enough! I've calculated i and j when both are 1, successfully, but it seems I cannot do so for when j=1 and i=2.

My understanding of the subject matter is as follows:

A discretized grid having nodes i and j representing the length of object as in x-axis (columns) and width of object as in y-axis (rows) respectively and as per the video the grid is:

Matrix([[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]])

which represents ##0 \leq x \leq 1## and ##0 \leq y \leq 1## with ##dx## and ##dy## at ##0.25## and:
##U(0,y,t) = 0## ;
##U(1,y,t) = 0## ;
##U(x,0,t) = 0## ;
##U(x,1,t) = 0## ;
##U(x,y,0) = 100##

and the first direction formula is:

$$-r_xU_{i-1,j}^{n+\frac{1}{2}} + (1 + 2r_x)U_{i,j}^{n+\frac{1}{2}} - r_xU_{i+1,j}^{n+\frac{1}{2}} = r_yU_{i,j-1}^n + (1 - 2r_y)U_{i,j}^n + r_yU_{i,j+1}^n$$

where ##r_x = \frac{\alpha . dt}{2.dx^2}## and ##r_y = \frac{\alpha . dt}{2.dy^2}##; and alpha being ##\alpha = 1## and ##dt = 1##

Therefore computing for ##i=1## and ##j=1##:
##0 + 17.U_{i,j}^{n+\frac{1}{2}} -8.U_{i+1,j}^{n+\frac{1}{2}} = 8*0 - 15*0 + 8*0##

Are the above correct? Or am I mistaken somewhere?

The above calculations are correct. To compute for i=2 and j=1, we use the same formula:$$-r_xU_{i-1,j}^{n+\frac{1}{2}} + (1 + 2r_x)U_{i,j}^{n+\frac{1}{2}} - r_xU_{i+1,j}^{n+\frac{1}{2}} = r_yU_{i,j-1}^n + (1 - 2r_y)U_{i,j}^n + r_yU_{i,j+1}^n$$where ##r_x = \frac{\alpha . dt}{2.dx^2}## and ##r_y = \frac{\alpha . dt}{2.dy^2}##; and alpha being ##\alpha = 1## and ##dt = 1##Therefore computing for ##i=2## and ##j=1##:##-8.U_{i-1,j}^{n+\frac{1}{2}} + 17.U_{i,j}^{n+\frac{1}{2}} - 8.U_{i+1,j}^{n+\frac{1}{2}} = 8*0 - 15*0 + 8*0##

## 1. What is the Alternating Direction Implicit (ADI) method for solving 2D Heat diffusion?

The Alternating Direction Implicit (ADI) method is a numerical method used to solve partial differential equations, specifically for solving the 2D heat diffusion equation. It is a finite difference method that uses an alternating direction approach to discretize the equation in both space and time. This method is particularly useful for problems with high anisotropy or large aspect ratios.

## 2. How does the ADI method work?

The ADI method works by splitting the 2D heat diffusion equation into two separate equations, one for each direction (x and y). These equations are then solved using a Crank-Nicolson scheme, which is a combination of the backward Euler and forward Euler methods. The solution is then alternated between the two directions until a steady-state solution is reached.

## 3. What are the advantages of using the ADI method?

The ADI method has several advantages, including its ability to handle problems with high anisotropy or large aspect ratios, its unconditional stability, and its second-order accuracy in both space and time. It also has a relatively simple implementation and can be easily parallelized, making it efficient for solving large-scale problems.

## 4. What are the limitations of the ADI method?

While the ADI method has many advantages, it also has some limitations. One limitation is that it can only be used for linear problems, as it relies on a linearization of the equations. It also requires the use of a uniform grid, which may not be suitable for all problems. Additionally, the convergence rate of the method can be slow for some problems.

## 5. How does the ADI method compare to other numerical methods for solving 2D heat diffusion?

The ADI method is a popular choice for solving 2D heat diffusion problems due to its efficiency and accuracy. It is often compared to other methods such as the explicit method and the fully implicit method. Compared to the explicit method, the ADI method is more stable and can handle larger time steps. Compared to the fully implicit method, the ADI method is more efficient and has a lower computational cost. However, the fully implicit method may be more accurate for certain types of problems.

### Similar threads

• Differential Equations
Replies
3
Views
1K
• Differential Equations
Replies
2
Views
2K
• Differential Equations
Replies
4
Views
1K
• Differential Equations
Replies
1
Views
1K
• Differential Equations
Replies
3
Views
540
• Differential Equations
Replies
3
Views
2K
• Differential Equations
Replies
5
Views
2K
• Differential Equations
Replies
7
Views
2K
• Differential Equations
Replies
8
Views
4K
• Differential Equations
Replies
2
Views
1K