Some questions regarding the ADI Method

  • Context: Graduate 
  • Thread starter Thread starter Telemachus
  • Start date Start date
  • Tags Tags
    Method
Click For Summary
SUMMARY

The discussion focuses on the implementation of the Alternate Directions Implicit (ADI) method for solving the diffusion equation in two dimensions. The author has successfully coded the algorithm, confirming its stability and convergence to the analytic solution, even with inhomogeneous diffusion and absorption coefficients. The author seeks insights on the lack of literature regarding inhomogeneous media and queries about potential numerical techniques to adapt homogeneous solutions for inhomogeneous cases. The discussion highlights the importance of boundary condition formulation to enhance error reduction.

PREREQUISITES
  • Understanding of the Alternating Directions Implicit method
  • Familiarity with numerical methods for partial differential equations
  • Knowledge of stability analysis in numerical algorithms
  • Experience with coding in a programming language suitable for numerical simulations
NEXT STEPS
  • Research the stability analysis of the ADI method in inhomogeneous media
  • Explore numerical techniques for adapting homogeneous solutions to inhomogeneous cases
  • Learn about finite difference methods for solving partial differential equations
  • Investigate advanced boundary condition formulations to improve numerical accuracy
USEFUL FOR

Researchers, numerical analysts, and software developers working on computational methods for solving partial differential equations, particularly in the context of diffusion processes in both homogeneous and inhomogeneous media.

Telemachus
Messages
820
Reaction score
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
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: 636
  • error.gif
    error.gif
    415.3 KB · Views: 583

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 36 ·
2
Replies
36
Views
6K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
Replies
10
Views
2K
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 65 ·
3
Replies
65
Views
9K