Some questions regarding the ADI Method

  • A
  • Thread starter Telemachus
  • Start date
  • Tags
    Method
In summary, the conversation discusses the writer's attempt to code a solution for the diffusion equation in two dimensions using the Alternate Directions Implicit method. They mention that most of the literature focuses on the case of homogeneous media, but they are interested in the more general and useful case of inhomogeneous media. The writer has already written the algorithm and is currently working on coding it. They also pose a question about whether there is a numerical trick to use the homogeneous media solution for the inhomogeneous case. The writer has successfully tested their code and found it to be stable, but they are curious if there is any reported analytic proof. They also provide plots of the numerical and analytic solutions, noting that the error can be reduced by writing the boundary conditions
  • #1
Telemachus
835
30
Hi there. I am writing a code to solve the diffusion equation in two dimensions using the Alternate Directions Implicit method: https://en.wikipedia.org/wiki/Alternating_direction_implicit_method

I haven't finished to write the code yet, but I am trying to be the most general as possible. However, in the bibliography I have found almost exclusively the case for homogeneous media, and the stability analysis is done for that case, in which the matrices to be inverted are symmetric. I know that going to 3D is complicated because the Peaceman-Rachford scheme isn't stable. However, I wanted to know if there is any analysis reported in the bibliography for the inhomogeneous media case. I will finish to write the code and experiment with it by my self, but I was trying to avoid the analytical part. I have already written the algorithm, so I'm just coding right now.

I also would like to pose the question on why the homogeneous case is so widely reported, when the inhomogeneous is much more general and useful I think. Is there any numerical trick to use the homogeneous media solution to solve the inomogeneous media case in an efficient way? perhaps recursively, using finite differences?

Thanks in advance.
 
Physics news on Phys.org
  • #2
Well, I have written the code and it is clearly stable. It converges to the analytic solution. I have manufactured a solution with inhomogeneous diffusion and absorption coefficients, so I have corroborated by numerical experimentation that it is stable. But if there is any reported analytic proof it would be nice.

So, here are the plots (its x,y, not x,t). The error can be reduced by writing well the boundary conditions, in the way I have written it it's only first order in ##dt##, written in other way can be done ##dt^2##.

Numerical:

?temp_hash=2bef687225a182ea60dae7935f56b511.gif


Analytic:
giphy.gif


Error:
?temp_hash=2bef687225a182ea60dae7935f56b511.gif
 

Attachments

  • numeric.gif
    numeric.gif
    1.6 MB · Views: 550
  • error.gif
    error.gif
    415.3 KB · Views: 508

1. What is the ADI Method?

The ADI (Alternating Direction Implicit) Method is a numerical algorithm used to solve partial differential equations. It is based on the idea of splitting the original equation into simpler subproblems that can be solved independently.

2. What types of problems can be solved using the ADI Method?

The ADI Method is commonly used to solve parabolic and elliptic partial differential equations, such as heat and diffusion equations. It can also be applied to other types of equations, such as convection-diffusion equations.

3. How does the ADI Method differ from other numerical methods?

The ADI Method differs from other numerical methods in that it allows for explicit treatment of certain terms in the equation, while implicitly treating others. This can lead to increased efficiency and stability compared to other methods.

4. What are the advantages of using the ADI Method?

The ADI Method has several advantages, including its ability to handle stiff differential equations, its ability to handle complex boundary conditions, and its relatively simple implementation compared to other numerical methods.

5. Are there any limitations to using the ADI Method?

While the ADI Method has many advantages, it also has some limitations. It may not be suitable for all types of partial differential equations, and its accuracy may be affected by the choice of time and space step sizes. It also requires careful consideration of stability conditions.

Similar threads

Replies
1
Views
3K
  • Calculus and Beyond Homework Help
Replies
10
Views
487
  • Mechanical Engineering
Replies
9
Views
2K
Replies
60
Views
726
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
Replies
3
Views
797
  • Programming and Computer Science
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
714
Replies
16
Views
1K
  • Differential Equations
Replies
1
Views
712
Back
Top