Some questions regarding the ADI Method

  • Level: Graduate 
  • Thread starter Telemachus
  • Start date
  • Tags Tags
    Method
1 reply · 2K views · last reply
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.
 
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:

Colour heatmap of phi(x,t) over x and y from 0 to 10, with a colour bar from 0 to 140; values peak in a red region near (6, 6) and fall toward grey and dark blue at the corners.


Analytic:
Colour contour plot of phi(x,t) over x from 0 to 10 and y from 0 to 10, with a rainbow colour scale from 0 to 140; a single broad red peak near x = 6, y = 6 decays toward dark blue and black at the corners.


Error:
Some questions regarding the ADI Method
 
Attachments
  • Colour heat map of phi(x,t) over the square 0 to 10 in x and y, with a rainbow scale from 0 to 140; values peak in dark red near (6, 6) and fall to grey at the corners.
    numeric.gif
    1.6 MB · Views: 662
  • Nearly blank heatmap of E(x,t) over x from 0 to 10 and t from 0 to 10, with a colour bar from 0 to 100; only faint traces are visible.
    error.gif
    415.3 KB · Views: 602