CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   looking for a Fortran Subroutine! (https://www.cfd-online.com/Forums/main/1355-looking-fortran-subroutine.html)

vincent October 1, 1999 10:12

looking for a Fortran Subroutine!
 
Dear colleagues, I have numerical problems.

The ADI algorithm allows us to solve a tridiagonal matrix system where f(i,j) is a scalar fonction with known coefficients AD(i,j), AU(i+1,j), AL(i-1,j) and RES(i,j) so that we can find the modification df(i,j) of f(i,j). This is quite good approach for 2D flow problems. Here is my question:

Is there some algorithm for 3D flows? f(i,j,k) is the function defined at point (i,j,k) with coefficients A(i,j-1,k+1) A(i,j,k+1) A(i,j+1,k+1) A(i,j-1,k) A(i,j,k) A(i,j+1,k) A(i,j-1,k-1) A(i,j,k-1) A(i,j+1,k-1) and RES(i,j,k) that allow me to find modification df(i,j,k) of f(i,j,k)????

I am expecting help from your specialists!

Sergei Chernyshenko October 2, 1999 10:41

Re: looking for a Fortran Subroutine!
 
Hi, Vincent.

You question is not exactly clear. Do you call the Thomas technique used for solving tridiagonal matrix the ADI algorithm? Or do you imply that you would like to have an extension of the Thomas technique for the case of a matrix with five non-zero diagonals, two of which are at large distance from the central three diagonals?

In ADI, as I was taught, we use Thomas method in one direction, say, i, at one step, and in another direction, say, j, at another step. That is why it is called alternation direction. Or is it all just because of my not knowing English abbreviations for those methods?

Or do you mean that you are time-stepping (or 'supersonically' space-stepping) in j in your 2D case and in i in your 3D case? Anyway, below are some hints. Just translate them from my idea that we are talking about an elliptic problem to whatever necessary.

Sure, you can use Thomas method in i, then j, then k directions, but I do remember that there can be some problems with stability.

As for the five-diagonal case, no, there is no method which would be comparable to Thomas technique. What there is is more complicated, slower, and requires more memory. Strictly speaking the Thomas technique is the Gauss elimination applied to a tridiagonal matrix. If you do Gauss elimination for that five-diagonal case, all the space between the diagonals becomes filled with non-zeros, resulting in the loss of efficiency. No way around, except some specific matrices.

Yours Sergei


All times are GMT -4. The time now is 10:45.